/**
 * (C) Copyright IBM Corp. 2021.
 *
 * 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.
 */

/*
 * IBM OpenAPI SDK Code Generator Version: 3.31.0-902c9336-20210504-161156
 */

// Package vpcv1 : Operations and models for the VpcV1 service
package vpcv1

import (
	"context"
	"encoding/json"
	"fmt"
	"net/http"
	"reflect"
	"time"

	"github.com/IBM/go-sdk-core/v5/core"
	common "github.com/IBM/vpc-go-sdk/common"
	"github.com/go-openapi/strfmt"
)

// VpcV1 : The IBM Cloud Virtual Private Cloud (VPC) API can be used to programmatically provision and manage
// infrastructure resources, including virtual server instances, subnets, volumes, and load balancers.
//
// Version: 2021-05-06
type VpcV1 struct {
	Service *core.BaseService

	// Requests the version of the API as of a date in the format `YYYY-MM-DD`. Any date up to the current date may be
	// provided. Specify the current date to request the latest version.
	Version *string

	// The infrastructure generation for the request. For the API behavior documented here, use
	// `2`.
	generation *int64
}

// DefaultServiceURL is the default URL to make service requests to.
const DefaultServiceURL = "https://us-south.iaas.cloud.ibm.com/v1"

// DefaultServiceName is the default key used to find external configuration information.
const DefaultServiceName = "vpc"

// VpcV1Options : Service options
type VpcV1Options struct {
	ServiceName   string
	URL           string
	Authenticator core.Authenticator

	// Requests the version of the API as of a date in the format `YYYY-MM-DD`. Any date up to the current date may be
	// provided. Specify the current date to request the latest version.
	Version *string
}

// NewVpcV1UsingExternalConfig : constructs an instance of VpcV1 with passed in options and external configuration.
func NewVpcV1UsingExternalConfig(options *VpcV1Options) (vpc *VpcV1, err error) {
	if options.ServiceName == "" {
		options.ServiceName = DefaultServiceName
	}

	if options.Authenticator == nil {
		options.Authenticator, err = core.GetAuthenticatorFromEnvironment(options.ServiceName)
		if err != nil {
			return
		}
	}

	vpc, err = NewVpcV1(options)
	if err != nil {
		return
	}

	err = vpc.Service.ConfigureService(options.ServiceName)
	if err != nil {
		return
	}

	if options.URL != "" {
		err = vpc.Service.SetServiceURL(options.URL)
	}
	return
}

// NewVpcV1 : constructs an instance of VpcV1 with passed in options.
func NewVpcV1(options *VpcV1Options) (service *VpcV1, err error) {
	serviceOptions := &core.ServiceOptions{
		URL:           DefaultServiceURL,
		Authenticator: options.Authenticator,
	}

	err = core.ValidateStruct(options, "options")
	if err != nil {
		return
	}

	baseService, err := core.NewBaseService(serviceOptions)
	if err != nil {
		return
	}

	if options.URL != "" {
		err = baseService.SetServiceURL(options.URL)
		if err != nil {
			return
		}
	}
	if options.Version == nil {
		options.Version = core.StringPtr("2021-05-06")
	}

	service = &VpcV1{
		Service:    baseService,
		Version:    options.Version,
		generation: core.Int64Ptr(2),
	}

	return
}

// GetServiceURLForRegion returns the service URL to be used for the specified region
func GetServiceURLForRegion(region string) (string, error) {
	return "", fmt.Errorf("service does not support regional URLs")
}

// Clone makes a copy of "vpc" suitable for processing requests.
func (vpc *VpcV1) Clone() *VpcV1 {
	if core.IsNil(vpc) {
		return nil
	}
	clone := *vpc
	clone.Service = vpc.Service.Clone()
	return &clone
}

// SetServiceURL sets the service URL
func (vpc *VpcV1) SetServiceURL(url string) error {
	return vpc.Service.SetServiceURL(url)
}

// GetServiceURL returns the service URL
func (vpc *VpcV1) GetServiceURL() string {
	return vpc.Service.GetServiceURL()
}

// SetDefaultHeaders sets HTTP headers to be sent in every request
func (vpc *VpcV1) SetDefaultHeaders(headers http.Header) {
	vpc.Service.SetDefaultHeaders(headers)
}

// SetEnableGzipCompression sets the service's EnableGzipCompression field
func (vpc *VpcV1) SetEnableGzipCompression(enableGzip bool) {
	vpc.Service.SetEnableGzipCompression(enableGzip)
}

// GetEnableGzipCompression returns the service's EnableGzipCompression field
func (vpc *VpcV1) GetEnableGzipCompression() bool {
	return vpc.Service.GetEnableGzipCompression()
}

// EnableRetries enables automatic retries for requests invoked for this service instance.
// If either parameter is specified as 0, then a default value is used instead.
func (vpc *VpcV1) EnableRetries(maxRetries int, maxRetryInterval time.Duration) {
	vpc.Service.EnableRetries(maxRetries, maxRetryInterval)
}

// DisableRetries disables automatic retries for requests invoked for this service instance.
func (vpc *VpcV1) DisableRetries() {
	vpc.Service.DisableRetries()
}

// ListVpcs : List all VPCs
// This request lists all VPCs in the region. A VPC is a virtual network that belongs to an account and provides logical
// isolation from other networks. A VPC is made up of resources in one or more zones. VPCs are regional, and each VPC
// can contain resources in multiple zones in a region.
func (vpc *VpcV1) ListVpcs(listVpcsOptions *ListVpcsOptions) (result *VPCCollection, response *core.DetailedResponse, err error) {
	return vpc.ListVpcsWithContext(context.Background(), listVpcsOptions)
}

// ListVpcsWithContext is an alternate form of the ListVpcs method which supports a Context parameter
func (vpc *VpcV1) ListVpcsWithContext(ctx context.Context, listVpcsOptions *ListVpcsOptions) (result *VPCCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateStruct(listVpcsOptions, "listVpcsOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range listVpcsOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListVpcs")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listVpcsOptions.Start != nil {
		builder.AddQuery("start", fmt.Sprint(*listVpcsOptions.Start))
	}
	if listVpcsOptions.Limit != nil {
		builder.AddQuery("limit", fmt.Sprint(*listVpcsOptions.Limit))
	}
	if listVpcsOptions.ResourceGroupID != nil {
		builder.AddQuery("resource_group.id", fmt.Sprint(*listVpcsOptions.ResourceGroupID))
	}
	if listVpcsOptions.ClassicAccess != nil {
		builder.AddQuery("classic_access", fmt.Sprint(*listVpcsOptions.ClassicAccess))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPCCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateVPC : Create a VPC
// This request creates a new VPC from a VPC prototype object. The prototype object is structured in the same way as a
// retrieved VPC, and contains the information necessary to create the new VPC.
func (vpc *VpcV1) CreateVPC(createVPCOptions *CreateVPCOptions) (result *VPC, response *core.DetailedResponse, err error) {
	return vpc.CreateVPCWithContext(context.Background(), createVPCOptions)
}

// CreateVPCWithContext is an alternate form of the CreateVPC method which supports a Context parameter
func (vpc *VpcV1) CreateVPCWithContext(ctx context.Context, createVPCOptions *CreateVPCOptions) (result *VPC, response *core.DetailedResponse, err error) {
	err = core.ValidateStruct(createVPCOptions, "createVPCOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range createVPCOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateVPC")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	body := make(map[string]interface{})
	if createVPCOptions.AddressPrefixManagement != nil {
		body["address_prefix_management"] = createVPCOptions.AddressPrefixManagement
	}
	if createVPCOptions.ClassicAccess != nil {
		body["classic_access"] = createVPCOptions.ClassicAccess
	}
	if createVPCOptions.Name != nil {
		body["name"] = createVPCOptions.Name
	}
	if createVPCOptions.ResourceGroup != nil {
		body["resource_group"] = createVPCOptions.ResourceGroup
	}
	_, err = builder.SetBodyContentJSON(body)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPC)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteVPC : Delete a VPC
// This request deletes a VPC. This operation cannot be reversed. For this request to succeed, the VPC must not contain
// any instances, subnets, or public gateways. All security groups and network ACLs associated with the VPC are
// automatically deleted. All flow log collectors with `auto_delete` set to `true` targeting the VPC or any resource in
// the VPC are automatically deleted.
func (vpc *VpcV1) DeleteVPC(deleteVPCOptions *DeleteVPCOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteVPCWithContext(context.Background(), deleteVPCOptions)
}

// DeleteVPCWithContext is an alternate form of the DeleteVPC method which supports a Context parameter
func (vpc *VpcV1) DeleteVPCWithContext(ctx context.Context, deleteVPCOptions *DeleteVPCOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteVPCOptions, "deleteVPCOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteVPCOptions, "deleteVPCOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *deleteVPCOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteVPCOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteVPC")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetVPC : Retrieve a VPC
// This request retrieves a single VPC specified by the identifier in the URL.
func (vpc *VpcV1) GetVPC(getVPCOptions *GetVPCOptions) (result *VPC, response *core.DetailedResponse, err error) {
	return vpc.GetVPCWithContext(context.Background(), getVPCOptions)
}

// GetVPCWithContext is an alternate form of the GetVPC method which supports a Context parameter
func (vpc *VpcV1) GetVPCWithContext(ctx context.Context, getVPCOptions *GetVPCOptions) (result *VPC, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getVPCOptions, "getVPCOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getVPCOptions, "getVPCOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *getVPCOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getVPCOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetVPC")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPC)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateVPC : Update a VPC
// This request updates a VPC's name.
func (vpc *VpcV1) UpdateVPC(updateVPCOptions *UpdateVPCOptions) (result *VPC, response *core.DetailedResponse, err error) {
	return vpc.UpdateVPCWithContext(context.Background(), updateVPCOptions)
}

// UpdateVPCWithContext is an alternate form of the UpdateVPC method which supports a Context parameter
func (vpc *VpcV1) UpdateVPCWithContext(ctx context.Context, updateVPCOptions *UpdateVPCOptions) (result *VPC, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateVPCOptions, "updateVPCOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateVPCOptions, "updateVPCOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *updateVPCOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateVPCOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateVPC")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateVPCOptions.VPCPatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPC)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// GetVPCDefaultNetworkACL : Retrieve a VPC's default network ACL
// This request retrieves the default network ACL for the VPC specified by the identifier in the URL. The default
// network ACL is applied to any new subnets in the VPC which do not specify a network ACL.
func (vpc *VpcV1) GetVPCDefaultNetworkACL(getVPCDefaultNetworkACLOptions *GetVPCDefaultNetworkACLOptions) (result *DefaultNetworkACL, response *core.DetailedResponse, err error) {
	return vpc.GetVPCDefaultNetworkACLWithContext(context.Background(), getVPCDefaultNetworkACLOptions)
}

// GetVPCDefaultNetworkACLWithContext is an alternate form of the GetVPCDefaultNetworkACL method which supports a Context parameter
func (vpc *VpcV1) GetVPCDefaultNetworkACLWithContext(ctx context.Context, getVPCDefaultNetworkACLOptions *GetVPCDefaultNetworkACLOptions) (result *DefaultNetworkACL, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getVPCDefaultNetworkACLOptions, "getVPCDefaultNetworkACLOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getVPCDefaultNetworkACLOptions, "getVPCDefaultNetworkACLOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *getVPCDefaultNetworkACLOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{id}/default_network_acl`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getVPCDefaultNetworkACLOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetVPCDefaultNetworkACL")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDefaultNetworkACL)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// GetVPCDefaultRoutingTable : Retrieve a VPC's default routing table
// This request retrieves the default routing table for the VPC specified by the identifier in the URL. The default
// routing table is associated with any subnets in the VPC which have not been explicitly associated with a user-defined
// routing table.
func (vpc *VpcV1) GetVPCDefaultRoutingTable(getVPCDefaultRoutingTableOptions *GetVPCDefaultRoutingTableOptions) (result *DefaultRoutingTable, response *core.DetailedResponse, err error) {
	return vpc.GetVPCDefaultRoutingTableWithContext(context.Background(), getVPCDefaultRoutingTableOptions)
}

// GetVPCDefaultRoutingTableWithContext is an alternate form of the GetVPCDefaultRoutingTable method which supports a Context parameter
func (vpc *VpcV1) GetVPCDefaultRoutingTableWithContext(ctx context.Context, getVPCDefaultRoutingTableOptions *GetVPCDefaultRoutingTableOptions) (result *DefaultRoutingTable, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getVPCDefaultRoutingTableOptions, "getVPCDefaultRoutingTableOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getVPCDefaultRoutingTableOptions, "getVPCDefaultRoutingTableOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *getVPCDefaultRoutingTableOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{id}/default_routing_table`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getVPCDefaultRoutingTableOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetVPCDefaultRoutingTable")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDefaultRoutingTable)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// GetVPCDefaultSecurityGroup : Retrieve a VPC's default security group
// This request retrieves the default security group for the VPC specified by the identifier in the URL. The default
// security group is applied to any new network interfaces in the VPC that do not specify a security group.
func (vpc *VpcV1) GetVPCDefaultSecurityGroup(getVPCDefaultSecurityGroupOptions *GetVPCDefaultSecurityGroupOptions) (result *DefaultSecurityGroup, response *core.DetailedResponse, err error) {
	return vpc.GetVPCDefaultSecurityGroupWithContext(context.Background(), getVPCDefaultSecurityGroupOptions)
}

// GetVPCDefaultSecurityGroupWithContext is an alternate form of the GetVPCDefaultSecurityGroup method which supports a Context parameter
func (vpc *VpcV1) GetVPCDefaultSecurityGroupWithContext(ctx context.Context, getVPCDefaultSecurityGroupOptions *GetVPCDefaultSecurityGroupOptions) (result *DefaultSecurityGroup, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getVPCDefaultSecurityGroupOptions, "getVPCDefaultSecurityGroupOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getVPCDefaultSecurityGroupOptions, "getVPCDefaultSecurityGroupOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *getVPCDefaultSecurityGroupOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{id}/default_security_group`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getVPCDefaultSecurityGroupOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetVPCDefaultSecurityGroup")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDefaultSecurityGroup)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListVPCAddressPrefixes : List all address prefixes for a VPC
// This request lists all address pool prefixes for a VPC.
func (vpc *VpcV1) ListVPCAddressPrefixes(listVPCAddressPrefixesOptions *ListVPCAddressPrefixesOptions) (result *AddressPrefixCollection, response *core.DetailedResponse, err error) {
	return vpc.ListVPCAddressPrefixesWithContext(context.Background(), listVPCAddressPrefixesOptions)
}

// ListVPCAddressPrefixesWithContext is an alternate form of the ListVPCAddressPrefixes method which supports a Context parameter
func (vpc *VpcV1) ListVPCAddressPrefixesWithContext(ctx context.Context, listVPCAddressPrefixesOptions *ListVPCAddressPrefixesOptions) (result *AddressPrefixCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(listVPCAddressPrefixesOptions, "listVPCAddressPrefixesOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(listVPCAddressPrefixesOptions, "listVPCAddressPrefixesOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"vpc_id": *listVPCAddressPrefixesOptions.VPCID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/address_prefixes`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range listVPCAddressPrefixesOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListVPCAddressPrefixes")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listVPCAddressPrefixesOptions.Start != nil {
		builder.AddQuery("start", fmt.Sprint(*listVPCAddressPrefixesOptions.Start))
	}
	if listVPCAddressPrefixesOptions.Limit != nil {
		builder.AddQuery("limit", fmt.Sprint(*listVPCAddressPrefixesOptions.Limit))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalAddressPrefixCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateVPCAddressPrefix : Create an address prefix for a VPC
// This request creates a new prefix from a prefix prototype object. The prototype object is structured in the same way
// as a retrieved prefix, and contains the information necessary to create the new prefix.
func (vpc *VpcV1) CreateVPCAddressPrefix(createVPCAddressPrefixOptions *CreateVPCAddressPrefixOptions) (result *AddressPrefix, response *core.DetailedResponse, err error) {
	return vpc.CreateVPCAddressPrefixWithContext(context.Background(), createVPCAddressPrefixOptions)
}

// CreateVPCAddressPrefixWithContext is an alternate form of the CreateVPCAddressPrefix method which supports a Context parameter
func (vpc *VpcV1) CreateVPCAddressPrefixWithContext(ctx context.Context, createVPCAddressPrefixOptions *CreateVPCAddressPrefixOptions) (result *AddressPrefix, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createVPCAddressPrefixOptions, "createVPCAddressPrefixOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createVPCAddressPrefixOptions, "createVPCAddressPrefixOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"vpc_id": *createVPCAddressPrefixOptions.VPCID,
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/address_prefixes`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range createVPCAddressPrefixOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateVPCAddressPrefix")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	body := make(map[string]interface{})
	if createVPCAddressPrefixOptions.CIDR != nil {
		body["cidr"] = createVPCAddressPrefixOptions.CIDR
	}
	if createVPCAddressPrefixOptions.Zone != nil {
		body["zone"] = createVPCAddressPrefixOptions.Zone
	}
	if createVPCAddressPrefixOptions.IsDefault != nil {
		body["is_default"] = createVPCAddressPrefixOptions.IsDefault
	}
	if createVPCAddressPrefixOptions.Name != nil {
		body["name"] = createVPCAddressPrefixOptions.Name
	}
	_, err = builder.SetBodyContentJSON(body)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalAddressPrefix)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteVPCAddressPrefix : Delete an address prefix
// This request deletes a prefix. This operation cannot be reversed. The request will fail if any subnets use addresses
// from this prefix.
func (vpc *VpcV1) DeleteVPCAddressPrefix(deleteVPCAddressPrefixOptions *DeleteVPCAddressPrefixOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteVPCAddressPrefixWithContext(context.Background(), deleteVPCAddressPrefixOptions)
}

// DeleteVPCAddressPrefixWithContext is an alternate form of the DeleteVPCAddressPrefix method which supports a Context parameter
func (vpc *VpcV1) DeleteVPCAddressPrefixWithContext(ctx context.Context, deleteVPCAddressPrefixOptions *DeleteVPCAddressPrefixOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteVPCAddressPrefixOptions, "deleteVPCAddressPrefixOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteVPCAddressPrefixOptions, "deleteVPCAddressPrefixOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"vpc_id": *deleteVPCAddressPrefixOptions.VPCID,
		"id":     *deleteVPCAddressPrefixOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/address_prefixes/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteVPCAddressPrefixOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteVPCAddressPrefix")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetVPCAddressPrefix : Retrieve an address prefix
// This request retrieves a single prefix specified by the identifier in the URL.
func (vpc *VpcV1) GetVPCAddressPrefix(getVPCAddressPrefixOptions *GetVPCAddressPrefixOptions) (result *AddressPrefix, response *core.DetailedResponse, err error) {
	return vpc.GetVPCAddressPrefixWithContext(context.Background(), getVPCAddressPrefixOptions)
}

// GetVPCAddressPrefixWithContext is an alternate form of the GetVPCAddressPrefix method which supports a Context parameter
func (vpc *VpcV1) GetVPCAddressPrefixWithContext(ctx context.Context, getVPCAddressPrefixOptions *GetVPCAddressPrefixOptions) (result *AddressPrefix, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getVPCAddressPrefixOptions, "getVPCAddressPrefixOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getVPCAddressPrefixOptions, "getVPCAddressPrefixOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"vpc_id": *getVPCAddressPrefixOptions.VPCID,
		"id":     *getVPCAddressPrefixOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/address_prefixes/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getVPCAddressPrefixOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetVPCAddressPrefix")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalAddressPrefix)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateVPCAddressPrefix : Update an address prefix
// This request updates a prefix with the information in a provided prefix patch. The prefix patch object is structured
// in the same way as a retrieved prefix and contains only the information to be updated.
func (vpc *VpcV1) UpdateVPCAddressPrefix(updateVPCAddressPrefixOptions *UpdateVPCAddressPrefixOptions) (result *AddressPrefix, response *core.DetailedResponse, err error) {
	return vpc.UpdateVPCAddressPrefixWithContext(context.Background(), updateVPCAddressPrefixOptions)
}

// UpdateVPCAddressPrefixWithContext is an alternate form of the UpdateVPCAddressPrefix method which supports a Context parameter
func (vpc *VpcV1) UpdateVPCAddressPrefixWithContext(ctx context.Context, updateVPCAddressPrefixOptions *UpdateVPCAddressPrefixOptions) (result *AddressPrefix, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateVPCAddressPrefixOptions, "updateVPCAddressPrefixOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateVPCAddressPrefixOptions, "updateVPCAddressPrefixOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"vpc_id": *updateVPCAddressPrefixOptions.VPCID,
		"id":     *updateVPCAddressPrefixOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/address_prefixes/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateVPCAddressPrefixOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateVPCAddressPrefix")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateVPCAddressPrefixOptions.AddressPrefixPatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalAddressPrefix)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListVPCRoutes : List all routes in a VPC's default routing table
// This request lists all routes in the VPC's default routing table. Each route is zone-specific and directs any packets
// matching its destination CIDR block to a `next_hop` IP address. The most specific route matching a packet's
// destination will be used. If multiple equally-specific routes exist, traffic will be distributed across them.
func (vpc *VpcV1) ListVPCRoutes(listVPCRoutesOptions *ListVPCRoutesOptions) (result *RouteCollection, response *core.DetailedResponse, err error) {
	return vpc.ListVPCRoutesWithContext(context.Background(), listVPCRoutesOptions)
}

// ListVPCRoutesWithContext is an alternate form of the ListVPCRoutes method which supports a Context parameter
func (vpc *VpcV1) ListVPCRoutesWithContext(ctx context.Context, listVPCRoutesOptions *ListVPCRoutesOptions) (result *RouteCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(listVPCRoutesOptions, "listVPCRoutesOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(listVPCRoutesOptions, "listVPCRoutesOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"vpc_id": *listVPCRoutesOptions.VPCID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/routes`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range listVPCRoutesOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListVPCRoutes")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listVPCRoutesOptions.ZoneName != nil {
		builder.AddQuery("zone.name", fmt.Sprint(*listVPCRoutesOptions.ZoneName))
	}
	if listVPCRoutesOptions.Start != nil {
		builder.AddQuery("start", fmt.Sprint(*listVPCRoutesOptions.Start))
	}
	if listVPCRoutesOptions.Limit != nil {
		builder.AddQuery("limit", fmt.Sprint(*listVPCRoutesOptions.Limit))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRouteCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateVPCRoute : Create a route in a VPC's default routing table
// This request creates a new route in the VPC's default routing table. The route prototype object is structured in the
// same way as a retrieved route, and contains the information necessary to create the new route. The request will fail
// if the new route will cause a loop.
func (vpc *VpcV1) CreateVPCRoute(createVPCRouteOptions *CreateVPCRouteOptions) (result *Route, response *core.DetailedResponse, err error) {
	return vpc.CreateVPCRouteWithContext(context.Background(), createVPCRouteOptions)
}

// CreateVPCRouteWithContext is an alternate form of the CreateVPCRoute method which supports a Context parameter
func (vpc *VpcV1) CreateVPCRouteWithContext(ctx context.Context, createVPCRouteOptions *CreateVPCRouteOptions) (result *Route, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createVPCRouteOptions, "createVPCRouteOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createVPCRouteOptions, "createVPCRouteOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"vpc_id": *createVPCRouteOptions.VPCID,
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/routes`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range createVPCRouteOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateVPCRoute")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	body := make(map[string]interface{})
	if createVPCRouteOptions.Destination != nil {
		body["destination"] = createVPCRouteOptions.Destination
	}
	if createVPCRouteOptions.Zone != nil {
		body["zone"] = createVPCRouteOptions.Zone
	}
	if createVPCRouteOptions.Action != nil {
		body["action"] = createVPCRouteOptions.Action
	}
	if createVPCRouteOptions.Name != nil {
		body["name"] = createVPCRouteOptions.Name
	}
	if createVPCRouteOptions.NextHop != nil {
		body["next_hop"] = createVPCRouteOptions.NextHop
	}
	_, err = builder.SetBodyContentJSON(body)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoute)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteVPCRoute : Delete a VPC route
// This request deletes a route. This operation cannot be reversed.
func (vpc *VpcV1) DeleteVPCRoute(deleteVPCRouteOptions *DeleteVPCRouteOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteVPCRouteWithContext(context.Background(), deleteVPCRouteOptions)
}

// DeleteVPCRouteWithContext is an alternate form of the DeleteVPCRoute method which supports a Context parameter
func (vpc *VpcV1) DeleteVPCRouteWithContext(ctx context.Context, deleteVPCRouteOptions *DeleteVPCRouteOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteVPCRouteOptions, "deleteVPCRouteOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteVPCRouteOptions, "deleteVPCRouteOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"vpc_id": *deleteVPCRouteOptions.VPCID,
		"id":     *deleteVPCRouteOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/routes/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteVPCRouteOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteVPCRoute")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetVPCRoute : Retrieve a VPC route
// This request retrieves a single route specified by the identifier in the URL.
func (vpc *VpcV1) GetVPCRoute(getVPCRouteOptions *GetVPCRouteOptions) (result *Route, response *core.DetailedResponse, err error) {
	return vpc.GetVPCRouteWithContext(context.Background(), getVPCRouteOptions)
}

// GetVPCRouteWithContext is an alternate form of the GetVPCRoute method which supports a Context parameter
func (vpc *VpcV1) GetVPCRouteWithContext(ctx context.Context, getVPCRouteOptions *GetVPCRouteOptions) (result *Route, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getVPCRouteOptions, "getVPCRouteOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getVPCRouteOptions, "getVPCRouteOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"vpc_id": *getVPCRouteOptions.VPCID,
		"id":     *getVPCRouteOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/routes/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getVPCRouteOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetVPCRoute")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoute)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateVPCRoute : Update a VPC route
// This request updates a route with the information in a provided route patch. The route patch object is structured in
// the same way as a retrieved route and contains only the information to be updated.
func (vpc *VpcV1) UpdateVPCRoute(updateVPCRouteOptions *UpdateVPCRouteOptions) (result *Route, response *core.DetailedResponse, err error) {
	return vpc.UpdateVPCRouteWithContext(context.Background(), updateVPCRouteOptions)
}

// UpdateVPCRouteWithContext is an alternate form of the UpdateVPCRoute method which supports a Context parameter
func (vpc *VpcV1) UpdateVPCRouteWithContext(ctx context.Context, updateVPCRouteOptions *UpdateVPCRouteOptions) (result *Route, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateVPCRouteOptions, "updateVPCRouteOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateVPCRouteOptions, "updateVPCRouteOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"vpc_id": *updateVPCRouteOptions.VPCID,
		"id":     *updateVPCRouteOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/routes/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateVPCRouteOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateVPCRoute")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateVPCRouteOptions.RoutePatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoute)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListVPCRoutingTables : List all routing tables for a VPC
// This request lists all user-defined routing tables for a VPC.  Each subnet in a VPC is associated with a routing
// table, which controls delivery of packets sent on that subnet according to the action of the most specific matching
// route in the table.  If multiple equally-specific routes exist, traffic will be distributed across them.  If no
// routes match, delivery will be controlled by the system's built-in routes.
func (vpc *VpcV1) ListVPCRoutingTables(listVPCRoutingTablesOptions *ListVPCRoutingTablesOptions) (result *RoutingTableCollection, response *core.DetailedResponse, err error) {
	return vpc.ListVPCRoutingTablesWithContext(context.Background(), listVPCRoutingTablesOptions)
}

// ListVPCRoutingTablesWithContext is an alternate form of the ListVPCRoutingTables method which supports a Context parameter
func (vpc *VpcV1) ListVPCRoutingTablesWithContext(ctx context.Context, listVPCRoutingTablesOptions *ListVPCRoutingTablesOptions) (result *RoutingTableCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(listVPCRoutingTablesOptions, "listVPCRoutingTablesOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(listVPCRoutingTablesOptions, "listVPCRoutingTablesOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"vpc_id": *listVPCRoutingTablesOptions.VPCID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/routing_tables`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range listVPCRoutingTablesOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListVPCRoutingTables")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listVPCRoutingTablesOptions.Start != nil {
		builder.AddQuery("start", fmt.Sprint(*listVPCRoutingTablesOptions.Start))
	}
	if listVPCRoutingTablesOptions.Limit != nil {
		builder.AddQuery("limit", fmt.Sprint(*listVPCRoutingTablesOptions.Limit))
	}
	if listVPCRoutingTablesOptions.IsDefault != nil {
		builder.AddQuery("is_default", fmt.Sprint(*listVPCRoutingTablesOptions.IsDefault))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoutingTableCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateVPCRoutingTable : Create a routing table for a VPC
// This request creates a user-defined routing table from a routing table prototype object. The prototype object is
// structured in the same way as a retrieved routing table, and contains the information necessary to create the new
// routing table.
func (vpc *VpcV1) CreateVPCRoutingTable(createVPCRoutingTableOptions *CreateVPCRoutingTableOptions) (result *RoutingTable, response *core.DetailedResponse, err error) {
	return vpc.CreateVPCRoutingTableWithContext(context.Background(), createVPCRoutingTableOptions)
}

// CreateVPCRoutingTableWithContext is an alternate form of the CreateVPCRoutingTable method which supports a Context parameter
func (vpc *VpcV1) CreateVPCRoutingTableWithContext(ctx context.Context, createVPCRoutingTableOptions *CreateVPCRoutingTableOptions) (result *RoutingTable, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createVPCRoutingTableOptions, "createVPCRoutingTableOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createVPCRoutingTableOptions, "createVPCRoutingTableOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"vpc_id": *createVPCRoutingTableOptions.VPCID,
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/routing_tables`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range createVPCRoutingTableOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateVPCRoutingTable")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	body := make(map[string]interface{})
	if createVPCRoutingTableOptions.Name != nil {
		body["name"] = createVPCRoutingTableOptions.Name
	}
	if createVPCRoutingTableOptions.RouteDirectLinkIngress != nil {
		body["route_direct_link_ingress"] = createVPCRoutingTableOptions.RouteDirectLinkIngress
	}
	if createVPCRoutingTableOptions.RouteTransitGatewayIngress != nil {
		body["route_transit_gateway_ingress"] = createVPCRoutingTableOptions.RouteTransitGatewayIngress
	}
	if createVPCRoutingTableOptions.RouteVPCZoneIngress != nil {
		body["route_vpc_zone_ingress"] = createVPCRoutingTableOptions.RouteVPCZoneIngress
	}
	if createVPCRoutingTableOptions.Routes != nil {
		body["routes"] = createVPCRoutingTableOptions.Routes
	}
	_, err = builder.SetBodyContentJSON(body)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoutingTable)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteVPCRoutingTable : Delete a VPC routing table
// This request deletes a routing table.  A routing table cannot be deleted if it is associated with any subnets in the
// VPC. Additionally, a VPC's default routing table cannot be deleted. This operation cannot be reversed.
func (vpc *VpcV1) DeleteVPCRoutingTable(deleteVPCRoutingTableOptions *DeleteVPCRoutingTableOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteVPCRoutingTableWithContext(context.Background(), deleteVPCRoutingTableOptions)
}

// DeleteVPCRoutingTableWithContext is an alternate form of the DeleteVPCRoutingTable method which supports a Context parameter
func (vpc *VpcV1) DeleteVPCRoutingTableWithContext(ctx context.Context, deleteVPCRoutingTableOptions *DeleteVPCRoutingTableOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteVPCRoutingTableOptions, "deleteVPCRoutingTableOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteVPCRoutingTableOptions, "deleteVPCRoutingTableOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"vpc_id": *deleteVPCRoutingTableOptions.VPCID,
		"id":     *deleteVPCRoutingTableOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/routing_tables/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteVPCRoutingTableOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteVPCRoutingTable")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetVPCRoutingTable : Retrieve a VPC routing table
// This request retrieves a single routing table specified by the identifier in the URL.
func (vpc *VpcV1) GetVPCRoutingTable(getVPCRoutingTableOptions *GetVPCRoutingTableOptions) (result *RoutingTable, response *core.DetailedResponse, err error) {
	return vpc.GetVPCRoutingTableWithContext(context.Background(), getVPCRoutingTableOptions)
}

// GetVPCRoutingTableWithContext is an alternate form of the GetVPCRoutingTable method which supports a Context parameter
func (vpc *VpcV1) GetVPCRoutingTableWithContext(ctx context.Context, getVPCRoutingTableOptions *GetVPCRoutingTableOptions) (result *RoutingTable, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getVPCRoutingTableOptions, "getVPCRoutingTableOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getVPCRoutingTableOptions, "getVPCRoutingTableOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"vpc_id": *getVPCRoutingTableOptions.VPCID,
		"id":     *getVPCRoutingTableOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/routing_tables/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getVPCRoutingTableOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetVPCRoutingTable")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoutingTable)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateVPCRoutingTable : Update a VPC routing table
// This request updates a routing table with the information in a provided routing table patch. The patch object is
// structured in the same way as a retrieved table and contains only the information to be updated.
func (vpc *VpcV1) UpdateVPCRoutingTable(updateVPCRoutingTableOptions *UpdateVPCRoutingTableOptions) (result *RoutingTable, response *core.DetailedResponse, err error) {
	return vpc.UpdateVPCRoutingTableWithContext(context.Background(), updateVPCRoutingTableOptions)
}

// UpdateVPCRoutingTableWithContext is an alternate form of the UpdateVPCRoutingTable method which supports a Context parameter
func (vpc *VpcV1) UpdateVPCRoutingTableWithContext(ctx context.Context, updateVPCRoutingTableOptions *UpdateVPCRoutingTableOptions) (result *RoutingTable, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateVPCRoutingTableOptions, "updateVPCRoutingTableOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateVPCRoutingTableOptions, "updateVPCRoutingTableOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"vpc_id": *updateVPCRoutingTableOptions.VPCID,
		"id":     *updateVPCRoutingTableOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/routing_tables/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateVPCRoutingTableOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateVPCRoutingTable")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateVPCRoutingTableOptions.RoutingTablePatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoutingTable)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListVPCRoutingTableRoutes : List all routes in a VPC routing table
// This request lists all routes in a VPC routing table. If a subnet has been associated with this routing table,
// delivery of packets sent on a subnet is performed according to the action of the most specific matching route in the
// table (provided the subnet and route are in the same zone). If multiple equally-specific routes exist, traffic will
// be distributed across them. If no routes match, delivery will be controlled by the system's built-in routes.
func (vpc *VpcV1) ListVPCRoutingTableRoutes(listVPCRoutingTableRoutesOptions *ListVPCRoutingTableRoutesOptions) (result *RouteCollection, response *core.DetailedResponse, err error) {
	return vpc.ListVPCRoutingTableRoutesWithContext(context.Background(), listVPCRoutingTableRoutesOptions)
}

// ListVPCRoutingTableRoutesWithContext is an alternate form of the ListVPCRoutingTableRoutes method which supports a Context parameter
func (vpc *VpcV1) ListVPCRoutingTableRoutesWithContext(ctx context.Context, listVPCRoutingTableRoutesOptions *ListVPCRoutingTableRoutesOptions) (result *RouteCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(listVPCRoutingTableRoutesOptions, "listVPCRoutingTableRoutesOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(listVPCRoutingTableRoutesOptions, "listVPCRoutingTableRoutesOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"vpc_id":           *listVPCRoutingTableRoutesOptions.VPCID,
		"routing_table_id": *listVPCRoutingTableRoutesOptions.RoutingTableID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/routing_tables/{routing_table_id}/routes`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range listVPCRoutingTableRoutesOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListVPCRoutingTableRoutes")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listVPCRoutingTableRoutesOptions.Start != nil {
		builder.AddQuery("start", fmt.Sprint(*listVPCRoutingTableRoutesOptions.Start))
	}
	if listVPCRoutingTableRoutesOptions.Limit != nil {
		builder.AddQuery("limit", fmt.Sprint(*listVPCRoutingTableRoutesOptions.Limit))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRouteCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateVPCRoutingTableRoute : Create a route in a VPC routing table
// This request creates a new VPC route from a VPC route prototype object. The prototype object is structured in the
// same way as a retrieved VPC route and contains the information necessary to create the route.
func (vpc *VpcV1) CreateVPCRoutingTableRoute(createVPCRoutingTableRouteOptions *CreateVPCRoutingTableRouteOptions) (result *Route, response *core.DetailedResponse, err error) {
	return vpc.CreateVPCRoutingTableRouteWithContext(context.Background(), createVPCRoutingTableRouteOptions)
}

// CreateVPCRoutingTableRouteWithContext is an alternate form of the CreateVPCRoutingTableRoute method which supports a Context parameter
func (vpc *VpcV1) CreateVPCRoutingTableRouteWithContext(ctx context.Context, createVPCRoutingTableRouteOptions *CreateVPCRoutingTableRouteOptions) (result *Route, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createVPCRoutingTableRouteOptions, "createVPCRoutingTableRouteOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createVPCRoutingTableRouteOptions, "createVPCRoutingTableRouteOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"vpc_id":           *createVPCRoutingTableRouteOptions.VPCID,
		"routing_table_id": *createVPCRoutingTableRouteOptions.RoutingTableID,
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/routing_tables/{routing_table_id}/routes`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range createVPCRoutingTableRouteOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateVPCRoutingTableRoute")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	body := make(map[string]interface{})
	if createVPCRoutingTableRouteOptions.Destination != nil {
		body["destination"] = createVPCRoutingTableRouteOptions.Destination
	}
	if createVPCRoutingTableRouteOptions.Zone != nil {
		body["zone"] = createVPCRoutingTableRouteOptions.Zone
	}
	if createVPCRoutingTableRouteOptions.Action != nil {
		body["action"] = createVPCRoutingTableRouteOptions.Action
	}
	if createVPCRoutingTableRouteOptions.Name != nil {
		body["name"] = createVPCRoutingTableRouteOptions.Name
	}
	if createVPCRoutingTableRouteOptions.NextHop != nil {
		body["next_hop"] = createVPCRoutingTableRouteOptions.NextHop
	}
	_, err = builder.SetBodyContentJSON(body)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoute)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteVPCRoutingTableRoute : Delete a VPC routing table route
// This request deletes a VPC route. This operation cannot be reversed.
func (vpc *VpcV1) DeleteVPCRoutingTableRoute(deleteVPCRoutingTableRouteOptions *DeleteVPCRoutingTableRouteOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteVPCRoutingTableRouteWithContext(context.Background(), deleteVPCRoutingTableRouteOptions)
}

// DeleteVPCRoutingTableRouteWithContext is an alternate form of the DeleteVPCRoutingTableRoute method which supports a Context parameter
func (vpc *VpcV1) DeleteVPCRoutingTableRouteWithContext(ctx context.Context, deleteVPCRoutingTableRouteOptions *DeleteVPCRoutingTableRouteOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteVPCRoutingTableRouteOptions, "deleteVPCRoutingTableRouteOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteVPCRoutingTableRouteOptions, "deleteVPCRoutingTableRouteOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"vpc_id":           *deleteVPCRoutingTableRouteOptions.VPCID,
		"routing_table_id": *deleteVPCRoutingTableRouteOptions.RoutingTableID,
		"id":               *deleteVPCRoutingTableRouteOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/routing_tables/{routing_table_id}/routes/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteVPCRoutingTableRouteOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteVPCRoutingTableRoute")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetVPCRoutingTableRoute : Retrieve a VPC routing table route
// This request retrieves a single VPC route specified by the identifier in the URL path.
func (vpc *VpcV1) GetVPCRoutingTableRoute(getVPCRoutingTableRouteOptions *GetVPCRoutingTableRouteOptions) (result *Route, response *core.DetailedResponse, err error) {
	return vpc.GetVPCRoutingTableRouteWithContext(context.Background(), getVPCRoutingTableRouteOptions)
}

// GetVPCRoutingTableRouteWithContext is an alternate form of the GetVPCRoutingTableRoute method which supports a Context parameter
func (vpc *VpcV1) GetVPCRoutingTableRouteWithContext(ctx context.Context, getVPCRoutingTableRouteOptions *GetVPCRoutingTableRouteOptions) (result *Route, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getVPCRoutingTableRouteOptions, "getVPCRoutingTableRouteOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getVPCRoutingTableRouteOptions, "getVPCRoutingTableRouteOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"vpc_id":           *getVPCRoutingTableRouteOptions.VPCID,
		"routing_table_id": *getVPCRoutingTableRouteOptions.RoutingTableID,
		"id":               *getVPCRoutingTableRouteOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/routing_tables/{routing_table_id}/routes/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getVPCRoutingTableRouteOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetVPCRoutingTableRoute")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoute)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateVPCRoutingTableRoute : Update a VPC routing table route
// This request updates a VPC route with the information provided in a route patch object. The patch object is
// structured in the same way as a retrieved VPC route and needs to contain only the information to be updated.
func (vpc *VpcV1) UpdateVPCRoutingTableRoute(updateVPCRoutingTableRouteOptions *UpdateVPCRoutingTableRouteOptions) (result *Route, response *core.DetailedResponse, err error) {
	return vpc.UpdateVPCRoutingTableRouteWithContext(context.Background(), updateVPCRoutingTableRouteOptions)
}

// UpdateVPCRoutingTableRouteWithContext is an alternate form of the UpdateVPCRoutingTableRoute method which supports a Context parameter
func (vpc *VpcV1) UpdateVPCRoutingTableRouteWithContext(ctx context.Context, updateVPCRoutingTableRouteOptions *UpdateVPCRoutingTableRouteOptions) (result *Route, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateVPCRoutingTableRouteOptions, "updateVPCRoutingTableRouteOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateVPCRoutingTableRouteOptions, "updateVPCRoutingTableRouteOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"vpc_id":           *updateVPCRoutingTableRouteOptions.VPCID,
		"routing_table_id": *updateVPCRoutingTableRouteOptions.RoutingTableID,
		"id":               *updateVPCRoutingTableRouteOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/routing_tables/{routing_table_id}/routes/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateVPCRoutingTableRouteOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateVPCRoutingTableRoute")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateVPCRoutingTableRouteOptions.RoutePatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoute)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListSubnets : List all subnets
// This request lists all subnets in the region. Subnets are contiguous ranges of IP addresses specified in CIDR block
// notation. Each subnet is within a particular zone and cannot span multiple zones or regions.
func (vpc *VpcV1) ListSubnets(listSubnetsOptions *ListSubnetsOptions) (result *SubnetCollection, response *core.DetailedResponse, err error) {
	return vpc.ListSubnetsWithContext(context.Background(), listSubnetsOptions)
}

// ListSubnetsWithContext is an alternate form of the ListSubnets method which supports a Context parameter
func (vpc *VpcV1) ListSubnetsWithContext(ctx context.Context, listSubnetsOptions *ListSubnetsOptions) (result *SubnetCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateStruct(listSubnetsOptions, "listSubnetsOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range listSubnetsOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListSubnets")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listSubnetsOptions.Start != nil {
		builder.AddQuery("start", fmt.Sprint(*listSubnetsOptions.Start))
	}
	if listSubnetsOptions.Limit != nil {
		builder.AddQuery("limit", fmt.Sprint(*listSubnetsOptions.Limit))
	}
	if listSubnetsOptions.ResourceGroupID != nil {
		builder.AddQuery("resource_group.id", fmt.Sprint(*listSubnetsOptions.ResourceGroupID))
	}
	if listSubnetsOptions.RoutingTableID != nil {
		builder.AddQuery("routing_table.id", fmt.Sprint(*listSubnetsOptions.RoutingTableID))
	}
	if listSubnetsOptions.RoutingTableName != nil {
		builder.AddQuery("routing_table.name", fmt.Sprint(*listSubnetsOptions.RoutingTableName))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSubnetCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateSubnet : Create a subnet
// This request creates a new subnet from a subnet prototype object. The prototype object is structured in the same way
// as a retrieved subnet, and contains the information necessary to create the new subnet. For this request to succeed,
// the prototype's CIDR block must not overlap with an existing subnet in the VPC.
func (vpc *VpcV1) CreateSubnet(createSubnetOptions *CreateSubnetOptions) (result *Subnet, response *core.DetailedResponse, err error) {
	return vpc.CreateSubnetWithContext(context.Background(), createSubnetOptions)
}

// CreateSubnetWithContext is an alternate form of the CreateSubnet method which supports a Context parameter
func (vpc *VpcV1) CreateSubnetWithContext(ctx context.Context, createSubnetOptions *CreateSubnetOptions) (result *Subnet, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createSubnetOptions, "createSubnetOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createSubnetOptions, "createSubnetOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range createSubnetOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateSubnet")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(createSubnetOptions.SubnetPrototype)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSubnet)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteSubnet : Delete a subnet
// This request deletes a subnet. This operation cannot be reversed. For this request to succeed, the subnet must not be
// referenced by any network interfaces, VPN gateways, or load balancers. A delete operation automatically detaches the
// subnet from any network ACLs, public gateways, or endpoint gateways. All flow log collectors with `auto_delete` set
// to `true` targeting the subnet or any resource in the subnet are automatically deleted.
func (vpc *VpcV1) DeleteSubnet(deleteSubnetOptions *DeleteSubnetOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteSubnetWithContext(context.Background(), deleteSubnetOptions)
}

// DeleteSubnetWithContext is an alternate form of the DeleteSubnet method which supports a Context parameter
func (vpc *VpcV1) DeleteSubnetWithContext(ctx context.Context, deleteSubnetOptions *DeleteSubnetOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteSubnetOptions, "deleteSubnetOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteSubnetOptions, "deleteSubnetOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *deleteSubnetOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteSubnetOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteSubnet")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetSubnet : Retrieve a subnet
// This request retrieves a single subnet specified by the identifier in the URL.
func (vpc *VpcV1) GetSubnet(getSubnetOptions *GetSubnetOptions) (result *Subnet, response *core.DetailedResponse, err error) {
	return vpc.GetSubnetWithContext(context.Background(), getSubnetOptions)
}

// GetSubnetWithContext is an alternate form of the GetSubnet method which supports a Context parameter
func (vpc *VpcV1) GetSubnetWithContext(ctx context.Context, getSubnetOptions *GetSubnetOptions) (result *Subnet, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getSubnetOptions, "getSubnetOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getSubnetOptions, "getSubnetOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *getSubnetOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getSubnetOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetSubnet")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSubnet)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateSubnet : Update a subnet
// This request updates a subnet with the information in a provided subnet patch. The subnet patch object is structured
// in the same way as a retrieved subnet and contains only the information to be updated.
func (vpc *VpcV1) UpdateSubnet(updateSubnetOptions *UpdateSubnetOptions) (result *Subnet, response *core.DetailedResponse, err error) {
	return vpc.UpdateSubnetWithContext(context.Background(), updateSubnetOptions)
}

// UpdateSubnetWithContext is an alternate form of the UpdateSubnet method which supports a Context parameter
func (vpc *VpcV1) UpdateSubnetWithContext(ctx context.Context, updateSubnetOptions *UpdateSubnetOptions) (result *Subnet, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateSubnetOptions, "updateSubnetOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateSubnetOptions, "updateSubnetOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *updateSubnetOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateSubnetOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateSubnet")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateSubnetOptions.SubnetPatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSubnet)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// GetSubnetNetworkACL : Retrieve a subnet's attached network ACL
// This request retrieves the network ACL attached to the subnet specified by the identifier in the URL.
func (vpc *VpcV1) GetSubnetNetworkACL(getSubnetNetworkACLOptions *GetSubnetNetworkACLOptions) (result *NetworkACL, response *core.DetailedResponse, err error) {
	return vpc.GetSubnetNetworkACLWithContext(context.Background(), getSubnetNetworkACLOptions)
}

// GetSubnetNetworkACLWithContext is an alternate form of the GetSubnetNetworkACL method which supports a Context parameter
func (vpc *VpcV1) GetSubnetNetworkACLWithContext(ctx context.Context, getSubnetNetworkACLOptions *GetSubnetNetworkACLOptions) (result *NetworkACL, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getSubnetNetworkACLOptions, "getSubnetNetworkACLOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getSubnetNetworkACLOptions, "getSubnetNetworkACLOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *getSubnetNetworkACLOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{id}/network_acl`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getSubnetNetworkACLOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetSubnetNetworkACL")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACL)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ReplaceSubnetNetworkACL : Attach a network ACL to a subnet
// This request attaches the network ACL, specified in the request body, to the subnet specified by the subnet
// identifier in the URL. This replaces the existing network ACL on the subnet.
func (vpc *VpcV1) ReplaceSubnetNetworkACL(replaceSubnetNetworkACLOptions *ReplaceSubnetNetworkACLOptions) (result *NetworkACL, response *core.DetailedResponse, err error) {
	return vpc.ReplaceSubnetNetworkACLWithContext(context.Background(), replaceSubnetNetworkACLOptions)
}

// ReplaceSubnetNetworkACLWithContext is an alternate form of the ReplaceSubnetNetworkACL method which supports a Context parameter
func (vpc *VpcV1) ReplaceSubnetNetworkACLWithContext(ctx context.Context, replaceSubnetNetworkACLOptions *ReplaceSubnetNetworkACLOptions) (result *NetworkACL, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(replaceSubnetNetworkACLOptions, "replaceSubnetNetworkACLOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(replaceSubnetNetworkACLOptions, "replaceSubnetNetworkACLOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *replaceSubnetNetworkACLOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PUT)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{id}/network_acl`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range replaceSubnetNetworkACLOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ReplaceSubnetNetworkACL")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(replaceSubnetNetworkACLOptions.NetworkACLIdentity)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACL)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UnsetSubnetPublicGateway : Detach a public gateway from a subnet
// This request detaches the public gateway from the subnet specified by the subnet identifier in the URL.
func (vpc *VpcV1) UnsetSubnetPublicGateway(unsetSubnetPublicGatewayOptions *UnsetSubnetPublicGatewayOptions) (response *core.DetailedResponse, err error) {
	return vpc.UnsetSubnetPublicGatewayWithContext(context.Background(), unsetSubnetPublicGatewayOptions)
}

// UnsetSubnetPublicGatewayWithContext is an alternate form of the UnsetSubnetPublicGateway method which supports a Context parameter
func (vpc *VpcV1) UnsetSubnetPublicGatewayWithContext(ctx context.Context, unsetSubnetPublicGatewayOptions *UnsetSubnetPublicGatewayOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(unsetSubnetPublicGatewayOptions, "unsetSubnetPublicGatewayOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(unsetSubnetPublicGatewayOptions, "unsetSubnetPublicGatewayOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *unsetSubnetPublicGatewayOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{id}/public_gateway`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range unsetSubnetPublicGatewayOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UnsetSubnetPublicGateway")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetSubnetPublicGateway : Retrieve a subnet's attached public gateway
// This request retrieves the public gateway attached to the subnet specified by the identifier in the URL.
func (vpc *VpcV1) GetSubnetPublicGateway(getSubnetPublicGatewayOptions *GetSubnetPublicGatewayOptions) (result *PublicGateway, response *core.DetailedResponse, err error) {
	return vpc.GetSubnetPublicGatewayWithContext(context.Background(), getSubnetPublicGatewayOptions)
}

// GetSubnetPublicGatewayWithContext is an alternate form of the GetSubnetPublicGateway method which supports a Context parameter
func (vpc *VpcV1) GetSubnetPublicGatewayWithContext(ctx context.Context, getSubnetPublicGatewayOptions *GetSubnetPublicGatewayOptions) (result *PublicGateway, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getSubnetPublicGatewayOptions, "getSubnetPublicGatewayOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getSubnetPublicGatewayOptions, "getSubnetPublicGatewayOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *getSubnetPublicGatewayOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{id}/public_gateway`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getSubnetPublicGatewayOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetSubnetPublicGateway")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPublicGateway)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// SetSubnetPublicGateway : Attach a public gateway to a subnet
// This request attaches the public gateway, specified in the request body, to the subnet specified by the subnet
// identifier in the URL. The public gateway must have the same VPC and zone as the subnet.
func (vpc *VpcV1) SetSubnetPublicGateway(setSubnetPublicGatewayOptions *SetSubnetPublicGatewayOptions) (result *PublicGateway, response *core.DetailedResponse, err error) {
	return vpc.SetSubnetPublicGatewayWithContext(context.Background(), setSubnetPublicGatewayOptions)
}

// SetSubnetPublicGatewayWithContext is an alternate form of the SetSubnetPublicGateway method which supports a Context parameter
func (vpc *VpcV1) SetSubnetPublicGatewayWithContext(ctx context.Context, setSubnetPublicGatewayOptions *SetSubnetPublicGatewayOptions) (result *PublicGateway, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(setSubnetPublicGatewayOptions, "setSubnetPublicGatewayOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(setSubnetPublicGatewayOptions, "setSubnetPublicGatewayOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *setSubnetPublicGatewayOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PUT)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{id}/public_gateway`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range setSubnetPublicGatewayOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "SetSubnetPublicGateway")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(setSubnetPublicGatewayOptions.PublicGatewayIdentity)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPublicGateway)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// GetSubnetRoutingTable : Retrieve a subnet's attached routing table
// This request retrieves the routing table attached to the subnet specified by the identifier in the URL.
func (vpc *VpcV1) GetSubnetRoutingTable(getSubnetRoutingTableOptions *GetSubnetRoutingTableOptions) (result *RoutingTable, response *core.DetailedResponse, err error) {
	return vpc.GetSubnetRoutingTableWithContext(context.Background(), getSubnetRoutingTableOptions)
}

// GetSubnetRoutingTableWithContext is an alternate form of the GetSubnetRoutingTable method which supports a Context parameter
func (vpc *VpcV1) GetSubnetRoutingTableWithContext(ctx context.Context, getSubnetRoutingTableOptions *GetSubnetRoutingTableOptions) (result *RoutingTable, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getSubnetRoutingTableOptions, "getSubnetRoutingTableOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getSubnetRoutingTableOptions, "getSubnetRoutingTableOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *getSubnetRoutingTableOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{id}/routing_table`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getSubnetRoutingTableOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetSubnetRoutingTable")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoutingTable)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ReplaceSubnetRoutingTable : Attach a routing table to a subnet
// This request attaches the routing table, specified in the request body, to the subnet specified by the subnet
// identifier in the URL. This replaces the existing routing table on the subnet.
//
// For this request to succeed, the routing table `route_direct_link_ingress`,
// `route_transit_gateway_ingress`, and `route_vpc_zone_ingress` properties must be `false`.
func (vpc *VpcV1) ReplaceSubnetRoutingTable(replaceSubnetRoutingTableOptions *ReplaceSubnetRoutingTableOptions) (result *RoutingTable, response *core.DetailedResponse, err error) {
	return vpc.ReplaceSubnetRoutingTableWithContext(context.Background(), replaceSubnetRoutingTableOptions)
}

// ReplaceSubnetRoutingTableWithContext is an alternate form of the ReplaceSubnetRoutingTable method which supports a Context parameter
func (vpc *VpcV1) ReplaceSubnetRoutingTableWithContext(ctx context.Context, replaceSubnetRoutingTableOptions *ReplaceSubnetRoutingTableOptions) (result *RoutingTable, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(replaceSubnetRoutingTableOptions, "replaceSubnetRoutingTableOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(replaceSubnetRoutingTableOptions, "replaceSubnetRoutingTableOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *replaceSubnetRoutingTableOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PUT)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{id}/routing_table`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range replaceSubnetRoutingTableOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ReplaceSubnetRoutingTable")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(replaceSubnetRoutingTableOptions.RoutingTableIdentity)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRoutingTable)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListSubnetReservedIps : List all reserved IPs in a subnet
// This request lists reserved IPs in a subnet that are unbound or bound to an endpoint gateway.
func (vpc *VpcV1) ListSubnetReservedIps(listSubnetReservedIpsOptions *ListSubnetReservedIpsOptions) (result *ReservedIPCollection, response *core.DetailedResponse, err error) {
	return vpc.ListSubnetReservedIpsWithContext(context.Background(), listSubnetReservedIpsOptions)
}

// ListSubnetReservedIpsWithContext is an alternate form of the ListSubnetReservedIps method which supports a Context parameter
func (vpc *VpcV1) ListSubnetReservedIpsWithContext(ctx context.Context, listSubnetReservedIpsOptions *ListSubnetReservedIpsOptions) (result *ReservedIPCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(listSubnetReservedIpsOptions, "listSubnetReservedIpsOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(listSubnetReservedIpsOptions, "listSubnetReservedIpsOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"subnet_id": *listSubnetReservedIpsOptions.SubnetID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{subnet_id}/reserved_ips`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range listSubnetReservedIpsOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListSubnetReservedIps")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listSubnetReservedIpsOptions.Start != nil {
		builder.AddQuery("start", fmt.Sprint(*listSubnetReservedIpsOptions.Start))
	}
	if listSubnetReservedIpsOptions.Limit != nil {
		builder.AddQuery("limit", fmt.Sprint(*listSubnetReservedIpsOptions.Limit))
	}
	if listSubnetReservedIpsOptions.Sort != nil {
		builder.AddQuery("sort", fmt.Sprint(*listSubnetReservedIpsOptions.Sort))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIPCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateSubnetReservedIP : Reserve an IP in a subnet
// This request reserves a system-selected IP address in a subnet.
func (vpc *VpcV1) CreateSubnetReservedIP(createSubnetReservedIPOptions *CreateSubnetReservedIPOptions) (result *ReservedIP, response *core.DetailedResponse, err error) {
	return vpc.CreateSubnetReservedIPWithContext(context.Background(), createSubnetReservedIPOptions)
}

// CreateSubnetReservedIPWithContext is an alternate form of the CreateSubnetReservedIP method which supports a Context parameter
func (vpc *VpcV1) CreateSubnetReservedIPWithContext(ctx context.Context, createSubnetReservedIPOptions *CreateSubnetReservedIPOptions) (result *ReservedIP, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createSubnetReservedIPOptions, "createSubnetReservedIPOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createSubnetReservedIPOptions, "createSubnetReservedIPOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"subnet_id": *createSubnetReservedIPOptions.SubnetID,
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{subnet_id}/reserved_ips`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range createSubnetReservedIPOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateSubnetReservedIP")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	body := make(map[string]interface{})
	if createSubnetReservedIPOptions.AutoDelete != nil {
		body["auto_delete"] = createSubnetReservedIPOptions.AutoDelete
	}
	if createSubnetReservedIPOptions.Name != nil {
		body["name"] = createSubnetReservedIPOptions.Name
	}
	if createSubnetReservedIPOptions.Target != nil {
		body["target"] = createSubnetReservedIPOptions.Target
	}
	_, err = builder.SetBodyContentJSON(body)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIP)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteSubnetReservedIP : Release a reserved IP
// This request releases a reserved IP. This operation cannot be reversed.
func (vpc *VpcV1) DeleteSubnetReservedIP(deleteSubnetReservedIPOptions *DeleteSubnetReservedIPOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteSubnetReservedIPWithContext(context.Background(), deleteSubnetReservedIPOptions)
}

// DeleteSubnetReservedIPWithContext is an alternate form of the DeleteSubnetReservedIP method which supports a Context parameter
func (vpc *VpcV1) DeleteSubnetReservedIPWithContext(ctx context.Context, deleteSubnetReservedIPOptions *DeleteSubnetReservedIPOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteSubnetReservedIPOptions, "deleteSubnetReservedIPOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteSubnetReservedIPOptions, "deleteSubnetReservedIPOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"subnet_id": *deleteSubnetReservedIPOptions.SubnetID,
		"id":        *deleteSubnetReservedIPOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{subnet_id}/reserved_ips/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteSubnetReservedIPOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteSubnetReservedIP")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetSubnetReservedIP : Retrieve a reserved IP
// This request retrieves a single reserved IP specified by the identifier in the URL.
func (vpc *VpcV1) GetSubnetReservedIP(getSubnetReservedIPOptions *GetSubnetReservedIPOptions) (result *ReservedIP, response *core.DetailedResponse, err error) {
	return vpc.GetSubnetReservedIPWithContext(context.Background(), getSubnetReservedIPOptions)
}

// GetSubnetReservedIPWithContext is an alternate form of the GetSubnetReservedIP method which supports a Context parameter
func (vpc *VpcV1) GetSubnetReservedIPWithContext(ctx context.Context, getSubnetReservedIPOptions *GetSubnetReservedIPOptions) (result *ReservedIP, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getSubnetReservedIPOptions, "getSubnetReservedIPOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getSubnetReservedIPOptions, "getSubnetReservedIPOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"subnet_id": *getSubnetReservedIPOptions.SubnetID,
		"id":        *getSubnetReservedIPOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{subnet_id}/reserved_ips/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getSubnetReservedIPOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetSubnetReservedIP")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIP)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateSubnetReservedIP : Update a reserved IP
// This request updates a reserved IP with the information in a provided reserved IP patch. The reserved IP patch object
// is structured in the same way as a retrieved reserved IP and contains only the information to be updated.
func (vpc *VpcV1) UpdateSubnetReservedIP(updateSubnetReservedIPOptions *UpdateSubnetReservedIPOptions) (result *ReservedIP, response *core.DetailedResponse, err error) {
	return vpc.UpdateSubnetReservedIPWithContext(context.Background(), updateSubnetReservedIPOptions)
}

// UpdateSubnetReservedIPWithContext is an alternate form of the UpdateSubnetReservedIP method which supports a Context parameter
func (vpc *VpcV1) UpdateSubnetReservedIPWithContext(ctx context.Context, updateSubnetReservedIPOptions *UpdateSubnetReservedIPOptions) (result *ReservedIP, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateSubnetReservedIPOptions, "updateSubnetReservedIPOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateSubnetReservedIPOptions, "updateSubnetReservedIPOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"subnet_id": *updateSubnetReservedIPOptions.SubnetID,
		"id":        *updateSubnetReservedIPOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{subnet_id}/reserved_ips/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateSubnetReservedIPOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateSubnetReservedIP")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateSubnetReservedIPOptions.ReservedIPPatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIP)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListImages : List all images
// This request lists all provisionable images available in the region. An image provides source data for a volume.
// Images are either system-provided, or created from another source, such as importing from object storage.
//
// The images will be sorted by their `created_at` property values, with the newest first. Images with identical
// `created_at` values will be secondarily sorted by ascending `id` property values.
func (vpc *VpcV1) ListImages(listImagesOptions *ListImagesOptions) (result *ImageCollection, response *core.DetailedResponse, err error) {
	return vpc.ListImagesWithContext(context.Background(), listImagesOptions)
}

// ListImagesWithContext is an alternate form of the ListImages method which supports a Context parameter
func (vpc *VpcV1) ListImagesWithContext(ctx context.Context, listImagesOptions *ListImagesOptions) (result *ImageCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateStruct(listImagesOptions, "listImagesOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/images`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range listImagesOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListImages")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listImagesOptions.Start != nil {
		builder.AddQuery("start", fmt.Sprint(*listImagesOptions.Start))
	}
	if listImagesOptions.Limit != nil {
		builder.AddQuery("limit", fmt.Sprint(*listImagesOptions.Limit))
	}
	if listImagesOptions.ResourceGroupID != nil {
		builder.AddQuery("resource_group.id", fmt.Sprint(*listImagesOptions.ResourceGroupID))
	}
	if listImagesOptions.Name != nil {
		builder.AddQuery("name", fmt.Sprint(*listImagesOptions.Name))
	}
	if listImagesOptions.Visibility != nil {
		builder.AddQuery("visibility", fmt.Sprint(*listImagesOptions.Visibility))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalImageCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateImage : Create an image
// This request creates a new image from an image prototype object. The prototype object is structured in the same way
// as a retrieved image, and contains the information necessary to create the new image. A URL to the image file on
// object storage must be provided.
func (vpc *VpcV1) CreateImage(createImageOptions *CreateImageOptions) (result *Image, response *core.DetailedResponse, err error) {
	return vpc.CreateImageWithContext(context.Background(), createImageOptions)
}

// CreateImageWithContext is an alternate form of the CreateImage method which supports a Context parameter
func (vpc *VpcV1) CreateImageWithContext(ctx context.Context, createImageOptions *CreateImageOptions) (result *Image, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createImageOptions, "createImageOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createImageOptions, "createImageOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/images`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range createImageOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateImage")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(createImageOptions.ImagePrototype)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalImage)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteImage : Delete an image
// This request deletes an image. This operation cannot be reversed. A system-provided image is not allowed to be
// deleted. Additionally, an image cannot be deleted if it has a
// `status` of `pending`, `tentative`, or `deleting`.
func (vpc *VpcV1) DeleteImage(deleteImageOptions *DeleteImageOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteImageWithContext(context.Background(), deleteImageOptions)
}

// DeleteImageWithContext is an alternate form of the DeleteImage method which supports a Context parameter
func (vpc *VpcV1) DeleteImageWithContext(ctx context.Context, deleteImageOptions *DeleteImageOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteImageOptions, "deleteImageOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteImageOptions, "deleteImageOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *deleteImageOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/images/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteImageOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteImage")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetImage : Retrieve an image
// This request retrieves a single image specified by the identifier in the URL.
func (vpc *VpcV1) GetImage(getImageOptions *GetImageOptions) (result *Image, response *core.DetailedResponse, err error) {
	return vpc.GetImageWithContext(context.Background(), getImageOptions)
}

// GetImageWithContext is an alternate form of the GetImage method which supports a Context parameter
func (vpc *VpcV1) GetImageWithContext(ctx context.Context, getImageOptions *GetImageOptions) (result *Image, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getImageOptions, "getImageOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getImageOptions, "getImageOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *getImageOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/images/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getImageOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetImage")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalImage)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateImage : Update an image
// This request updates an image with the information in a provided image patch. The image patch object is structured in
// the same way as a retrieved image and contains only the information to be updated. A system-provided image is not
// allowed to be updated. An image with a `status` of `deleting` cannot be updated.
func (vpc *VpcV1) UpdateImage(updateImageOptions *UpdateImageOptions) (result *Image, response *core.DetailedResponse, err error) {
	return vpc.UpdateImageWithContext(context.Background(), updateImageOptions)
}

// UpdateImageWithContext is an alternate form of the UpdateImage method which supports a Context parameter
func (vpc *VpcV1) UpdateImageWithContext(ctx context.Context, updateImageOptions *UpdateImageOptions) (result *Image, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateImageOptions, "updateImageOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateImageOptions, "updateImageOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *updateImageOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/images/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateImageOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateImage")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateImageOptions.ImagePatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalImage)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListOperatingSystems : List all operating systems
// This request lists all operating systems in the region.
func (vpc *VpcV1) ListOperatingSystems(listOperatingSystemsOptions *ListOperatingSystemsOptions) (result *OperatingSystemCollection, response *core.DetailedResponse, err error) {
	return vpc.ListOperatingSystemsWithContext(context.Background(), listOperatingSystemsOptions)
}

// ListOperatingSystemsWithContext is an alternate form of the ListOperatingSystems method which supports a Context parameter
func (vpc *VpcV1) ListOperatingSystemsWithContext(ctx context.Context, listOperatingSystemsOptions *ListOperatingSystemsOptions) (result *OperatingSystemCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateStruct(listOperatingSystemsOptions, "listOperatingSystemsOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/operating_systems`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range listOperatingSystemsOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListOperatingSystems")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listOperatingSystemsOptions.Start != nil {
		builder.AddQuery("start", fmt.Sprint(*listOperatingSystemsOptions.Start))
	}
	if listOperatingSystemsOptions.Limit != nil {
		builder.AddQuery("limit", fmt.Sprint(*listOperatingSystemsOptions.Limit))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalOperatingSystemCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// GetOperatingSystem : Retrieve an operating system
// This request retrieves a single operating system specified by the name in the URL.
func (vpc *VpcV1) GetOperatingSystem(getOperatingSystemOptions *GetOperatingSystemOptions) (result *OperatingSystem, response *core.DetailedResponse, err error) {
	return vpc.GetOperatingSystemWithContext(context.Background(), getOperatingSystemOptions)
}

// GetOperatingSystemWithContext is an alternate form of the GetOperatingSystem method which supports a Context parameter
func (vpc *VpcV1) GetOperatingSystemWithContext(ctx context.Context, getOperatingSystemOptions *GetOperatingSystemOptions) (result *OperatingSystem, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getOperatingSystemOptions, "getOperatingSystemOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getOperatingSystemOptions, "getOperatingSystemOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"name": *getOperatingSystemOptions.Name,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/operating_systems/{name}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getOperatingSystemOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetOperatingSystem")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalOperatingSystem)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListKeys : List all keys
// This request lists all keys in the region. A key contains a public SSH key which may be installed on instances when
// they are created. Private keys are not stored.
func (vpc *VpcV1) ListKeys(listKeysOptions *ListKeysOptions) (result *KeyCollection, response *core.DetailedResponse, err error) {
	return vpc.ListKeysWithContext(context.Background(), listKeysOptions)
}

// ListKeysWithContext is an alternate form of the ListKeys method which supports a Context parameter
func (vpc *VpcV1) ListKeysWithContext(ctx context.Context, listKeysOptions *ListKeysOptions) (result *KeyCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateStruct(listKeysOptions, "listKeysOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/keys`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range listKeysOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListKeys")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listKeysOptions.ResourceGroupID != nil {
		builder.AddQuery("resource_group.id", fmt.Sprint(*listKeysOptions.ResourceGroupID))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalKeyCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateKey : Create a key
// This request creates a new SSH key from an key prototype object. The prototype object is structured in the same way
// as a retrieved key, and contains the information necessary to create the new key. The public key value must be
// provided.
func (vpc *VpcV1) CreateKey(createKeyOptions *CreateKeyOptions) (result *Key, response *core.DetailedResponse, err error) {
	return vpc.CreateKeyWithContext(context.Background(), createKeyOptions)
}

// CreateKeyWithContext is an alternate form of the CreateKey method which supports a Context parameter
func (vpc *VpcV1) CreateKeyWithContext(ctx context.Context, createKeyOptions *CreateKeyOptions) (result *Key, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createKeyOptions, "createKeyOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createKeyOptions, "createKeyOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/keys`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range createKeyOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateKey")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	body := make(map[string]interface{})
	if createKeyOptions.PublicKey != nil {
		body["public_key"] = createKeyOptions.PublicKey
	}
	if createKeyOptions.Name != nil {
		body["name"] = createKeyOptions.Name
	}
	if createKeyOptions.ResourceGroup != nil {
		body["resource_group"] = createKeyOptions.ResourceGroup
	}
	if createKeyOptions.Type != nil {
		body["type"] = createKeyOptions.Type
	}
	_, err = builder.SetBodyContentJSON(body)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalKey)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteKey : Delete a key
// This request deletes a key. This operation cannot be reversed.
func (vpc *VpcV1) DeleteKey(deleteKeyOptions *DeleteKeyOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteKeyWithContext(context.Background(), deleteKeyOptions)
}

// DeleteKeyWithContext is an alternate form of the DeleteKey method which supports a Context parameter
func (vpc *VpcV1) DeleteKeyWithContext(ctx context.Context, deleteKeyOptions *DeleteKeyOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteKeyOptions, "deleteKeyOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteKeyOptions, "deleteKeyOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *deleteKeyOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/keys/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteKeyOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteKey")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetKey : Retrieve a key
// This request retrieves a single key specified by the identifier in the URL.
func (vpc *VpcV1) GetKey(getKeyOptions *GetKeyOptions) (result *Key, response *core.DetailedResponse, err error) {
	return vpc.GetKeyWithContext(context.Background(), getKeyOptions)
}

// GetKeyWithContext is an alternate form of the GetKey method which supports a Context parameter
func (vpc *VpcV1) GetKeyWithContext(ctx context.Context, getKeyOptions *GetKeyOptions) (result *Key, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getKeyOptions, "getKeyOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getKeyOptions, "getKeyOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *getKeyOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/keys/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getKeyOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetKey")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalKey)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateKey : Update a key
// This request updates a key's name.
func (vpc *VpcV1) UpdateKey(updateKeyOptions *UpdateKeyOptions) (result *Key, response *core.DetailedResponse, err error) {
	return vpc.UpdateKeyWithContext(context.Background(), updateKeyOptions)
}

// UpdateKeyWithContext is an alternate form of the UpdateKey method which supports a Context parameter
func (vpc *VpcV1) UpdateKeyWithContext(ctx context.Context, updateKeyOptions *UpdateKeyOptions) (result *Key, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateKeyOptions, "updateKeyOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateKeyOptions, "updateKeyOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *updateKeyOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/keys/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateKeyOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateKey")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateKeyOptions.KeyPatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalKey)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListInstanceProfiles : List all instance profiles
// This request lists provisionable instance profiles in the region. An instance profile specifies the performance
// characteristics and pricing model for an instance.
func (vpc *VpcV1) ListInstanceProfiles(listInstanceProfilesOptions *ListInstanceProfilesOptions) (result *InstanceProfileCollection, response *core.DetailedResponse, err error) {
	return vpc.ListInstanceProfilesWithContext(context.Background(), listInstanceProfilesOptions)
}

// ListInstanceProfilesWithContext is an alternate form of the ListInstanceProfiles method which supports a Context parameter
func (vpc *VpcV1) ListInstanceProfilesWithContext(ctx context.Context, listInstanceProfilesOptions *ListInstanceProfilesOptions) (result *InstanceProfileCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateStruct(listInstanceProfilesOptions, "listInstanceProfilesOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance/profiles`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range listInstanceProfilesOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListInstanceProfiles")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceProfileCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// GetInstanceProfile : Retrieve an instance profile
// This request retrieves a single instance profile specified by the name in the URL.
func (vpc *VpcV1) GetInstanceProfile(getInstanceProfileOptions *GetInstanceProfileOptions) (result *InstanceProfile, response *core.DetailedResponse, err error) {
	return vpc.GetInstanceProfileWithContext(context.Background(), getInstanceProfileOptions)
}

// GetInstanceProfileWithContext is an alternate form of the GetInstanceProfile method which supports a Context parameter
func (vpc *VpcV1) GetInstanceProfileWithContext(ctx context.Context, getInstanceProfileOptions *GetInstanceProfileOptions) (result *InstanceProfile, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getInstanceProfileOptions, "getInstanceProfileOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getInstanceProfileOptions, "getInstanceProfileOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"name": *getInstanceProfileOptions.Name,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance/profiles/{name}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getInstanceProfileOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetInstanceProfile")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceProfile)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListInstanceTemplates : List all instance templates
// This request lists all instance templates in the region.
func (vpc *VpcV1) ListInstanceTemplates(listInstanceTemplatesOptions *ListInstanceTemplatesOptions) (result *InstanceTemplateCollection, response *core.DetailedResponse, err error) {
	return vpc.ListInstanceTemplatesWithContext(context.Background(), listInstanceTemplatesOptions)
}

// ListInstanceTemplatesWithContext is an alternate form of the ListInstanceTemplates method which supports a Context parameter
func (vpc *VpcV1) ListInstanceTemplatesWithContext(ctx context.Context, listInstanceTemplatesOptions *ListInstanceTemplatesOptions) (result *InstanceTemplateCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateStruct(listInstanceTemplatesOptions, "listInstanceTemplatesOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance/templates`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range listInstanceTemplatesOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListInstanceTemplates")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceTemplateCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateInstanceTemplate : Create an instance template
// This request creates a new instance template.
func (vpc *VpcV1) CreateInstanceTemplate(createInstanceTemplateOptions *CreateInstanceTemplateOptions) (result InstanceTemplateIntf, response *core.DetailedResponse, err error) {
	return vpc.CreateInstanceTemplateWithContext(context.Background(), createInstanceTemplateOptions)
}

// CreateInstanceTemplateWithContext is an alternate form of the CreateInstanceTemplate method which supports a Context parameter
func (vpc *VpcV1) CreateInstanceTemplateWithContext(ctx context.Context, createInstanceTemplateOptions *CreateInstanceTemplateOptions) (result InstanceTemplateIntf, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createInstanceTemplateOptions, "createInstanceTemplateOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createInstanceTemplateOptions, "createInstanceTemplateOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance/templates`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range createInstanceTemplateOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateInstanceTemplate")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(createInstanceTemplateOptions.InstanceTemplatePrototype)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceTemplate)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteInstanceTemplate : Delete an instance template
// This request deletes the instance template. This operation cannot be reversed.
func (vpc *VpcV1) DeleteInstanceTemplate(deleteInstanceTemplateOptions *DeleteInstanceTemplateOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteInstanceTemplateWithContext(context.Background(), deleteInstanceTemplateOptions)
}

// DeleteInstanceTemplateWithContext is an alternate form of the DeleteInstanceTemplate method which supports a Context parameter
func (vpc *VpcV1) DeleteInstanceTemplateWithContext(ctx context.Context, deleteInstanceTemplateOptions *DeleteInstanceTemplateOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteInstanceTemplateOptions, "deleteInstanceTemplateOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteInstanceTemplateOptions, "deleteInstanceTemplateOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *deleteInstanceTemplateOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance/templates/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteInstanceTemplateOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteInstanceTemplate")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetInstanceTemplate : Retrieve an instance template
// This request retrieves a single instance template specified by the identifier in the URL.
func (vpc *VpcV1) GetInstanceTemplate(getInstanceTemplateOptions *GetInstanceTemplateOptions) (result InstanceTemplateIntf, response *core.DetailedResponse, err error) {
	return vpc.GetInstanceTemplateWithContext(context.Background(), getInstanceTemplateOptions)
}

// GetInstanceTemplateWithContext is an alternate form of the GetInstanceTemplate method which supports a Context parameter
func (vpc *VpcV1) GetInstanceTemplateWithContext(ctx context.Context, getInstanceTemplateOptions *GetInstanceTemplateOptions) (result InstanceTemplateIntf, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getInstanceTemplateOptions, "getInstanceTemplateOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getInstanceTemplateOptions, "getInstanceTemplateOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *getInstanceTemplateOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance/templates/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getInstanceTemplateOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetInstanceTemplate")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceTemplate)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateInstanceTemplate : Update an instance template
// This request updates an instance template with the information provided in the instance template patch. The instance
// template patch object is structured in the same way as a retrieved instance template and contains only the
// information to be updated.
func (vpc *VpcV1) UpdateInstanceTemplate(updateInstanceTemplateOptions *UpdateInstanceTemplateOptions) (result InstanceTemplateIntf, response *core.DetailedResponse, err error) {
	return vpc.UpdateInstanceTemplateWithContext(context.Background(), updateInstanceTemplateOptions)
}

// UpdateInstanceTemplateWithContext is an alternate form of the UpdateInstanceTemplate method which supports a Context parameter
func (vpc *VpcV1) UpdateInstanceTemplateWithContext(ctx context.Context, updateInstanceTemplateOptions *UpdateInstanceTemplateOptions) (result InstanceTemplateIntf, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateInstanceTemplateOptions, "updateInstanceTemplateOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateInstanceTemplateOptions, "updateInstanceTemplateOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *updateInstanceTemplateOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance/templates/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateInstanceTemplateOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateInstanceTemplate")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateInstanceTemplateOptions.InstanceTemplatePatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceTemplate)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListInstances : List all instances
// This request lists all instances in the region.
func (vpc *VpcV1) ListInstances(listInstancesOptions *ListInstancesOptions) (result *InstanceCollection, response *core.DetailedResponse, err error) {
	return vpc.ListInstancesWithContext(context.Background(), listInstancesOptions)
}

// ListInstancesWithContext is an alternate form of the ListInstances method which supports a Context parameter
func (vpc *VpcV1) ListInstancesWithContext(ctx context.Context, listInstancesOptions *ListInstancesOptions) (result *InstanceCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateStruct(listInstancesOptions, "listInstancesOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range listInstancesOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListInstances")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listInstancesOptions.Start != nil {
		builder.AddQuery("start", fmt.Sprint(*listInstancesOptions.Start))
	}
	if listInstancesOptions.Limit != nil {
		builder.AddQuery("limit", fmt.Sprint(*listInstancesOptions.Limit))
	}
	if listInstancesOptions.ResourceGroupID != nil {
		builder.AddQuery("resource_group.id", fmt.Sprint(*listInstancesOptions.ResourceGroupID))
	}
	if listInstancesOptions.Name != nil {
		builder.AddQuery("name", fmt.Sprint(*listInstancesOptions.Name))
	}
	if listInstancesOptions.VPCID != nil {
		builder.AddQuery("vpc.id", fmt.Sprint(*listInstancesOptions.VPCID))
	}
	if listInstancesOptions.VPCCRN != nil {
		builder.AddQuery("vpc.crn", fmt.Sprint(*listInstancesOptions.VPCCRN))
	}
	if listInstancesOptions.VPCName != nil {
		builder.AddQuery("vpc.name", fmt.Sprint(*listInstancesOptions.VPCName))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateInstance : Create an instance
// This request provisions a new instance from an instance prototype object. The prototype object is structured in the
// same way as a retrieved instance, and contains the information necessary to provision the new instance. The instance
// is automatically started.
func (vpc *VpcV1) CreateInstance(createInstanceOptions *CreateInstanceOptions) (result *Instance, response *core.DetailedResponse, err error) {
	return vpc.CreateInstanceWithContext(context.Background(), createInstanceOptions)
}

// CreateInstanceWithContext is an alternate form of the CreateInstance method which supports a Context parameter
func (vpc *VpcV1) CreateInstanceWithContext(ctx context.Context, createInstanceOptions *CreateInstanceOptions) (result *Instance, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createInstanceOptions, "createInstanceOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createInstanceOptions, "createInstanceOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range createInstanceOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateInstance")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(createInstanceOptions.InstancePrototype)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstance)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteInstance : Delete an instance
// This request deletes an instance. This operation cannot be reversed. Any floating IPs associated with the instance's
// network interfaces are implicitly disassociated. All flow log collectors with `auto_delete` set to `true` targeting
// the instance and/or the instance's network interfaces are automatically deleted.
func (vpc *VpcV1) DeleteInstance(deleteInstanceOptions *DeleteInstanceOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteInstanceWithContext(context.Background(), deleteInstanceOptions)
}

// DeleteInstanceWithContext is an alternate form of the DeleteInstance method which supports a Context parameter
func (vpc *VpcV1) DeleteInstanceWithContext(ctx context.Context, deleteInstanceOptions *DeleteInstanceOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteInstanceOptions, "deleteInstanceOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteInstanceOptions, "deleteInstanceOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *deleteInstanceOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteInstanceOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteInstance")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetInstance : Retrieve an instance
// This request retrieves a single instance specified by the identifier in the URL.
func (vpc *VpcV1) GetInstance(getInstanceOptions *GetInstanceOptions) (result *Instance, response *core.DetailedResponse, err error) {
	return vpc.GetInstanceWithContext(context.Background(), getInstanceOptions)
}

// GetInstanceWithContext is an alternate form of the GetInstance method which supports a Context parameter
func (vpc *VpcV1) GetInstanceWithContext(ctx context.Context, getInstanceOptions *GetInstanceOptions) (result *Instance, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getInstanceOptions, "getInstanceOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getInstanceOptions, "getInstanceOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *getInstanceOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getInstanceOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetInstance")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstance)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateInstance : Update an instance
// This request updates an instance with the information in a provided instance patch. The instance patch object is
// structured in the same way as a retrieved instance and contains only the information to be updated.
func (vpc *VpcV1) UpdateInstance(updateInstanceOptions *UpdateInstanceOptions) (result *Instance, response *core.DetailedResponse, err error) {
	return vpc.UpdateInstanceWithContext(context.Background(), updateInstanceOptions)
}

// UpdateInstanceWithContext is an alternate form of the UpdateInstance method which supports a Context parameter
func (vpc *VpcV1) UpdateInstanceWithContext(ctx context.Context, updateInstanceOptions *UpdateInstanceOptions) (result *Instance, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateInstanceOptions, "updateInstanceOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateInstanceOptions, "updateInstanceOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *updateInstanceOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateInstanceOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateInstance")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateInstanceOptions.InstancePatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstance)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// GetInstanceInitialization : Retrieve initialization configuration for an instance
// This request retrieves configuration variables used to initialize the instance, such as SSH keys and the Windows
// administrator password.
func (vpc *VpcV1) GetInstanceInitialization(getInstanceInitializationOptions *GetInstanceInitializationOptions) (result *InstanceInitialization, response *core.DetailedResponse, err error) {
	return vpc.GetInstanceInitializationWithContext(context.Background(), getInstanceInitializationOptions)
}

// GetInstanceInitializationWithContext is an alternate form of the GetInstanceInitialization method which supports a Context parameter
func (vpc *VpcV1) GetInstanceInitializationWithContext(ctx context.Context, getInstanceInitializationOptions *GetInstanceInitializationOptions) (result *InstanceInitialization, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getInstanceInitializationOptions, "getInstanceInitializationOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getInstanceInitializationOptions, "getInstanceInitializationOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *getInstanceInitializationOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{id}/initialization`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getInstanceInitializationOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetInstanceInitialization")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceInitialization)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateInstanceAction : Create an instance action
// This request creates a new action which will be queued up to run as soon as any pending or running actions have
// completed.
func (vpc *VpcV1) CreateInstanceAction(createInstanceActionOptions *CreateInstanceActionOptions) (result *InstanceAction, response *core.DetailedResponse, err error) {
	return vpc.CreateInstanceActionWithContext(context.Background(), createInstanceActionOptions)
}

// CreateInstanceActionWithContext is an alternate form of the CreateInstanceAction method which supports a Context parameter
func (vpc *VpcV1) CreateInstanceActionWithContext(ctx context.Context, createInstanceActionOptions *CreateInstanceActionOptions) (result *InstanceAction, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createInstanceActionOptions, "createInstanceActionOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createInstanceActionOptions, "createInstanceActionOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_id": *createInstanceActionOptions.InstanceID,
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/actions`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range createInstanceActionOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateInstanceAction")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	body := make(map[string]interface{})
	if createInstanceActionOptions.Type != nil {
		body["type"] = createInstanceActionOptions.Type
	}
	if createInstanceActionOptions.Force != nil {
		body["force"] = createInstanceActionOptions.Force
	}
	_, err = builder.SetBodyContentJSON(body)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceAction)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateInstanceConsoleAccessToken : Create a console access token for an instance
// This request creates a new single-use console access token for an instance. All console configuration is provided at
// token create time, and the token is subsequently used in the `access_token` query parameter for the WebSocket
// request.  The access token is only valid for a short period of time, and a maximum of one token is valid for a given
// instance at a time.
func (vpc *VpcV1) CreateInstanceConsoleAccessToken(createInstanceConsoleAccessTokenOptions *CreateInstanceConsoleAccessTokenOptions) (result *InstanceConsoleAccessToken, response *core.DetailedResponse, err error) {
	return vpc.CreateInstanceConsoleAccessTokenWithContext(context.Background(), createInstanceConsoleAccessTokenOptions)
}

// CreateInstanceConsoleAccessTokenWithContext is an alternate form of the CreateInstanceConsoleAccessToken method which supports a Context parameter
func (vpc *VpcV1) CreateInstanceConsoleAccessTokenWithContext(ctx context.Context, createInstanceConsoleAccessTokenOptions *CreateInstanceConsoleAccessTokenOptions) (result *InstanceConsoleAccessToken, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createInstanceConsoleAccessTokenOptions, "createInstanceConsoleAccessTokenOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createInstanceConsoleAccessTokenOptions, "createInstanceConsoleAccessTokenOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_id": *createInstanceConsoleAccessTokenOptions.InstanceID,
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/console_access_token`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range createInstanceConsoleAccessTokenOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateInstanceConsoleAccessToken")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	body := make(map[string]interface{})
	if createInstanceConsoleAccessTokenOptions.ConsoleType != nil {
		body["console_type"] = createInstanceConsoleAccessTokenOptions.ConsoleType
	}
	if createInstanceConsoleAccessTokenOptions.Force != nil {
		body["force"] = createInstanceConsoleAccessTokenOptions.Force
	}
	_, err = builder.SetBodyContentJSON(body)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceConsoleAccessToken)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListInstanceDisks : List all disks on an instance
// This request lists all disks on an instance.  A disk is a block device that is locally attached to the instance's
// physical host and is also referred to as instance storage. By default, the listed disks are sorted by their
// `created_at` property values, with the newest disk first.
func (vpc *VpcV1) ListInstanceDisks(listInstanceDisksOptions *ListInstanceDisksOptions) (result *InstanceDiskCollection, response *core.DetailedResponse, err error) {
	return vpc.ListInstanceDisksWithContext(context.Background(), listInstanceDisksOptions)
}

// ListInstanceDisksWithContext is an alternate form of the ListInstanceDisks method which supports a Context parameter
func (vpc *VpcV1) ListInstanceDisksWithContext(ctx context.Context, listInstanceDisksOptions *ListInstanceDisksOptions) (result *InstanceDiskCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(listInstanceDisksOptions, "listInstanceDisksOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(listInstanceDisksOptions, "listInstanceDisksOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_id": *listInstanceDisksOptions.InstanceID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/disks`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range listInstanceDisksOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListInstanceDisks")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceDiskCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// GetInstanceDisk : Retrieve an instance disk
// This request retrieves a single instance disk specified by the identifier in the URL.
func (vpc *VpcV1) GetInstanceDisk(getInstanceDiskOptions *GetInstanceDiskOptions) (result *InstanceDisk, response *core.DetailedResponse, err error) {
	return vpc.GetInstanceDiskWithContext(context.Background(), getInstanceDiskOptions)
}

// GetInstanceDiskWithContext is an alternate form of the GetInstanceDisk method which supports a Context parameter
func (vpc *VpcV1) GetInstanceDiskWithContext(ctx context.Context, getInstanceDiskOptions *GetInstanceDiskOptions) (result *InstanceDisk, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getInstanceDiskOptions, "getInstanceDiskOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getInstanceDiskOptions, "getInstanceDiskOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_id": *getInstanceDiskOptions.InstanceID,
		"id":          *getInstanceDiskOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/disks/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getInstanceDiskOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetInstanceDisk")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceDisk)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateInstanceDisk : Update an instance disk
// This request updates the instance disk with the information in a provided patch.
func (vpc *VpcV1) UpdateInstanceDisk(updateInstanceDiskOptions *UpdateInstanceDiskOptions) (result *InstanceDisk, response *core.DetailedResponse, err error) {
	return vpc.UpdateInstanceDiskWithContext(context.Background(), updateInstanceDiskOptions)
}

// UpdateInstanceDiskWithContext is an alternate form of the UpdateInstanceDisk method which supports a Context parameter
func (vpc *VpcV1) UpdateInstanceDiskWithContext(ctx context.Context, updateInstanceDiskOptions *UpdateInstanceDiskOptions) (result *InstanceDisk, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateInstanceDiskOptions, "updateInstanceDiskOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateInstanceDiskOptions, "updateInstanceDiskOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_id": *updateInstanceDiskOptions.InstanceID,
		"id":          *updateInstanceDiskOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/disks/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateInstanceDiskOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateInstanceDisk")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateInstanceDiskOptions.InstanceDiskPatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceDisk)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListInstanceNetworkInterfaces : List all network interfaces on an instance
// This request lists all network interfaces on an instance. A network interface is an abstract representation of a
// network interface card and connects an instance to a subnet. While each network interface can attach to only one
// subnet, multiple network interfaces can be created to attach to multiple subnets. Multiple interfaces may also attach
// to the same subnet.
func (vpc *VpcV1) ListInstanceNetworkInterfaces(listInstanceNetworkInterfacesOptions *ListInstanceNetworkInterfacesOptions) (result *NetworkInterfaceUnpaginatedCollection, response *core.DetailedResponse, err error) {
	return vpc.ListInstanceNetworkInterfacesWithContext(context.Background(), listInstanceNetworkInterfacesOptions)
}

// ListInstanceNetworkInterfacesWithContext is an alternate form of the ListInstanceNetworkInterfaces method which supports a Context parameter
func (vpc *VpcV1) ListInstanceNetworkInterfacesWithContext(ctx context.Context, listInstanceNetworkInterfacesOptions *ListInstanceNetworkInterfacesOptions) (result *NetworkInterfaceUnpaginatedCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(listInstanceNetworkInterfacesOptions, "listInstanceNetworkInterfacesOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(listInstanceNetworkInterfacesOptions, "listInstanceNetworkInterfacesOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_id": *listInstanceNetworkInterfacesOptions.InstanceID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_interfaces`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range listInstanceNetworkInterfacesOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListInstanceNetworkInterfaces")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkInterfaceUnpaginatedCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateInstanceNetworkInterface : Create a network interface on an instance
// This request creates a new network interface from a network interface prototype object. The prototype object is
// structured in the same way as a retrieved network interface, and contains the information necessary to create the new
// network interface. Any subnet in the instance's VPC may be specified, even if it is already attached to another
// network interface. Addresses on the network interface must be within the specified subnet's CIDR blocks.
func (vpc *VpcV1) CreateInstanceNetworkInterface(createInstanceNetworkInterfaceOptions *CreateInstanceNetworkInterfaceOptions) (result *NetworkInterface, response *core.DetailedResponse, err error) {
	return vpc.CreateInstanceNetworkInterfaceWithContext(context.Background(), createInstanceNetworkInterfaceOptions)
}

// CreateInstanceNetworkInterfaceWithContext is an alternate form of the CreateInstanceNetworkInterface method which supports a Context parameter
func (vpc *VpcV1) CreateInstanceNetworkInterfaceWithContext(ctx context.Context, createInstanceNetworkInterfaceOptions *CreateInstanceNetworkInterfaceOptions) (result *NetworkInterface, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createInstanceNetworkInterfaceOptions, "createInstanceNetworkInterfaceOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createInstanceNetworkInterfaceOptions, "createInstanceNetworkInterfaceOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_id": *createInstanceNetworkInterfaceOptions.InstanceID,
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_interfaces`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range createInstanceNetworkInterfaceOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateInstanceNetworkInterface")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	body := make(map[string]interface{})
	if createInstanceNetworkInterfaceOptions.Subnet != nil {
		body["subnet"] = createInstanceNetworkInterfaceOptions.Subnet
	}
	if createInstanceNetworkInterfaceOptions.AllowIPSpoofing != nil {
		body["allow_ip_spoofing"] = createInstanceNetworkInterfaceOptions.AllowIPSpoofing
	}
	if createInstanceNetworkInterfaceOptions.Name != nil {
		body["name"] = createInstanceNetworkInterfaceOptions.Name
	}
	if createInstanceNetworkInterfaceOptions.PrimaryIpv4Address != nil {
		body["primary_ipv4_address"] = createInstanceNetworkInterfaceOptions.PrimaryIpv4Address
	}
	if createInstanceNetworkInterfaceOptions.SecurityGroups != nil {
		body["security_groups"] = createInstanceNetworkInterfaceOptions.SecurityGroups
	}
	_, err = builder.SetBodyContentJSON(body)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkInterface)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteInstanceNetworkInterface : Delete a network interface
// This request deletes a network interface. This operation cannot be reversed. Any floating IPs associated with the
// network interface are implicitly disassociated. All flow log collectors with `auto_delete` set to `true` targeting
// the network interface are automatically deleted. The primary network interface is not allowed to be deleted.
func (vpc *VpcV1) DeleteInstanceNetworkInterface(deleteInstanceNetworkInterfaceOptions *DeleteInstanceNetworkInterfaceOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteInstanceNetworkInterfaceWithContext(context.Background(), deleteInstanceNetworkInterfaceOptions)
}

// DeleteInstanceNetworkInterfaceWithContext is an alternate form of the DeleteInstanceNetworkInterface method which supports a Context parameter
func (vpc *VpcV1) DeleteInstanceNetworkInterfaceWithContext(ctx context.Context, deleteInstanceNetworkInterfaceOptions *DeleteInstanceNetworkInterfaceOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteInstanceNetworkInterfaceOptions, "deleteInstanceNetworkInterfaceOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteInstanceNetworkInterfaceOptions, "deleteInstanceNetworkInterfaceOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_id": *deleteInstanceNetworkInterfaceOptions.InstanceID,
		"id":          *deleteInstanceNetworkInterfaceOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_interfaces/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteInstanceNetworkInterfaceOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteInstanceNetworkInterface")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetInstanceNetworkInterface : Retrieve a network interface
// This request retrieves a single network interface specified by the identifier in the URL.
func (vpc *VpcV1) GetInstanceNetworkInterface(getInstanceNetworkInterfaceOptions *GetInstanceNetworkInterfaceOptions) (result *NetworkInterface, response *core.DetailedResponse, err error) {
	return vpc.GetInstanceNetworkInterfaceWithContext(context.Background(), getInstanceNetworkInterfaceOptions)
}

// GetInstanceNetworkInterfaceWithContext is an alternate form of the GetInstanceNetworkInterface method which supports a Context parameter
func (vpc *VpcV1) GetInstanceNetworkInterfaceWithContext(ctx context.Context, getInstanceNetworkInterfaceOptions *GetInstanceNetworkInterfaceOptions) (result *NetworkInterface, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getInstanceNetworkInterfaceOptions, "getInstanceNetworkInterfaceOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getInstanceNetworkInterfaceOptions, "getInstanceNetworkInterfaceOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_id": *getInstanceNetworkInterfaceOptions.InstanceID,
		"id":          *getInstanceNetworkInterfaceOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_interfaces/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getInstanceNetworkInterfaceOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetInstanceNetworkInterface")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkInterface)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateInstanceNetworkInterface : Update a network interface
// This request updates a network interface with the information provided in a network interface patch object. The
// network interface patch object is structured in the same way as a retrieved network interface and needs to contain
// only the information to be updated.
func (vpc *VpcV1) UpdateInstanceNetworkInterface(updateInstanceNetworkInterfaceOptions *UpdateInstanceNetworkInterfaceOptions) (result *NetworkInterface, response *core.DetailedResponse, err error) {
	return vpc.UpdateInstanceNetworkInterfaceWithContext(context.Background(), updateInstanceNetworkInterfaceOptions)
}

// UpdateInstanceNetworkInterfaceWithContext is an alternate form of the UpdateInstanceNetworkInterface method which supports a Context parameter
func (vpc *VpcV1) UpdateInstanceNetworkInterfaceWithContext(ctx context.Context, updateInstanceNetworkInterfaceOptions *UpdateInstanceNetworkInterfaceOptions) (result *NetworkInterface, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateInstanceNetworkInterfaceOptions, "updateInstanceNetworkInterfaceOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateInstanceNetworkInterfaceOptions, "updateInstanceNetworkInterfaceOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_id": *updateInstanceNetworkInterfaceOptions.InstanceID,
		"id":          *updateInstanceNetworkInterfaceOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_interfaces/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateInstanceNetworkInterfaceOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateInstanceNetworkInterface")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateInstanceNetworkInterfaceOptions.NetworkInterfacePatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkInterface)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListInstanceNetworkInterfaceFloatingIps : List all floating IPs associated with a network interface
// This request lists all floating IPs associated with a network interface.
func (vpc *VpcV1) ListInstanceNetworkInterfaceFloatingIps(listInstanceNetworkInterfaceFloatingIpsOptions *ListInstanceNetworkInterfaceFloatingIpsOptions) (result *FloatingIPUnpaginatedCollection, response *core.DetailedResponse, err error) {
	return vpc.ListInstanceNetworkInterfaceFloatingIpsWithContext(context.Background(), listInstanceNetworkInterfaceFloatingIpsOptions)
}

// ListInstanceNetworkInterfaceFloatingIpsWithContext is an alternate form of the ListInstanceNetworkInterfaceFloatingIps method which supports a Context parameter
func (vpc *VpcV1) ListInstanceNetworkInterfaceFloatingIpsWithContext(ctx context.Context, listInstanceNetworkInterfaceFloatingIpsOptions *ListInstanceNetworkInterfaceFloatingIpsOptions) (result *FloatingIPUnpaginatedCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(listInstanceNetworkInterfaceFloatingIpsOptions, "listInstanceNetworkInterfaceFloatingIpsOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(listInstanceNetworkInterfaceFloatingIpsOptions, "listInstanceNetworkInterfaceFloatingIpsOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_id":          *listInstanceNetworkInterfaceFloatingIpsOptions.InstanceID,
		"network_interface_id": *listInstanceNetworkInterfaceFloatingIpsOptions.NetworkInterfaceID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_interfaces/{network_interface_id}/floating_ips`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range listInstanceNetworkInterfaceFloatingIpsOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListInstanceNetworkInterfaceFloatingIps")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIPUnpaginatedCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// RemoveInstanceNetworkInterfaceFloatingIP : Disassociate a floating IP from a network interface
// This request disassociates the specified floating IP from the specified network interface.
func (vpc *VpcV1) RemoveInstanceNetworkInterfaceFloatingIP(removeInstanceNetworkInterfaceFloatingIPOptions *RemoveInstanceNetworkInterfaceFloatingIPOptions) (response *core.DetailedResponse, err error) {
	return vpc.RemoveInstanceNetworkInterfaceFloatingIPWithContext(context.Background(), removeInstanceNetworkInterfaceFloatingIPOptions)
}

// RemoveInstanceNetworkInterfaceFloatingIPWithContext is an alternate form of the RemoveInstanceNetworkInterfaceFloatingIP method which supports a Context parameter
func (vpc *VpcV1) RemoveInstanceNetworkInterfaceFloatingIPWithContext(ctx context.Context, removeInstanceNetworkInterfaceFloatingIPOptions *RemoveInstanceNetworkInterfaceFloatingIPOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(removeInstanceNetworkInterfaceFloatingIPOptions, "removeInstanceNetworkInterfaceFloatingIPOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(removeInstanceNetworkInterfaceFloatingIPOptions, "removeInstanceNetworkInterfaceFloatingIPOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_id":          *removeInstanceNetworkInterfaceFloatingIPOptions.InstanceID,
		"network_interface_id": *removeInstanceNetworkInterfaceFloatingIPOptions.NetworkInterfaceID,
		"id":                   *removeInstanceNetworkInterfaceFloatingIPOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_interfaces/{network_interface_id}/floating_ips/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range removeInstanceNetworkInterfaceFloatingIPOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "RemoveInstanceNetworkInterfaceFloatingIP")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetInstanceNetworkInterfaceFloatingIP : Retrieve associated floating IP
// This request a retrieves a specified floating IP address if it is associated with the network interface and instance
// specified in the URL.
func (vpc *VpcV1) GetInstanceNetworkInterfaceFloatingIP(getInstanceNetworkInterfaceFloatingIPOptions *GetInstanceNetworkInterfaceFloatingIPOptions) (result *FloatingIP, response *core.DetailedResponse, err error) {
	return vpc.GetInstanceNetworkInterfaceFloatingIPWithContext(context.Background(), getInstanceNetworkInterfaceFloatingIPOptions)
}

// GetInstanceNetworkInterfaceFloatingIPWithContext is an alternate form of the GetInstanceNetworkInterfaceFloatingIP method which supports a Context parameter
func (vpc *VpcV1) GetInstanceNetworkInterfaceFloatingIPWithContext(ctx context.Context, getInstanceNetworkInterfaceFloatingIPOptions *GetInstanceNetworkInterfaceFloatingIPOptions) (result *FloatingIP, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getInstanceNetworkInterfaceFloatingIPOptions, "getInstanceNetworkInterfaceFloatingIPOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getInstanceNetworkInterfaceFloatingIPOptions, "getInstanceNetworkInterfaceFloatingIPOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_id":          *getInstanceNetworkInterfaceFloatingIPOptions.InstanceID,
		"network_interface_id": *getInstanceNetworkInterfaceFloatingIPOptions.NetworkInterfaceID,
		"id":                   *getInstanceNetworkInterfaceFloatingIPOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_interfaces/{network_interface_id}/floating_ips/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getInstanceNetworkInterfaceFloatingIPOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetInstanceNetworkInterfaceFloatingIP")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIP)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// AddInstanceNetworkInterfaceFloatingIP : Associate a floating IP with a network interface
// This request associates the specified floating IP with the specified network interface, replacing any existing
// association. For this request to succeed, the existing floating IP must not be required by another resource, such as
// a public gateway. A request body is not required, and if supplied, is ignored.
func (vpc *VpcV1) AddInstanceNetworkInterfaceFloatingIP(addInstanceNetworkInterfaceFloatingIPOptions *AddInstanceNetworkInterfaceFloatingIPOptions) (result *FloatingIP, response *core.DetailedResponse, err error) {
	return vpc.AddInstanceNetworkInterfaceFloatingIPWithContext(context.Background(), addInstanceNetworkInterfaceFloatingIPOptions)
}

// AddInstanceNetworkInterfaceFloatingIPWithContext is an alternate form of the AddInstanceNetworkInterfaceFloatingIP method which supports a Context parameter
func (vpc *VpcV1) AddInstanceNetworkInterfaceFloatingIPWithContext(ctx context.Context, addInstanceNetworkInterfaceFloatingIPOptions *AddInstanceNetworkInterfaceFloatingIPOptions) (result *FloatingIP, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(addInstanceNetworkInterfaceFloatingIPOptions, "addInstanceNetworkInterfaceFloatingIPOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(addInstanceNetworkInterfaceFloatingIPOptions, "addInstanceNetworkInterfaceFloatingIPOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_id":          *addInstanceNetworkInterfaceFloatingIPOptions.InstanceID,
		"network_interface_id": *addInstanceNetworkInterfaceFloatingIPOptions.NetworkInterfaceID,
		"id":                   *addInstanceNetworkInterfaceFloatingIPOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PUT)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_interfaces/{network_interface_id}/floating_ips/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range addInstanceNetworkInterfaceFloatingIPOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "AddInstanceNetworkInterfaceFloatingIP")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIP)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListInstanceVolumeAttachments : List all volumes attachments on an instance
// This request lists all volume attachments on an instance. A volume attachment connects a volume to an instance. Each
// instance may have many volume attachments but each volume attachment connects exactly one instance to exactly one
// volume.
func (vpc *VpcV1) ListInstanceVolumeAttachments(listInstanceVolumeAttachmentsOptions *ListInstanceVolumeAttachmentsOptions) (result *VolumeAttachmentCollection, response *core.DetailedResponse, err error) {
	return vpc.ListInstanceVolumeAttachmentsWithContext(context.Background(), listInstanceVolumeAttachmentsOptions)
}

// ListInstanceVolumeAttachmentsWithContext is an alternate form of the ListInstanceVolumeAttachments method which supports a Context parameter
func (vpc *VpcV1) ListInstanceVolumeAttachmentsWithContext(ctx context.Context, listInstanceVolumeAttachmentsOptions *ListInstanceVolumeAttachmentsOptions) (result *VolumeAttachmentCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(listInstanceVolumeAttachmentsOptions, "listInstanceVolumeAttachmentsOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(listInstanceVolumeAttachmentsOptions, "listInstanceVolumeAttachmentsOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_id": *listInstanceVolumeAttachmentsOptions.InstanceID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/volume_attachments`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range listInstanceVolumeAttachmentsOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListInstanceVolumeAttachments")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolumeAttachmentCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateInstanceVolumeAttachment : Create a volume attachment on an instance
// This request creates a new volume attachment from a volume attachment prototype object. The prototype object is
// structured in the same way as a retrieved volume attachment, and contains the information necessary to create the new
// volume attachment. The creation of a new volume attachment connects a volume to an instance.
func (vpc *VpcV1) CreateInstanceVolumeAttachment(createInstanceVolumeAttachmentOptions *CreateInstanceVolumeAttachmentOptions) (result *VolumeAttachment, response *core.DetailedResponse, err error) {
	return vpc.CreateInstanceVolumeAttachmentWithContext(context.Background(), createInstanceVolumeAttachmentOptions)
}

// CreateInstanceVolumeAttachmentWithContext is an alternate form of the CreateInstanceVolumeAttachment method which supports a Context parameter
func (vpc *VpcV1) CreateInstanceVolumeAttachmentWithContext(ctx context.Context, createInstanceVolumeAttachmentOptions *CreateInstanceVolumeAttachmentOptions) (result *VolumeAttachment, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createInstanceVolumeAttachmentOptions, "createInstanceVolumeAttachmentOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createInstanceVolumeAttachmentOptions, "createInstanceVolumeAttachmentOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_id": *createInstanceVolumeAttachmentOptions.InstanceID,
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/volume_attachments`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range createInstanceVolumeAttachmentOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateInstanceVolumeAttachment")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	body := make(map[string]interface{})
	if createInstanceVolumeAttachmentOptions.Volume != nil {
		body["volume"] = createInstanceVolumeAttachmentOptions.Volume
	}
	if createInstanceVolumeAttachmentOptions.DeleteVolumeOnInstanceDelete != nil {
		body["delete_volume_on_instance_delete"] = createInstanceVolumeAttachmentOptions.DeleteVolumeOnInstanceDelete
	}
	if createInstanceVolumeAttachmentOptions.Name != nil {
		body["name"] = createInstanceVolumeAttachmentOptions.Name
	}
	_, err = builder.SetBodyContentJSON(body)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolumeAttachment)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteInstanceVolumeAttachment : Delete a volume attachment
// This request deletes a volume attachment. The deletion of a volume attachment detaches a volume from an instance.
func (vpc *VpcV1) DeleteInstanceVolumeAttachment(deleteInstanceVolumeAttachmentOptions *DeleteInstanceVolumeAttachmentOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteInstanceVolumeAttachmentWithContext(context.Background(), deleteInstanceVolumeAttachmentOptions)
}

// DeleteInstanceVolumeAttachmentWithContext is an alternate form of the DeleteInstanceVolumeAttachment method which supports a Context parameter
func (vpc *VpcV1) DeleteInstanceVolumeAttachmentWithContext(ctx context.Context, deleteInstanceVolumeAttachmentOptions *DeleteInstanceVolumeAttachmentOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteInstanceVolumeAttachmentOptions, "deleteInstanceVolumeAttachmentOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteInstanceVolumeAttachmentOptions, "deleteInstanceVolumeAttachmentOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_id": *deleteInstanceVolumeAttachmentOptions.InstanceID,
		"id":          *deleteInstanceVolumeAttachmentOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/volume_attachments/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteInstanceVolumeAttachmentOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteInstanceVolumeAttachment")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetInstanceVolumeAttachment : Retrieve a volume attachment
// This request retrieves a single volume attachment specified by the identifier in the URL.
func (vpc *VpcV1) GetInstanceVolumeAttachment(getInstanceVolumeAttachmentOptions *GetInstanceVolumeAttachmentOptions) (result *VolumeAttachment, response *core.DetailedResponse, err error) {
	return vpc.GetInstanceVolumeAttachmentWithContext(context.Background(), getInstanceVolumeAttachmentOptions)
}

// GetInstanceVolumeAttachmentWithContext is an alternate form of the GetInstanceVolumeAttachment method which supports a Context parameter
func (vpc *VpcV1) GetInstanceVolumeAttachmentWithContext(ctx context.Context, getInstanceVolumeAttachmentOptions *GetInstanceVolumeAttachmentOptions) (result *VolumeAttachment, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getInstanceVolumeAttachmentOptions, "getInstanceVolumeAttachmentOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getInstanceVolumeAttachmentOptions, "getInstanceVolumeAttachmentOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_id": *getInstanceVolumeAttachmentOptions.InstanceID,
		"id":          *getInstanceVolumeAttachmentOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/volume_attachments/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getInstanceVolumeAttachmentOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetInstanceVolumeAttachment")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolumeAttachment)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateInstanceVolumeAttachment : Update a volume attachment
// This request updates a volume attachment with the information provided in a volume attachment patch object. The
// volume attachment patch object is structured in the same way as a retrieved volume attachment and needs to contain
// only the information to be updated.
func (vpc *VpcV1) UpdateInstanceVolumeAttachment(updateInstanceVolumeAttachmentOptions *UpdateInstanceVolumeAttachmentOptions) (result *VolumeAttachment, response *core.DetailedResponse, err error) {
	return vpc.UpdateInstanceVolumeAttachmentWithContext(context.Background(), updateInstanceVolumeAttachmentOptions)
}

// UpdateInstanceVolumeAttachmentWithContext is an alternate form of the UpdateInstanceVolumeAttachment method which supports a Context parameter
func (vpc *VpcV1) UpdateInstanceVolumeAttachmentWithContext(ctx context.Context, updateInstanceVolumeAttachmentOptions *UpdateInstanceVolumeAttachmentOptions) (result *VolumeAttachment, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateInstanceVolumeAttachmentOptions, "updateInstanceVolumeAttachmentOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateInstanceVolumeAttachmentOptions, "updateInstanceVolumeAttachmentOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_id": *updateInstanceVolumeAttachmentOptions.InstanceID,
		"id":          *updateInstanceVolumeAttachmentOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/volume_attachments/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateInstanceVolumeAttachmentOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateInstanceVolumeAttachment")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateInstanceVolumeAttachmentOptions.VolumeAttachmentPatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolumeAttachment)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListInstanceGroups : List all instance groups
// This request lists all instance groups in the region.
func (vpc *VpcV1) ListInstanceGroups(listInstanceGroupsOptions *ListInstanceGroupsOptions) (result *InstanceGroupCollection, response *core.DetailedResponse, err error) {
	return vpc.ListInstanceGroupsWithContext(context.Background(), listInstanceGroupsOptions)
}

// ListInstanceGroupsWithContext is an alternate form of the ListInstanceGroups method which supports a Context parameter
func (vpc *VpcV1) ListInstanceGroupsWithContext(ctx context.Context, listInstanceGroupsOptions *ListInstanceGroupsOptions) (result *InstanceGroupCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateStruct(listInstanceGroupsOptions, "listInstanceGroupsOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range listInstanceGroupsOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListInstanceGroups")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listInstanceGroupsOptions.Start != nil {
		builder.AddQuery("start", fmt.Sprint(*listInstanceGroupsOptions.Start))
	}
	if listInstanceGroupsOptions.Limit != nil {
		builder.AddQuery("limit", fmt.Sprint(*listInstanceGroupsOptions.Limit))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateInstanceGroup : Create an instance group
// This request creates a new instance group.
func (vpc *VpcV1) CreateInstanceGroup(createInstanceGroupOptions *CreateInstanceGroupOptions) (result *InstanceGroup, response *core.DetailedResponse, err error) {
	return vpc.CreateInstanceGroupWithContext(context.Background(), createInstanceGroupOptions)
}

// CreateInstanceGroupWithContext is an alternate form of the CreateInstanceGroup method which supports a Context parameter
func (vpc *VpcV1) CreateInstanceGroupWithContext(ctx context.Context, createInstanceGroupOptions *CreateInstanceGroupOptions) (result *InstanceGroup, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createInstanceGroupOptions, "createInstanceGroupOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createInstanceGroupOptions, "createInstanceGroupOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range createInstanceGroupOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateInstanceGroup")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	body := make(map[string]interface{})
	if createInstanceGroupOptions.InstanceTemplate != nil {
		body["instance_template"] = createInstanceGroupOptions.InstanceTemplate
	}
	if createInstanceGroupOptions.Subnets != nil {
		body["subnets"] = createInstanceGroupOptions.Subnets
	}
	if createInstanceGroupOptions.ApplicationPort != nil {
		body["application_port"] = createInstanceGroupOptions.ApplicationPort
	}
	if createInstanceGroupOptions.LoadBalancer != nil {
		body["load_balancer"] = createInstanceGroupOptions.LoadBalancer
	}
	if createInstanceGroupOptions.LoadBalancerPool != nil {
		body["load_balancer_pool"] = createInstanceGroupOptions.LoadBalancerPool
	}
	if createInstanceGroupOptions.MembershipCount != nil {
		body["membership_count"] = createInstanceGroupOptions.MembershipCount
	}
	if createInstanceGroupOptions.Name != nil {
		body["name"] = createInstanceGroupOptions.Name
	}
	if createInstanceGroupOptions.ResourceGroup != nil {
		body["resource_group"] = createInstanceGroupOptions.ResourceGroup
	}
	_, err = builder.SetBodyContentJSON(body)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroup)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteInstanceGroup : Delete an instance group
// This request deletes an instance group. This operation cannot be reversed. Any instances associated with the group
// will be deleted.
func (vpc *VpcV1) DeleteInstanceGroup(deleteInstanceGroupOptions *DeleteInstanceGroupOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteInstanceGroupWithContext(context.Background(), deleteInstanceGroupOptions)
}

// DeleteInstanceGroupWithContext is an alternate form of the DeleteInstanceGroup method which supports a Context parameter
func (vpc *VpcV1) DeleteInstanceGroupWithContext(ctx context.Context, deleteInstanceGroupOptions *DeleteInstanceGroupOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteInstanceGroupOptions, "deleteInstanceGroupOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteInstanceGroupOptions, "deleteInstanceGroupOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *deleteInstanceGroupOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteInstanceGroupOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteInstanceGroup")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetInstanceGroup : Retrieve an instance group
// This request retrieves a single instance group specified by identifier in the URL.
func (vpc *VpcV1) GetInstanceGroup(getInstanceGroupOptions *GetInstanceGroupOptions) (result *InstanceGroup, response *core.DetailedResponse, err error) {
	return vpc.GetInstanceGroupWithContext(context.Background(), getInstanceGroupOptions)
}

// GetInstanceGroupWithContext is an alternate form of the GetInstanceGroup method which supports a Context parameter
func (vpc *VpcV1) GetInstanceGroupWithContext(ctx context.Context, getInstanceGroupOptions *GetInstanceGroupOptions) (result *InstanceGroup, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getInstanceGroupOptions, "getInstanceGroupOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getInstanceGroupOptions, "getInstanceGroupOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *getInstanceGroupOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getInstanceGroupOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetInstanceGroup")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroup)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateInstanceGroup : Update an instance group
// This request updates an instance group with the information provided instance group patch. The instance group patch
// object is structured in the same way as a retrieved instance group and contains only the information to be updated.
func (vpc *VpcV1) UpdateInstanceGroup(updateInstanceGroupOptions *UpdateInstanceGroupOptions) (result *InstanceGroup, response *core.DetailedResponse, err error) {
	return vpc.UpdateInstanceGroupWithContext(context.Background(), updateInstanceGroupOptions)
}

// UpdateInstanceGroupWithContext is an alternate form of the UpdateInstanceGroup method which supports a Context parameter
func (vpc *VpcV1) UpdateInstanceGroupWithContext(ctx context.Context, updateInstanceGroupOptions *UpdateInstanceGroupOptions) (result *InstanceGroup, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateInstanceGroupOptions, "updateInstanceGroupOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateInstanceGroupOptions, "updateInstanceGroupOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *updateInstanceGroupOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateInstanceGroupOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateInstanceGroup")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateInstanceGroupOptions.InstanceGroupPatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroup)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteInstanceGroupLoadBalancer : Delete an instance group load balancer
// This request unbinds the instance group from the load balancer pool, and deletes the load balancer pool members.
func (vpc *VpcV1) DeleteInstanceGroupLoadBalancer(deleteInstanceGroupLoadBalancerOptions *DeleteInstanceGroupLoadBalancerOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteInstanceGroupLoadBalancerWithContext(context.Background(), deleteInstanceGroupLoadBalancerOptions)
}

// DeleteInstanceGroupLoadBalancerWithContext is an alternate form of the DeleteInstanceGroupLoadBalancer method which supports a Context parameter
func (vpc *VpcV1) DeleteInstanceGroupLoadBalancerWithContext(ctx context.Context, deleteInstanceGroupLoadBalancerOptions *DeleteInstanceGroupLoadBalancerOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteInstanceGroupLoadBalancerOptions, "deleteInstanceGroupLoadBalancerOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteInstanceGroupLoadBalancerOptions, "deleteInstanceGroupLoadBalancerOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_group_id": *deleteInstanceGroupLoadBalancerOptions.InstanceGroupID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/load_balancer`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteInstanceGroupLoadBalancerOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteInstanceGroupLoadBalancer")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// ListInstanceGroupManagers : List all managers for an instance group
// This request lists all managers for an instance group.
func (vpc *VpcV1) ListInstanceGroupManagers(listInstanceGroupManagersOptions *ListInstanceGroupManagersOptions) (result *InstanceGroupManagerCollection, response *core.DetailedResponse, err error) {
	return vpc.ListInstanceGroupManagersWithContext(context.Background(), listInstanceGroupManagersOptions)
}

// ListInstanceGroupManagersWithContext is an alternate form of the ListInstanceGroupManagers method which supports a Context parameter
func (vpc *VpcV1) ListInstanceGroupManagersWithContext(ctx context.Context, listInstanceGroupManagersOptions *ListInstanceGroupManagersOptions) (result *InstanceGroupManagerCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(listInstanceGroupManagersOptions, "listInstanceGroupManagersOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(listInstanceGroupManagersOptions, "listInstanceGroupManagersOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_group_id": *listInstanceGroupManagersOptions.InstanceGroupID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range listInstanceGroupManagersOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListInstanceGroupManagers")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listInstanceGroupManagersOptions.Start != nil {
		builder.AddQuery("start", fmt.Sprint(*listInstanceGroupManagersOptions.Start))
	}
	if listInstanceGroupManagersOptions.Limit != nil {
		builder.AddQuery("limit", fmt.Sprint(*listInstanceGroupManagersOptions.Limit))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManagerCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateInstanceGroupManager : Create a manager for an instance group
// This request creates a new instance group manager.
func (vpc *VpcV1) CreateInstanceGroupManager(createInstanceGroupManagerOptions *CreateInstanceGroupManagerOptions) (result InstanceGroupManagerIntf, response *core.DetailedResponse, err error) {
	return vpc.CreateInstanceGroupManagerWithContext(context.Background(), createInstanceGroupManagerOptions)
}

// CreateInstanceGroupManagerWithContext is an alternate form of the CreateInstanceGroupManager method which supports a Context parameter
func (vpc *VpcV1) CreateInstanceGroupManagerWithContext(ctx context.Context, createInstanceGroupManagerOptions *CreateInstanceGroupManagerOptions) (result InstanceGroupManagerIntf, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createInstanceGroupManagerOptions, "createInstanceGroupManagerOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createInstanceGroupManagerOptions, "createInstanceGroupManagerOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_group_id": *createInstanceGroupManagerOptions.InstanceGroupID,
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range createInstanceGroupManagerOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateInstanceGroupManager")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(createInstanceGroupManagerOptions.InstanceGroupManagerPrototype)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManager)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteInstanceGroupManager : Delete an instance group manager
// This request deletes an instance group manager. This operation cannot be reversed.
func (vpc *VpcV1) DeleteInstanceGroupManager(deleteInstanceGroupManagerOptions *DeleteInstanceGroupManagerOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteInstanceGroupManagerWithContext(context.Background(), deleteInstanceGroupManagerOptions)
}

// DeleteInstanceGroupManagerWithContext is an alternate form of the DeleteInstanceGroupManager method which supports a Context parameter
func (vpc *VpcV1) DeleteInstanceGroupManagerWithContext(ctx context.Context, deleteInstanceGroupManagerOptions *DeleteInstanceGroupManagerOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteInstanceGroupManagerOptions, "deleteInstanceGroupManagerOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteInstanceGroupManagerOptions, "deleteInstanceGroupManagerOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_group_id": *deleteInstanceGroupManagerOptions.InstanceGroupID,
		"id":                *deleteInstanceGroupManagerOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteInstanceGroupManagerOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteInstanceGroupManager")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetInstanceGroupManager : Retrieve an instance group manager
// This request retrieves a single instance group manager specified by identifier in the URL.
func (vpc *VpcV1) GetInstanceGroupManager(getInstanceGroupManagerOptions *GetInstanceGroupManagerOptions) (result InstanceGroupManagerIntf, response *core.DetailedResponse, err error) {
	return vpc.GetInstanceGroupManagerWithContext(context.Background(), getInstanceGroupManagerOptions)
}

// GetInstanceGroupManagerWithContext is an alternate form of the GetInstanceGroupManager method which supports a Context parameter
func (vpc *VpcV1) GetInstanceGroupManagerWithContext(ctx context.Context, getInstanceGroupManagerOptions *GetInstanceGroupManagerOptions) (result InstanceGroupManagerIntf, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getInstanceGroupManagerOptions, "getInstanceGroupManagerOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getInstanceGroupManagerOptions, "getInstanceGroupManagerOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_group_id": *getInstanceGroupManagerOptions.InstanceGroupID,
		"id":                *getInstanceGroupManagerOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getInstanceGroupManagerOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetInstanceGroupManager")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManager)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateInstanceGroupManager : Update an instance group manager
// This request updates an instance group manager with the information provided instance group manager patch.
func (vpc *VpcV1) UpdateInstanceGroupManager(updateInstanceGroupManagerOptions *UpdateInstanceGroupManagerOptions) (result InstanceGroupManagerIntf, response *core.DetailedResponse, err error) {
	return vpc.UpdateInstanceGroupManagerWithContext(context.Background(), updateInstanceGroupManagerOptions)
}

// UpdateInstanceGroupManagerWithContext is an alternate form of the UpdateInstanceGroupManager method which supports a Context parameter
func (vpc *VpcV1) UpdateInstanceGroupManagerWithContext(ctx context.Context, updateInstanceGroupManagerOptions *UpdateInstanceGroupManagerOptions) (result InstanceGroupManagerIntf, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateInstanceGroupManagerOptions, "updateInstanceGroupManagerOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateInstanceGroupManagerOptions, "updateInstanceGroupManagerOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_group_id": *updateInstanceGroupManagerOptions.InstanceGroupID,
		"id":                *updateInstanceGroupManagerOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateInstanceGroupManagerOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateInstanceGroupManager")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateInstanceGroupManagerOptions.InstanceGroupManagerPatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManager)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListInstanceGroupManagerActions : List all actions for an instance group manager
// This request lists all instance group actions for an instance group manager.
func (vpc *VpcV1) ListInstanceGroupManagerActions(listInstanceGroupManagerActionsOptions *ListInstanceGroupManagerActionsOptions) (result *InstanceGroupManagerActionsCollection, response *core.DetailedResponse, err error) {
	return vpc.ListInstanceGroupManagerActionsWithContext(context.Background(), listInstanceGroupManagerActionsOptions)
}

// ListInstanceGroupManagerActionsWithContext is an alternate form of the ListInstanceGroupManagerActions method which supports a Context parameter
func (vpc *VpcV1) ListInstanceGroupManagerActionsWithContext(ctx context.Context, listInstanceGroupManagerActionsOptions *ListInstanceGroupManagerActionsOptions) (result *InstanceGroupManagerActionsCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(listInstanceGroupManagerActionsOptions, "listInstanceGroupManagerActionsOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(listInstanceGroupManagerActionsOptions, "listInstanceGroupManagerActionsOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_group_id":         *listInstanceGroupManagerActionsOptions.InstanceGroupID,
		"instance_group_manager_id": *listInstanceGroupManagerActionsOptions.InstanceGroupManagerID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/actions`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range listInstanceGroupManagerActionsOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListInstanceGroupManagerActions")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listInstanceGroupManagerActionsOptions.Start != nil {
		builder.AddQuery("start", fmt.Sprint(*listInstanceGroupManagerActionsOptions.Start))
	}
	if listInstanceGroupManagerActionsOptions.Limit != nil {
		builder.AddQuery("limit", fmt.Sprint(*listInstanceGroupManagerActionsOptions.Limit))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManagerActionsCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateInstanceGroupManagerAction : Create an instance group manager action
// This request creates a new instance group manager action.
func (vpc *VpcV1) CreateInstanceGroupManagerAction(createInstanceGroupManagerActionOptions *CreateInstanceGroupManagerActionOptions) (result InstanceGroupManagerActionIntf, response *core.DetailedResponse, err error) {
	return vpc.CreateInstanceGroupManagerActionWithContext(context.Background(), createInstanceGroupManagerActionOptions)
}

// CreateInstanceGroupManagerActionWithContext is an alternate form of the CreateInstanceGroupManagerAction method which supports a Context parameter
func (vpc *VpcV1) CreateInstanceGroupManagerActionWithContext(ctx context.Context, createInstanceGroupManagerActionOptions *CreateInstanceGroupManagerActionOptions) (result InstanceGroupManagerActionIntf, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createInstanceGroupManagerActionOptions, "createInstanceGroupManagerActionOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createInstanceGroupManagerActionOptions, "createInstanceGroupManagerActionOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_group_id":         *createInstanceGroupManagerActionOptions.InstanceGroupID,
		"instance_group_manager_id": *createInstanceGroupManagerActionOptions.InstanceGroupManagerID,
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/actions`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range createInstanceGroupManagerActionOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateInstanceGroupManagerAction")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(createInstanceGroupManagerActionOptions.InstanceGroupManagerActionPrototype)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManagerAction)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteInstanceGroupManagerAction : Delete specified instance group manager action
// This request deletes an instance group manager action. This operation cannot be reversed.
func (vpc *VpcV1) DeleteInstanceGroupManagerAction(deleteInstanceGroupManagerActionOptions *DeleteInstanceGroupManagerActionOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteInstanceGroupManagerActionWithContext(context.Background(), deleteInstanceGroupManagerActionOptions)
}

// DeleteInstanceGroupManagerActionWithContext is an alternate form of the DeleteInstanceGroupManagerAction method which supports a Context parameter
func (vpc *VpcV1) DeleteInstanceGroupManagerActionWithContext(ctx context.Context, deleteInstanceGroupManagerActionOptions *DeleteInstanceGroupManagerActionOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteInstanceGroupManagerActionOptions, "deleteInstanceGroupManagerActionOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteInstanceGroupManagerActionOptions, "deleteInstanceGroupManagerActionOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_group_id":         *deleteInstanceGroupManagerActionOptions.InstanceGroupID,
		"instance_group_manager_id": *deleteInstanceGroupManagerActionOptions.InstanceGroupManagerID,
		"id":                        *deleteInstanceGroupManagerActionOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/actions/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteInstanceGroupManagerActionOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteInstanceGroupManagerAction")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetInstanceGroupManagerAction : Retrieve specified instance group manager action
// This request retrieves a single instance group manager action specified by identifier in the URL.
func (vpc *VpcV1) GetInstanceGroupManagerAction(getInstanceGroupManagerActionOptions *GetInstanceGroupManagerActionOptions) (result InstanceGroupManagerActionIntf, response *core.DetailedResponse, err error) {
	return vpc.GetInstanceGroupManagerActionWithContext(context.Background(), getInstanceGroupManagerActionOptions)
}

// GetInstanceGroupManagerActionWithContext is an alternate form of the GetInstanceGroupManagerAction method which supports a Context parameter
func (vpc *VpcV1) GetInstanceGroupManagerActionWithContext(ctx context.Context, getInstanceGroupManagerActionOptions *GetInstanceGroupManagerActionOptions) (result InstanceGroupManagerActionIntf, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getInstanceGroupManagerActionOptions, "getInstanceGroupManagerActionOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getInstanceGroupManagerActionOptions, "getInstanceGroupManagerActionOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_group_id":         *getInstanceGroupManagerActionOptions.InstanceGroupID,
		"instance_group_manager_id": *getInstanceGroupManagerActionOptions.InstanceGroupManagerID,
		"id":                        *getInstanceGroupManagerActionOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/actions/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getInstanceGroupManagerActionOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetInstanceGroupManagerAction")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManagerAction)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateInstanceGroupManagerAction : Update specified instance group manager action
// This request updates an instance group manager action.
func (vpc *VpcV1) UpdateInstanceGroupManagerAction(updateInstanceGroupManagerActionOptions *UpdateInstanceGroupManagerActionOptions) (result InstanceGroupManagerActionIntf, response *core.DetailedResponse, err error) {
	return vpc.UpdateInstanceGroupManagerActionWithContext(context.Background(), updateInstanceGroupManagerActionOptions)
}

// UpdateInstanceGroupManagerActionWithContext is an alternate form of the UpdateInstanceGroupManagerAction method which supports a Context parameter
func (vpc *VpcV1) UpdateInstanceGroupManagerActionWithContext(ctx context.Context, updateInstanceGroupManagerActionOptions *UpdateInstanceGroupManagerActionOptions) (result InstanceGroupManagerActionIntf, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateInstanceGroupManagerActionOptions, "updateInstanceGroupManagerActionOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateInstanceGroupManagerActionOptions, "updateInstanceGroupManagerActionOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_group_id":         *updateInstanceGroupManagerActionOptions.InstanceGroupID,
		"instance_group_manager_id": *updateInstanceGroupManagerActionOptions.InstanceGroupManagerID,
		"id":                        *updateInstanceGroupManagerActionOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/actions/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateInstanceGroupManagerActionOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateInstanceGroupManagerAction")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateInstanceGroupManagerActionOptions.InstanceGroupManagerActionPatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManagerAction)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListInstanceGroupManagerPolicies : List all policies for an instance group manager
// This request lists all policies for an instance group manager.
func (vpc *VpcV1) ListInstanceGroupManagerPolicies(listInstanceGroupManagerPoliciesOptions *ListInstanceGroupManagerPoliciesOptions) (result *InstanceGroupManagerPolicyCollection, response *core.DetailedResponse, err error) {
	return vpc.ListInstanceGroupManagerPoliciesWithContext(context.Background(), listInstanceGroupManagerPoliciesOptions)
}

// ListInstanceGroupManagerPoliciesWithContext is an alternate form of the ListInstanceGroupManagerPolicies method which supports a Context parameter
func (vpc *VpcV1) ListInstanceGroupManagerPoliciesWithContext(ctx context.Context, listInstanceGroupManagerPoliciesOptions *ListInstanceGroupManagerPoliciesOptions) (result *InstanceGroupManagerPolicyCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(listInstanceGroupManagerPoliciesOptions, "listInstanceGroupManagerPoliciesOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(listInstanceGroupManagerPoliciesOptions, "listInstanceGroupManagerPoliciesOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_group_id":         *listInstanceGroupManagerPoliciesOptions.InstanceGroupID,
		"instance_group_manager_id": *listInstanceGroupManagerPoliciesOptions.InstanceGroupManagerID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/policies`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range listInstanceGroupManagerPoliciesOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListInstanceGroupManagerPolicies")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listInstanceGroupManagerPoliciesOptions.Start != nil {
		builder.AddQuery("start", fmt.Sprint(*listInstanceGroupManagerPoliciesOptions.Start))
	}
	if listInstanceGroupManagerPoliciesOptions.Limit != nil {
		builder.AddQuery("limit", fmt.Sprint(*listInstanceGroupManagerPoliciesOptions.Limit))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManagerPolicyCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateInstanceGroupManagerPolicy : Create a policy for an instance group manager
// This request creates a new instance group manager policy.
func (vpc *VpcV1) CreateInstanceGroupManagerPolicy(createInstanceGroupManagerPolicyOptions *CreateInstanceGroupManagerPolicyOptions) (result InstanceGroupManagerPolicyIntf, response *core.DetailedResponse, err error) {
	return vpc.CreateInstanceGroupManagerPolicyWithContext(context.Background(), createInstanceGroupManagerPolicyOptions)
}

// CreateInstanceGroupManagerPolicyWithContext is an alternate form of the CreateInstanceGroupManagerPolicy method which supports a Context parameter
func (vpc *VpcV1) CreateInstanceGroupManagerPolicyWithContext(ctx context.Context, createInstanceGroupManagerPolicyOptions *CreateInstanceGroupManagerPolicyOptions) (result InstanceGroupManagerPolicyIntf, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createInstanceGroupManagerPolicyOptions, "createInstanceGroupManagerPolicyOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createInstanceGroupManagerPolicyOptions, "createInstanceGroupManagerPolicyOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_group_id":         *createInstanceGroupManagerPolicyOptions.InstanceGroupID,
		"instance_group_manager_id": *createInstanceGroupManagerPolicyOptions.InstanceGroupManagerID,
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/policies`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range createInstanceGroupManagerPolicyOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateInstanceGroupManagerPolicy")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(createInstanceGroupManagerPolicyOptions.InstanceGroupManagerPolicyPrototype)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManagerPolicy)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteInstanceGroupManagerPolicy : Delete an instance group manager policy
// This request deletes an instance group manager policy. This operation cannot be reversed.
func (vpc *VpcV1) DeleteInstanceGroupManagerPolicy(deleteInstanceGroupManagerPolicyOptions *DeleteInstanceGroupManagerPolicyOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteInstanceGroupManagerPolicyWithContext(context.Background(), deleteInstanceGroupManagerPolicyOptions)
}

// DeleteInstanceGroupManagerPolicyWithContext is an alternate form of the DeleteInstanceGroupManagerPolicy method which supports a Context parameter
func (vpc *VpcV1) DeleteInstanceGroupManagerPolicyWithContext(ctx context.Context, deleteInstanceGroupManagerPolicyOptions *DeleteInstanceGroupManagerPolicyOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteInstanceGroupManagerPolicyOptions, "deleteInstanceGroupManagerPolicyOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteInstanceGroupManagerPolicyOptions, "deleteInstanceGroupManagerPolicyOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_group_id":         *deleteInstanceGroupManagerPolicyOptions.InstanceGroupID,
		"instance_group_manager_id": *deleteInstanceGroupManagerPolicyOptions.InstanceGroupManagerID,
		"id":                        *deleteInstanceGroupManagerPolicyOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/policies/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteInstanceGroupManagerPolicyOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteInstanceGroupManagerPolicy")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetInstanceGroupManagerPolicy : Retrieve an instance group manager policy
// This request retrieves a single instance group manager policy specified by identifier in the URL.
func (vpc *VpcV1) GetInstanceGroupManagerPolicy(getInstanceGroupManagerPolicyOptions *GetInstanceGroupManagerPolicyOptions) (result InstanceGroupManagerPolicyIntf, response *core.DetailedResponse, err error) {
	return vpc.GetInstanceGroupManagerPolicyWithContext(context.Background(), getInstanceGroupManagerPolicyOptions)
}

// GetInstanceGroupManagerPolicyWithContext is an alternate form of the GetInstanceGroupManagerPolicy method which supports a Context parameter
func (vpc *VpcV1) GetInstanceGroupManagerPolicyWithContext(ctx context.Context, getInstanceGroupManagerPolicyOptions *GetInstanceGroupManagerPolicyOptions) (result InstanceGroupManagerPolicyIntf, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getInstanceGroupManagerPolicyOptions, "getInstanceGroupManagerPolicyOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getInstanceGroupManagerPolicyOptions, "getInstanceGroupManagerPolicyOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_group_id":         *getInstanceGroupManagerPolicyOptions.InstanceGroupID,
		"instance_group_manager_id": *getInstanceGroupManagerPolicyOptions.InstanceGroupManagerID,
		"id":                        *getInstanceGroupManagerPolicyOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/policies/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getInstanceGroupManagerPolicyOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetInstanceGroupManagerPolicy")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManagerPolicy)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateInstanceGroupManagerPolicy : Update an instance group manager policy
// This request updates an instance group manager policy.
func (vpc *VpcV1) UpdateInstanceGroupManagerPolicy(updateInstanceGroupManagerPolicyOptions *UpdateInstanceGroupManagerPolicyOptions) (result InstanceGroupManagerPolicyIntf, response *core.DetailedResponse, err error) {
	return vpc.UpdateInstanceGroupManagerPolicyWithContext(context.Background(), updateInstanceGroupManagerPolicyOptions)
}

// UpdateInstanceGroupManagerPolicyWithContext is an alternate form of the UpdateInstanceGroupManagerPolicy method which supports a Context parameter
func (vpc *VpcV1) UpdateInstanceGroupManagerPolicyWithContext(ctx context.Context, updateInstanceGroupManagerPolicyOptions *UpdateInstanceGroupManagerPolicyOptions) (result InstanceGroupManagerPolicyIntf, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateInstanceGroupManagerPolicyOptions, "updateInstanceGroupManagerPolicyOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateInstanceGroupManagerPolicyOptions, "updateInstanceGroupManagerPolicyOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_group_id":         *updateInstanceGroupManagerPolicyOptions.InstanceGroupID,
		"instance_group_manager_id": *updateInstanceGroupManagerPolicyOptions.InstanceGroupManagerID,
		"id":                        *updateInstanceGroupManagerPolicyOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/policies/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateInstanceGroupManagerPolicyOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateInstanceGroupManagerPolicy")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateInstanceGroupManagerPolicyOptions.InstanceGroupManagerPolicyPatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupManagerPolicy)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteInstanceGroupMemberships : Delete all memberships from an instance group
// This request deletes all memberships of an instance group. This operation cannot be reversed. reversed. Any
// memberships that have `delete_instance_on_membership_delete` set to `true` will also have their instances deleted.
func (vpc *VpcV1) DeleteInstanceGroupMemberships(deleteInstanceGroupMembershipsOptions *DeleteInstanceGroupMembershipsOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteInstanceGroupMembershipsWithContext(context.Background(), deleteInstanceGroupMembershipsOptions)
}

// DeleteInstanceGroupMembershipsWithContext is an alternate form of the DeleteInstanceGroupMemberships method which supports a Context parameter
func (vpc *VpcV1) DeleteInstanceGroupMembershipsWithContext(ctx context.Context, deleteInstanceGroupMembershipsOptions *DeleteInstanceGroupMembershipsOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteInstanceGroupMembershipsOptions, "deleteInstanceGroupMembershipsOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteInstanceGroupMembershipsOptions, "deleteInstanceGroupMembershipsOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_group_id": *deleteInstanceGroupMembershipsOptions.InstanceGroupID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/memberships`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteInstanceGroupMembershipsOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteInstanceGroupMemberships")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// ListInstanceGroupMemberships : List all memberships for an instance group
// This request lists all instance group memberships for an instance group.
func (vpc *VpcV1) ListInstanceGroupMemberships(listInstanceGroupMembershipsOptions *ListInstanceGroupMembershipsOptions) (result *InstanceGroupMembershipCollection, response *core.DetailedResponse, err error) {
	return vpc.ListInstanceGroupMembershipsWithContext(context.Background(), listInstanceGroupMembershipsOptions)
}

// ListInstanceGroupMembershipsWithContext is an alternate form of the ListInstanceGroupMemberships method which supports a Context parameter
func (vpc *VpcV1) ListInstanceGroupMembershipsWithContext(ctx context.Context, listInstanceGroupMembershipsOptions *ListInstanceGroupMembershipsOptions) (result *InstanceGroupMembershipCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(listInstanceGroupMembershipsOptions, "listInstanceGroupMembershipsOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(listInstanceGroupMembershipsOptions, "listInstanceGroupMembershipsOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_group_id": *listInstanceGroupMembershipsOptions.InstanceGroupID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/memberships`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range listInstanceGroupMembershipsOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListInstanceGroupMemberships")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listInstanceGroupMembershipsOptions.Start != nil {
		builder.AddQuery("start", fmt.Sprint(*listInstanceGroupMembershipsOptions.Start))
	}
	if listInstanceGroupMembershipsOptions.Limit != nil {
		builder.AddQuery("limit", fmt.Sprint(*listInstanceGroupMembershipsOptions.Limit))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupMembershipCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteInstanceGroupMembership : Delete an instance group membership
// This request deletes a memberships of an instance group. This operation cannot be reversed. reversed. If the
// membership has `delete_instance_on_membership_delete` set to `true`, the instance will also be deleted.
func (vpc *VpcV1) DeleteInstanceGroupMembership(deleteInstanceGroupMembershipOptions *DeleteInstanceGroupMembershipOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteInstanceGroupMembershipWithContext(context.Background(), deleteInstanceGroupMembershipOptions)
}

// DeleteInstanceGroupMembershipWithContext is an alternate form of the DeleteInstanceGroupMembership method which supports a Context parameter
func (vpc *VpcV1) DeleteInstanceGroupMembershipWithContext(ctx context.Context, deleteInstanceGroupMembershipOptions *DeleteInstanceGroupMembershipOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteInstanceGroupMembershipOptions, "deleteInstanceGroupMembershipOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteInstanceGroupMembershipOptions, "deleteInstanceGroupMembershipOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_group_id": *deleteInstanceGroupMembershipOptions.InstanceGroupID,
		"id":                *deleteInstanceGroupMembershipOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/memberships/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteInstanceGroupMembershipOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteInstanceGroupMembership")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetInstanceGroupMembership : Retrieve an instance group membership
// This request retrieves a single instance group membership specified by identifier in the URL.
func (vpc *VpcV1) GetInstanceGroupMembership(getInstanceGroupMembershipOptions *GetInstanceGroupMembershipOptions) (result *InstanceGroupMembership, response *core.DetailedResponse, err error) {
	return vpc.GetInstanceGroupMembershipWithContext(context.Background(), getInstanceGroupMembershipOptions)
}

// GetInstanceGroupMembershipWithContext is an alternate form of the GetInstanceGroupMembership method which supports a Context parameter
func (vpc *VpcV1) GetInstanceGroupMembershipWithContext(ctx context.Context, getInstanceGroupMembershipOptions *GetInstanceGroupMembershipOptions) (result *InstanceGroupMembership, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getInstanceGroupMembershipOptions, "getInstanceGroupMembershipOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getInstanceGroupMembershipOptions, "getInstanceGroupMembershipOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_group_id": *getInstanceGroupMembershipOptions.InstanceGroupID,
		"id":                *getInstanceGroupMembershipOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/memberships/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getInstanceGroupMembershipOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetInstanceGroupMembership")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupMembership)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateInstanceGroupMembership : Update an instance group membership
// This request updates an instance group membership with the information provided instance group membership patch.
func (vpc *VpcV1) UpdateInstanceGroupMembership(updateInstanceGroupMembershipOptions *UpdateInstanceGroupMembershipOptions) (result *InstanceGroupMembership, response *core.DetailedResponse, err error) {
	return vpc.UpdateInstanceGroupMembershipWithContext(context.Background(), updateInstanceGroupMembershipOptions)
}

// UpdateInstanceGroupMembershipWithContext is an alternate form of the UpdateInstanceGroupMembership method which supports a Context parameter
func (vpc *VpcV1) UpdateInstanceGroupMembershipWithContext(ctx context.Context, updateInstanceGroupMembershipOptions *UpdateInstanceGroupMembershipOptions) (result *InstanceGroupMembership, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateInstanceGroupMembershipOptions, "updateInstanceGroupMembershipOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateInstanceGroupMembershipOptions, "updateInstanceGroupMembershipOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"instance_group_id": *updateInstanceGroupMembershipOptions.InstanceGroupID,
		"id":                *updateInstanceGroupMembershipOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/memberships/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateInstanceGroupMembershipOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateInstanceGroupMembership")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateInstanceGroupMembershipOptions.InstanceGroupMembershipPatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalInstanceGroupMembership)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListDedicatedHostGroups : List all dedicated host groups
// This request lists all dedicated host groups in the region. Host groups are a collection of dedicated hosts for
// placement of instances. Each dedicated host must belong to one and only one group. Host groups do not span zones.
func (vpc *VpcV1) ListDedicatedHostGroups(listDedicatedHostGroupsOptions *ListDedicatedHostGroupsOptions) (result *DedicatedHostGroupCollection, response *core.DetailedResponse, err error) {
	return vpc.ListDedicatedHostGroupsWithContext(context.Background(), listDedicatedHostGroupsOptions)
}

// ListDedicatedHostGroupsWithContext is an alternate form of the ListDedicatedHostGroups method which supports a Context parameter
func (vpc *VpcV1) ListDedicatedHostGroupsWithContext(ctx context.Context, listDedicatedHostGroupsOptions *ListDedicatedHostGroupsOptions) (result *DedicatedHostGroupCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateStruct(listDedicatedHostGroupsOptions, "listDedicatedHostGroupsOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/dedicated_host/groups`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range listDedicatedHostGroupsOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListDedicatedHostGroups")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listDedicatedHostGroupsOptions.Start != nil {
		builder.AddQuery("start", fmt.Sprint(*listDedicatedHostGroupsOptions.Start))
	}
	if listDedicatedHostGroupsOptions.Limit != nil {
		builder.AddQuery("limit", fmt.Sprint(*listDedicatedHostGroupsOptions.Limit))
	}
	if listDedicatedHostGroupsOptions.ResourceGroupID != nil {
		builder.AddQuery("resource_group.id", fmt.Sprint(*listDedicatedHostGroupsOptions.ResourceGroupID))
	}
	if listDedicatedHostGroupsOptions.ZoneName != nil {
		builder.AddQuery("zone.name", fmt.Sprint(*listDedicatedHostGroupsOptions.ZoneName))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostGroupCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateDedicatedHostGroup : Create a dedicated host group
// This request creates a new dedicated host group.
func (vpc *VpcV1) CreateDedicatedHostGroup(createDedicatedHostGroupOptions *CreateDedicatedHostGroupOptions) (result *DedicatedHostGroup, response *core.DetailedResponse, err error) {
	return vpc.CreateDedicatedHostGroupWithContext(context.Background(), createDedicatedHostGroupOptions)
}

// CreateDedicatedHostGroupWithContext is an alternate form of the CreateDedicatedHostGroup method which supports a Context parameter
func (vpc *VpcV1) CreateDedicatedHostGroupWithContext(ctx context.Context, createDedicatedHostGroupOptions *CreateDedicatedHostGroupOptions) (result *DedicatedHostGroup, response *core.DetailedResponse, err error) {
	err = core.ValidateStruct(createDedicatedHostGroupOptions, "createDedicatedHostGroupOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/dedicated_host/groups`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range createDedicatedHostGroupOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateDedicatedHostGroup")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	body := make(map[string]interface{})
	if createDedicatedHostGroupOptions.Class != nil {
		body["class"] = createDedicatedHostGroupOptions.Class
	}
	if createDedicatedHostGroupOptions.Family != nil {
		body["family"] = createDedicatedHostGroupOptions.Family
	}
	if createDedicatedHostGroupOptions.Name != nil {
		body["name"] = createDedicatedHostGroupOptions.Name
	}
	if createDedicatedHostGroupOptions.ResourceGroup != nil {
		body["resource_group"] = createDedicatedHostGroupOptions.ResourceGroup
	}
	if createDedicatedHostGroupOptions.Zone != nil {
		body["zone"] = createDedicatedHostGroupOptions.Zone
	}
	_, err = builder.SetBodyContentJSON(body)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostGroup)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteDedicatedHostGroup : Delete a dedicated host group
// This request deletes a dedicated host group.
func (vpc *VpcV1) DeleteDedicatedHostGroup(deleteDedicatedHostGroupOptions *DeleteDedicatedHostGroupOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteDedicatedHostGroupWithContext(context.Background(), deleteDedicatedHostGroupOptions)
}

// DeleteDedicatedHostGroupWithContext is an alternate form of the DeleteDedicatedHostGroup method which supports a Context parameter
func (vpc *VpcV1) DeleteDedicatedHostGroupWithContext(ctx context.Context, deleteDedicatedHostGroupOptions *DeleteDedicatedHostGroupOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteDedicatedHostGroupOptions, "deleteDedicatedHostGroupOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteDedicatedHostGroupOptions, "deleteDedicatedHostGroupOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *deleteDedicatedHostGroupOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/dedicated_host/groups/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteDedicatedHostGroupOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteDedicatedHostGroup")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetDedicatedHostGroup : Retrieve a dedicated host group
// This request retrieves a single dedicated host group specified by the identifier in the URL.
func (vpc *VpcV1) GetDedicatedHostGroup(getDedicatedHostGroupOptions *GetDedicatedHostGroupOptions) (result *DedicatedHostGroup, response *core.DetailedResponse, err error) {
	return vpc.GetDedicatedHostGroupWithContext(context.Background(), getDedicatedHostGroupOptions)
}

// GetDedicatedHostGroupWithContext is an alternate form of the GetDedicatedHostGroup method which supports a Context parameter
func (vpc *VpcV1) GetDedicatedHostGroupWithContext(ctx context.Context, getDedicatedHostGroupOptions *GetDedicatedHostGroupOptions) (result *DedicatedHostGroup, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getDedicatedHostGroupOptions, "getDedicatedHostGroupOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getDedicatedHostGroupOptions, "getDedicatedHostGroupOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *getDedicatedHostGroupOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/dedicated_host/groups/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getDedicatedHostGroupOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetDedicatedHostGroup")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostGroup)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateDedicatedHostGroup : Update a dedicated host group
// This request updates a dedicated host group with the information in a provided dedicated host group patch. The
// dedicated host group patch object is structured in the same way as a retrieved dedicated host group and contains only
// the information to be updated.
func (vpc *VpcV1) UpdateDedicatedHostGroup(updateDedicatedHostGroupOptions *UpdateDedicatedHostGroupOptions) (result *DedicatedHostGroup, response *core.DetailedResponse, err error) {
	return vpc.UpdateDedicatedHostGroupWithContext(context.Background(), updateDedicatedHostGroupOptions)
}

// UpdateDedicatedHostGroupWithContext is an alternate form of the UpdateDedicatedHostGroup method which supports a Context parameter
func (vpc *VpcV1) UpdateDedicatedHostGroupWithContext(ctx context.Context, updateDedicatedHostGroupOptions *UpdateDedicatedHostGroupOptions) (result *DedicatedHostGroup, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateDedicatedHostGroupOptions, "updateDedicatedHostGroupOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateDedicatedHostGroupOptions, "updateDedicatedHostGroupOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *updateDedicatedHostGroupOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/dedicated_host/groups/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateDedicatedHostGroupOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateDedicatedHostGroup")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateDedicatedHostGroupOptions.DedicatedHostGroupPatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostGroup)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListDedicatedHostProfiles : List all dedicated host profiles
// This request lists all provisionable dedicated host profiles in the region. A dedicated host profile specifies the
// hardware characteristics for a dedicated host.
func (vpc *VpcV1) ListDedicatedHostProfiles(listDedicatedHostProfilesOptions *ListDedicatedHostProfilesOptions) (result *DedicatedHostProfileCollection, response *core.DetailedResponse, err error) {
	return vpc.ListDedicatedHostProfilesWithContext(context.Background(), listDedicatedHostProfilesOptions)
}

// ListDedicatedHostProfilesWithContext is an alternate form of the ListDedicatedHostProfiles method which supports a Context parameter
func (vpc *VpcV1) ListDedicatedHostProfilesWithContext(ctx context.Context, listDedicatedHostProfilesOptions *ListDedicatedHostProfilesOptions) (result *DedicatedHostProfileCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateStruct(listDedicatedHostProfilesOptions, "listDedicatedHostProfilesOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/dedicated_host/profiles`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range listDedicatedHostProfilesOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListDedicatedHostProfiles")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listDedicatedHostProfilesOptions.Start != nil {
		builder.AddQuery("start", fmt.Sprint(*listDedicatedHostProfilesOptions.Start))
	}
	if listDedicatedHostProfilesOptions.Limit != nil {
		builder.AddQuery("limit", fmt.Sprint(*listDedicatedHostProfilesOptions.Limit))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostProfileCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// GetDedicatedHostProfile : Retrieve a dedicated host profile
// This request retrieves a single dedicated host profile specified by the name in the URL.
func (vpc *VpcV1) GetDedicatedHostProfile(getDedicatedHostProfileOptions *GetDedicatedHostProfileOptions) (result *DedicatedHostProfile, response *core.DetailedResponse, err error) {
	return vpc.GetDedicatedHostProfileWithContext(context.Background(), getDedicatedHostProfileOptions)
}

// GetDedicatedHostProfileWithContext is an alternate form of the GetDedicatedHostProfile method which supports a Context parameter
func (vpc *VpcV1) GetDedicatedHostProfileWithContext(ctx context.Context, getDedicatedHostProfileOptions *GetDedicatedHostProfileOptions) (result *DedicatedHostProfile, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getDedicatedHostProfileOptions, "getDedicatedHostProfileOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getDedicatedHostProfileOptions, "getDedicatedHostProfileOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"name": *getDedicatedHostProfileOptions.Name,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/dedicated_host/profiles/{name}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getDedicatedHostProfileOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetDedicatedHostProfile")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostProfile)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListDedicatedHosts : List all dedicated hosts
// This request lists all dedicated hosts in the region.
func (vpc *VpcV1) ListDedicatedHosts(listDedicatedHostsOptions *ListDedicatedHostsOptions) (result *DedicatedHostCollection, response *core.DetailedResponse, err error) {
	return vpc.ListDedicatedHostsWithContext(context.Background(), listDedicatedHostsOptions)
}

// ListDedicatedHostsWithContext is an alternate form of the ListDedicatedHosts method which supports a Context parameter
func (vpc *VpcV1) ListDedicatedHostsWithContext(ctx context.Context, listDedicatedHostsOptions *ListDedicatedHostsOptions) (result *DedicatedHostCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateStruct(listDedicatedHostsOptions, "listDedicatedHostsOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/dedicated_hosts`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range listDedicatedHostsOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListDedicatedHosts")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listDedicatedHostsOptions.DedicatedHostGroupID != nil {
		builder.AddQuery("dedicated_host_group.id", fmt.Sprint(*listDedicatedHostsOptions.DedicatedHostGroupID))
	}
	if listDedicatedHostsOptions.Start != nil {
		builder.AddQuery("start", fmt.Sprint(*listDedicatedHostsOptions.Start))
	}
	if listDedicatedHostsOptions.Limit != nil {
		builder.AddQuery("limit", fmt.Sprint(*listDedicatedHostsOptions.Limit))
	}
	if listDedicatedHostsOptions.ResourceGroupID != nil {
		builder.AddQuery("resource_group.id", fmt.Sprint(*listDedicatedHostsOptions.ResourceGroupID))
	}
	if listDedicatedHostsOptions.ZoneName != nil {
		builder.AddQuery("zone.name", fmt.Sprint(*listDedicatedHostsOptions.ZoneName))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateDedicatedHost : Create a dedicated host
// This request creates a new dedicated host.
func (vpc *VpcV1) CreateDedicatedHost(createDedicatedHostOptions *CreateDedicatedHostOptions) (result *DedicatedHost, response *core.DetailedResponse, err error) {
	return vpc.CreateDedicatedHostWithContext(context.Background(), createDedicatedHostOptions)
}

// CreateDedicatedHostWithContext is an alternate form of the CreateDedicatedHost method which supports a Context parameter
func (vpc *VpcV1) CreateDedicatedHostWithContext(ctx context.Context, createDedicatedHostOptions *CreateDedicatedHostOptions) (result *DedicatedHost, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createDedicatedHostOptions, "createDedicatedHostOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createDedicatedHostOptions, "createDedicatedHostOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/dedicated_hosts`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range createDedicatedHostOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateDedicatedHost")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(createDedicatedHostOptions.DedicatedHostPrototype)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHost)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListDedicatedHostDisks : List all disks on a dedicated host
// This request lists all disks on a dedicated host.  A disk is a physical device that is locally attached to the
// compute node. By default, the listed disks are sorted by their
// `created_at` property values, with the newest disk first.
func (vpc *VpcV1) ListDedicatedHostDisks(listDedicatedHostDisksOptions *ListDedicatedHostDisksOptions) (result *DedicatedHostDiskCollection, response *core.DetailedResponse, err error) {
	return vpc.ListDedicatedHostDisksWithContext(context.Background(), listDedicatedHostDisksOptions)
}

// ListDedicatedHostDisksWithContext is an alternate form of the ListDedicatedHostDisks method which supports a Context parameter
func (vpc *VpcV1) ListDedicatedHostDisksWithContext(ctx context.Context, listDedicatedHostDisksOptions *ListDedicatedHostDisksOptions) (result *DedicatedHostDiskCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(listDedicatedHostDisksOptions, "listDedicatedHostDisksOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(listDedicatedHostDisksOptions, "listDedicatedHostDisksOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"dedicated_host_id": *listDedicatedHostDisksOptions.DedicatedHostID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/dedicated_hosts/{dedicated_host_id}/disks`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range listDedicatedHostDisksOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListDedicatedHostDisks")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostDiskCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// GetDedicatedHostDisk : Retrieve a dedicated host disk
// This request retrieves a single dedicated host disk specified by the identifier in the URL.
func (vpc *VpcV1) GetDedicatedHostDisk(getDedicatedHostDiskOptions *GetDedicatedHostDiskOptions) (result *DedicatedHostDisk, response *core.DetailedResponse, err error) {
	return vpc.GetDedicatedHostDiskWithContext(context.Background(), getDedicatedHostDiskOptions)
}

// GetDedicatedHostDiskWithContext is an alternate form of the GetDedicatedHostDisk method which supports a Context parameter
func (vpc *VpcV1) GetDedicatedHostDiskWithContext(ctx context.Context, getDedicatedHostDiskOptions *GetDedicatedHostDiskOptions) (result *DedicatedHostDisk, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getDedicatedHostDiskOptions, "getDedicatedHostDiskOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getDedicatedHostDiskOptions, "getDedicatedHostDiskOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"dedicated_host_id": *getDedicatedHostDiskOptions.DedicatedHostID,
		"id":                *getDedicatedHostDiskOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/dedicated_hosts/{dedicated_host_id}/disks/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getDedicatedHostDiskOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetDedicatedHostDisk")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostDisk)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateDedicatedHostDisk : Update a dedicated host disk
// This request updates the dedicated host disk with the information in a provided patch.
func (vpc *VpcV1) UpdateDedicatedHostDisk(updateDedicatedHostDiskOptions *UpdateDedicatedHostDiskOptions) (result *DedicatedHostDisk, response *core.DetailedResponse, err error) {
	return vpc.UpdateDedicatedHostDiskWithContext(context.Background(), updateDedicatedHostDiskOptions)
}

// UpdateDedicatedHostDiskWithContext is an alternate form of the UpdateDedicatedHostDisk method which supports a Context parameter
func (vpc *VpcV1) UpdateDedicatedHostDiskWithContext(ctx context.Context, updateDedicatedHostDiskOptions *UpdateDedicatedHostDiskOptions) (result *DedicatedHostDisk, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateDedicatedHostDiskOptions, "updateDedicatedHostDiskOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateDedicatedHostDiskOptions, "updateDedicatedHostDiskOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"dedicated_host_id": *updateDedicatedHostDiskOptions.DedicatedHostID,
		"id":                *updateDedicatedHostDiskOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/dedicated_hosts/{dedicated_host_id}/disks/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateDedicatedHostDiskOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateDedicatedHostDisk")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateDedicatedHostDiskOptions.DedicatedHostDiskPatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHostDisk)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteDedicatedHost : Delete a dedicated host
// This request deletes a dedicated host.
func (vpc *VpcV1) DeleteDedicatedHost(deleteDedicatedHostOptions *DeleteDedicatedHostOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteDedicatedHostWithContext(context.Background(), deleteDedicatedHostOptions)
}

// DeleteDedicatedHostWithContext is an alternate form of the DeleteDedicatedHost method which supports a Context parameter
func (vpc *VpcV1) DeleteDedicatedHostWithContext(ctx context.Context, deleteDedicatedHostOptions *DeleteDedicatedHostOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteDedicatedHostOptions, "deleteDedicatedHostOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteDedicatedHostOptions, "deleteDedicatedHostOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *deleteDedicatedHostOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/dedicated_hosts/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteDedicatedHostOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteDedicatedHost")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetDedicatedHost : Retrieve a dedicated host
// This request retrieves a single dedicated host specified by the identifiers in the URL.
func (vpc *VpcV1) GetDedicatedHost(getDedicatedHostOptions *GetDedicatedHostOptions) (result *DedicatedHost, response *core.DetailedResponse, err error) {
	return vpc.GetDedicatedHostWithContext(context.Background(), getDedicatedHostOptions)
}

// GetDedicatedHostWithContext is an alternate form of the GetDedicatedHost method which supports a Context parameter
func (vpc *VpcV1) GetDedicatedHostWithContext(ctx context.Context, getDedicatedHostOptions *GetDedicatedHostOptions) (result *DedicatedHost, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getDedicatedHostOptions, "getDedicatedHostOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getDedicatedHostOptions, "getDedicatedHostOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *getDedicatedHostOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/dedicated_hosts/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getDedicatedHostOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetDedicatedHost")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHost)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateDedicatedHost : Update a dedicated host
// This request updates a dedicated host with the information in a provided dedicated host patch. The dedicated host
// patch object is structured in the same way as a retrieved dedicated host and contains only the information to be
// updated.
func (vpc *VpcV1) UpdateDedicatedHost(updateDedicatedHostOptions *UpdateDedicatedHostOptions) (result *DedicatedHost, response *core.DetailedResponse, err error) {
	return vpc.UpdateDedicatedHostWithContext(context.Background(), updateDedicatedHostOptions)
}

// UpdateDedicatedHostWithContext is an alternate form of the UpdateDedicatedHost method which supports a Context parameter
func (vpc *VpcV1) UpdateDedicatedHostWithContext(ctx context.Context, updateDedicatedHostOptions *UpdateDedicatedHostOptions) (result *DedicatedHost, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateDedicatedHostOptions, "updateDedicatedHostOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateDedicatedHostOptions, "updateDedicatedHostOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *updateDedicatedHostOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/dedicated_hosts/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateDedicatedHostOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateDedicatedHost")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateDedicatedHostOptions.DedicatedHostPatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalDedicatedHost)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListVolumeProfiles : List all volume profiles
// This request lists all volume profiles available in the region. A volume profile specifies the performance
// characteristics and pricing model for a volume.
func (vpc *VpcV1) ListVolumeProfiles(listVolumeProfilesOptions *ListVolumeProfilesOptions) (result *VolumeProfileCollection, response *core.DetailedResponse, err error) {
	return vpc.ListVolumeProfilesWithContext(context.Background(), listVolumeProfilesOptions)
}

// ListVolumeProfilesWithContext is an alternate form of the ListVolumeProfiles method which supports a Context parameter
func (vpc *VpcV1) ListVolumeProfilesWithContext(ctx context.Context, listVolumeProfilesOptions *ListVolumeProfilesOptions) (result *VolumeProfileCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateStruct(listVolumeProfilesOptions, "listVolumeProfilesOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/volume/profiles`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range listVolumeProfilesOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListVolumeProfiles")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listVolumeProfilesOptions.Start != nil {
		builder.AddQuery("start", fmt.Sprint(*listVolumeProfilesOptions.Start))
	}
	if listVolumeProfilesOptions.Limit != nil {
		builder.AddQuery("limit", fmt.Sprint(*listVolumeProfilesOptions.Limit))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolumeProfileCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// GetVolumeProfile : Retrieve a volume profile
// This request retrieves a single volume profile specified by the name in the URL.
func (vpc *VpcV1) GetVolumeProfile(getVolumeProfileOptions *GetVolumeProfileOptions) (result *VolumeProfile, response *core.DetailedResponse, err error) {
	return vpc.GetVolumeProfileWithContext(context.Background(), getVolumeProfileOptions)
}

// GetVolumeProfileWithContext is an alternate form of the GetVolumeProfile method which supports a Context parameter
func (vpc *VpcV1) GetVolumeProfileWithContext(ctx context.Context, getVolumeProfileOptions *GetVolumeProfileOptions) (result *VolumeProfile, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getVolumeProfileOptions, "getVolumeProfileOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getVolumeProfileOptions, "getVolumeProfileOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"name": *getVolumeProfileOptions.Name,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/volume/profiles/{name}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getVolumeProfileOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetVolumeProfile")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolumeProfile)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListVolumes : List all volumes
// This request lists all volumes in the region. Volumes are network-connected block storage devices that may be
// attached to one or more instances in the same region.
func (vpc *VpcV1) ListVolumes(listVolumesOptions *ListVolumesOptions) (result *VolumeCollection, response *core.DetailedResponse, err error) {
	return vpc.ListVolumesWithContext(context.Background(), listVolumesOptions)
}

// ListVolumesWithContext is an alternate form of the ListVolumes method which supports a Context parameter
func (vpc *VpcV1) ListVolumesWithContext(ctx context.Context, listVolumesOptions *ListVolumesOptions) (result *VolumeCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateStruct(listVolumesOptions, "listVolumesOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/volumes`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range listVolumesOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListVolumes")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listVolumesOptions.Start != nil {
		builder.AddQuery("start", fmt.Sprint(*listVolumesOptions.Start))
	}
	if listVolumesOptions.Limit != nil {
		builder.AddQuery("limit", fmt.Sprint(*listVolumesOptions.Limit))
	}
	if listVolumesOptions.Name != nil {
		builder.AddQuery("name", fmt.Sprint(*listVolumesOptions.Name))
	}
	if listVolumesOptions.ZoneName != nil {
		builder.AddQuery("zone.name", fmt.Sprint(*listVolumesOptions.ZoneName))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolumeCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateVolume : Create a volume
// This request creates a new volume from a volume prototype object. The prototype object is structured in the same way
// as a retrieved volume, and contains the information necessary to create the new volume.
func (vpc *VpcV1) CreateVolume(createVolumeOptions *CreateVolumeOptions) (result *Volume, response *core.DetailedResponse, err error) {
	return vpc.CreateVolumeWithContext(context.Background(), createVolumeOptions)
}

// CreateVolumeWithContext is an alternate form of the CreateVolume method which supports a Context parameter
func (vpc *VpcV1) CreateVolumeWithContext(ctx context.Context, createVolumeOptions *CreateVolumeOptions) (result *Volume, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createVolumeOptions, "createVolumeOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createVolumeOptions, "createVolumeOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/volumes`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range createVolumeOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateVolume")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(createVolumeOptions.VolumePrototype)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolume)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteVolume : Delete a volume
// This request deletes a volume. This operation cannot be reversed. For this request to succeed, the volume must not be
// attached to any instances.
func (vpc *VpcV1) DeleteVolume(deleteVolumeOptions *DeleteVolumeOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteVolumeWithContext(context.Background(), deleteVolumeOptions)
}

// DeleteVolumeWithContext is an alternate form of the DeleteVolume method which supports a Context parameter
func (vpc *VpcV1) DeleteVolumeWithContext(ctx context.Context, deleteVolumeOptions *DeleteVolumeOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteVolumeOptions, "deleteVolumeOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteVolumeOptions, "deleteVolumeOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *deleteVolumeOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/volumes/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteVolumeOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteVolume")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetVolume : Retrieve a volume
// This request retrieves a single volume specified by the identifier in the URL.
func (vpc *VpcV1) GetVolume(getVolumeOptions *GetVolumeOptions) (result *Volume, response *core.DetailedResponse, err error) {
	return vpc.GetVolumeWithContext(context.Background(), getVolumeOptions)
}

// GetVolumeWithContext is an alternate form of the GetVolume method which supports a Context parameter
func (vpc *VpcV1) GetVolumeWithContext(ctx context.Context, getVolumeOptions *GetVolumeOptions) (result *Volume, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getVolumeOptions, "getVolumeOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getVolumeOptions, "getVolumeOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *getVolumeOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/volumes/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getVolumeOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetVolume")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolume)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateVolume : Update a volume
// This request updates a volume with the information in a provided volume patch. The volume patch object is structured
// in the same way as a retrieved volume and contains only the information to be updated.
func (vpc *VpcV1) UpdateVolume(updateVolumeOptions *UpdateVolumeOptions) (result *Volume, response *core.DetailedResponse, err error) {
	return vpc.UpdateVolumeWithContext(context.Background(), updateVolumeOptions)
}

// UpdateVolumeWithContext is an alternate form of the UpdateVolume method which supports a Context parameter
func (vpc *VpcV1) UpdateVolumeWithContext(ctx context.Context, updateVolumeOptions *UpdateVolumeOptions) (result *Volume, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateVolumeOptions, "updateVolumeOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateVolumeOptions, "updateVolumeOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *updateVolumeOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/volumes/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateVolumeOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateVolume")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateVolumeOptions.VolumePatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVolume)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListRegions : List all regions
// This request lists all regions. Each region is a separate geographic area that contains multiple isolated zones.
// Resources can be provisioned into one or more zones in a region. Each zone is isolated, but connected to other zones
// in the same region with low-latency and high-bandwidth links. Regions represent the top-level of fault isolation
// available. Resources deployed within a single region also benefit from the low latency afforded by geographic
// proximity.
func (vpc *VpcV1) ListRegions(listRegionsOptions *ListRegionsOptions) (result *RegionCollection, response *core.DetailedResponse, err error) {
	return vpc.ListRegionsWithContext(context.Background(), listRegionsOptions)
}

// ListRegionsWithContext is an alternate form of the ListRegions method which supports a Context parameter
func (vpc *VpcV1) ListRegionsWithContext(ctx context.Context, listRegionsOptions *ListRegionsOptions) (result *RegionCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateStruct(listRegionsOptions, "listRegionsOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/regions`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range listRegionsOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListRegions")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRegionCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// GetRegion : Retrieve a region
// This request retrieves a single region specified by the name in the URL.
func (vpc *VpcV1) GetRegion(getRegionOptions *GetRegionOptions) (result *Region, response *core.DetailedResponse, err error) {
	return vpc.GetRegionWithContext(context.Background(), getRegionOptions)
}

// GetRegionWithContext is an alternate form of the GetRegion method which supports a Context parameter
func (vpc *VpcV1) GetRegionWithContext(ctx context.Context, getRegionOptions *GetRegionOptions) (result *Region, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getRegionOptions, "getRegionOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getRegionOptions, "getRegionOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"name": *getRegionOptions.Name,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/regions/{name}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getRegionOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetRegion")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalRegion)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListRegionZones : List all zones in a region
// This request lists all zones in a region. Zones represent logically-isolated data centers with high-bandwidth and
// low-latency interconnects to other zones in the same region. Faults in a zone do not affect other zones.
func (vpc *VpcV1) ListRegionZones(listRegionZonesOptions *ListRegionZonesOptions) (result *ZoneCollection, response *core.DetailedResponse, err error) {
	return vpc.ListRegionZonesWithContext(context.Background(), listRegionZonesOptions)
}

// ListRegionZonesWithContext is an alternate form of the ListRegionZones method which supports a Context parameter
func (vpc *VpcV1) ListRegionZonesWithContext(ctx context.Context, listRegionZonesOptions *ListRegionZonesOptions) (result *ZoneCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(listRegionZonesOptions, "listRegionZonesOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(listRegionZonesOptions, "listRegionZonesOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"region_name": *listRegionZonesOptions.RegionName,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/regions/{region_name}/zones`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range listRegionZonesOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListRegionZones")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalZoneCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// GetRegionZone : Retrieve a zone
// This request retrieves a single zone specified by the region and zone names in the URL.
func (vpc *VpcV1) GetRegionZone(getRegionZoneOptions *GetRegionZoneOptions) (result *Zone, response *core.DetailedResponse, err error) {
	return vpc.GetRegionZoneWithContext(context.Background(), getRegionZoneOptions)
}

// GetRegionZoneWithContext is an alternate form of the GetRegionZone method which supports a Context parameter
func (vpc *VpcV1) GetRegionZoneWithContext(ctx context.Context, getRegionZoneOptions *GetRegionZoneOptions) (result *Zone, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getRegionZoneOptions, "getRegionZoneOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getRegionZoneOptions, "getRegionZoneOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"region_name": *getRegionZoneOptions.RegionName,
		"name":        *getRegionZoneOptions.Name,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/regions/{region_name}/zones/{name}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getRegionZoneOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetRegionZone")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalZone)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListPublicGateways : List all public gateways
// This request lists all public gateways in the region. A public gateway is a virtual network device associated with a
// VPC, which allows access to the Internet. A public gateway resides in a zone and can be connected to subnets in the
// same zone only.
func (vpc *VpcV1) ListPublicGateways(listPublicGatewaysOptions *ListPublicGatewaysOptions) (result *PublicGatewayCollection, response *core.DetailedResponse, err error) {
	return vpc.ListPublicGatewaysWithContext(context.Background(), listPublicGatewaysOptions)
}

// ListPublicGatewaysWithContext is an alternate form of the ListPublicGateways method which supports a Context parameter
func (vpc *VpcV1) ListPublicGatewaysWithContext(ctx context.Context, listPublicGatewaysOptions *ListPublicGatewaysOptions) (result *PublicGatewayCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateStruct(listPublicGatewaysOptions, "listPublicGatewaysOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/public_gateways`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range listPublicGatewaysOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListPublicGateways")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listPublicGatewaysOptions.Start != nil {
		builder.AddQuery("start", fmt.Sprint(*listPublicGatewaysOptions.Start))
	}
	if listPublicGatewaysOptions.Limit != nil {
		builder.AddQuery("limit", fmt.Sprint(*listPublicGatewaysOptions.Limit))
	}
	if listPublicGatewaysOptions.ResourceGroupID != nil {
		builder.AddQuery("resource_group.id", fmt.Sprint(*listPublicGatewaysOptions.ResourceGroupID))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPublicGatewayCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreatePublicGateway : Create a public gateway
// This request creates a new public gateway from a public gateway prototype object. For this to succeed, the VPC must
// not already have a public gateway in the specified zone.
//
// If a floating IP is provided, it must be unbound. If a floating IP is not provided, one will be created and bound to
// the public gateway. Once a public gateway has been created, its floating IP cannot be unbound. A public gateway must
// be explicitly attached to each subnet it will provide connectivity for.
func (vpc *VpcV1) CreatePublicGateway(createPublicGatewayOptions *CreatePublicGatewayOptions) (result *PublicGateway, response *core.DetailedResponse, err error) {
	return vpc.CreatePublicGatewayWithContext(context.Background(), createPublicGatewayOptions)
}

// CreatePublicGatewayWithContext is an alternate form of the CreatePublicGateway method which supports a Context parameter
func (vpc *VpcV1) CreatePublicGatewayWithContext(ctx context.Context, createPublicGatewayOptions *CreatePublicGatewayOptions) (result *PublicGateway, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createPublicGatewayOptions, "createPublicGatewayOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createPublicGatewayOptions, "createPublicGatewayOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/public_gateways`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range createPublicGatewayOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreatePublicGateway")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	body := make(map[string]interface{})
	if createPublicGatewayOptions.VPC != nil {
		body["vpc"] = createPublicGatewayOptions.VPC
	}
	if createPublicGatewayOptions.Zone != nil {
		body["zone"] = createPublicGatewayOptions.Zone
	}
	if createPublicGatewayOptions.FloatingIP != nil {
		body["floating_ip"] = createPublicGatewayOptions.FloatingIP
	}
	if createPublicGatewayOptions.Name != nil {
		body["name"] = createPublicGatewayOptions.Name
	}
	if createPublicGatewayOptions.ResourceGroup != nil {
		body["resource_group"] = createPublicGatewayOptions.ResourceGroup
	}
	_, err = builder.SetBodyContentJSON(body)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPublicGateway)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeletePublicGateway : Delete a public gateway
// This request deletes a public gateway. This operation cannot be reversed. For this request to succeed, the public
// gateway must not be attached to any subnets. The public gateway's floating IP will be automatically unbound. If the
// floating IP was created when the public gateway was created, it will be deleted.
func (vpc *VpcV1) DeletePublicGateway(deletePublicGatewayOptions *DeletePublicGatewayOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeletePublicGatewayWithContext(context.Background(), deletePublicGatewayOptions)
}

// DeletePublicGatewayWithContext is an alternate form of the DeletePublicGateway method which supports a Context parameter
func (vpc *VpcV1) DeletePublicGatewayWithContext(ctx context.Context, deletePublicGatewayOptions *DeletePublicGatewayOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deletePublicGatewayOptions, "deletePublicGatewayOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deletePublicGatewayOptions, "deletePublicGatewayOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *deletePublicGatewayOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/public_gateways/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deletePublicGatewayOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeletePublicGateway")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetPublicGateway : Retrieve a public gateway
// This request retrieves a single public gateway specified by the identifier in the URL.
func (vpc *VpcV1) GetPublicGateway(getPublicGatewayOptions *GetPublicGatewayOptions) (result *PublicGateway, response *core.DetailedResponse, err error) {
	return vpc.GetPublicGatewayWithContext(context.Background(), getPublicGatewayOptions)
}

// GetPublicGatewayWithContext is an alternate form of the GetPublicGateway method which supports a Context parameter
func (vpc *VpcV1) GetPublicGatewayWithContext(ctx context.Context, getPublicGatewayOptions *GetPublicGatewayOptions) (result *PublicGateway, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getPublicGatewayOptions, "getPublicGatewayOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getPublicGatewayOptions, "getPublicGatewayOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *getPublicGatewayOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/public_gateways/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getPublicGatewayOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetPublicGateway")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPublicGateway)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdatePublicGateway : Update a public gateway
// This request updates a public gateway's name.
func (vpc *VpcV1) UpdatePublicGateway(updatePublicGatewayOptions *UpdatePublicGatewayOptions) (result *PublicGateway, response *core.DetailedResponse, err error) {
	return vpc.UpdatePublicGatewayWithContext(context.Background(), updatePublicGatewayOptions)
}

// UpdatePublicGatewayWithContext is an alternate form of the UpdatePublicGateway method which supports a Context parameter
func (vpc *VpcV1) UpdatePublicGatewayWithContext(ctx context.Context, updatePublicGatewayOptions *UpdatePublicGatewayOptions) (result *PublicGateway, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updatePublicGatewayOptions, "updatePublicGatewayOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updatePublicGatewayOptions, "updatePublicGatewayOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *updatePublicGatewayOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/public_gateways/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updatePublicGatewayOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdatePublicGateway")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updatePublicGatewayOptions.PublicGatewayPatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalPublicGateway)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListFloatingIps : List all floating IPs
// This request lists all floating IPs in the region. Floating IPs allow inbound and outbound traffic from the Internet
// to an instance.
func (vpc *VpcV1) ListFloatingIps(listFloatingIpsOptions *ListFloatingIpsOptions) (result *FloatingIPCollection, response *core.DetailedResponse, err error) {
	return vpc.ListFloatingIpsWithContext(context.Background(), listFloatingIpsOptions)
}

// ListFloatingIpsWithContext is an alternate form of the ListFloatingIps method which supports a Context parameter
func (vpc *VpcV1) ListFloatingIpsWithContext(ctx context.Context, listFloatingIpsOptions *ListFloatingIpsOptions) (result *FloatingIPCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateStruct(listFloatingIpsOptions, "listFloatingIpsOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/floating_ips`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range listFloatingIpsOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListFloatingIps")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listFloatingIpsOptions.Start != nil {
		builder.AddQuery("start", fmt.Sprint(*listFloatingIpsOptions.Start))
	}
	if listFloatingIpsOptions.Limit != nil {
		builder.AddQuery("limit", fmt.Sprint(*listFloatingIpsOptions.Limit))
	}
	if listFloatingIpsOptions.ResourceGroupID != nil {
		builder.AddQuery("resource_group.id", fmt.Sprint(*listFloatingIpsOptions.ResourceGroupID))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIPCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateFloatingIP : Reserve a floating IP
// This request reserves a new floating IP.
func (vpc *VpcV1) CreateFloatingIP(createFloatingIPOptions *CreateFloatingIPOptions) (result *FloatingIP, response *core.DetailedResponse, err error) {
	return vpc.CreateFloatingIPWithContext(context.Background(), createFloatingIPOptions)
}

// CreateFloatingIPWithContext is an alternate form of the CreateFloatingIP method which supports a Context parameter
func (vpc *VpcV1) CreateFloatingIPWithContext(ctx context.Context, createFloatingIPOptions *CreateFloatingIPOptions) (result *FloatingIP, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createFloatingIPOptions, "createFloatingIPOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createFloatingIPOptions, "createFloatingIPOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/floating_ips`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range createFloatingIPOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateFloatingIP")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(createFloatingIPOptions.FloatingIPPrototype)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIP)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteFloatingIP : Release a floating IP
// This request disassociates (if associated) and releases a floating IP. This operation cannot be reversed. For this
// request to succeed, the floating IP must not be required by another resource, such as a public gateway.
func (vpc *VpcV1) DeleteFloatingIP(deleteFloatingIPOptions *DeleteFloatingIPOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteFloatingIPWithContext(context.Background(), deleteFloatingIPOptions)
}

// DeleteFloatingIPWithContext is an alternate form of the DeleteFloatingIP method which supports a Context parameter
func (vpc *VpcV1) DeleteFloatingIPWithContext(ctx context.Context, deleteFloatingIPOptions *DeleteFloatingIPOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteFloatingIPOptions, "deleteFloatingIPOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteFloatingIPOptions, "deleteFloatingIPOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *deleteFloatingIPOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/floating_ips/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteFloatingIPOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteFloatingIP")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetFloatingIP : Retrieve a floating IP
// This request retrieves a single floating IP specified by the identifier in the URL.
func (vpc *VpcV1) GetFloatingIP(getFloatingIPOptions *GetFloatingIPOptions) (result *FloatingIP, response *core.DetailedResponse, err error) {
	return vpc.GetFloatingIPWithContext(context.Background(), getFloatingIPOptions)
}

// GetFloatingIPWithContext is an alternate form of the GetFloatingIP method which supports a Context parameter
func (vpc *VpcV1) GetFloatingIPWithContext(ctx context.Context, getFloatingIPOptions *GetFloatingIPOptions) (result *FloatingIP, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getFloatingIPOptions, "getFloatingIPOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getFloatingIPOptions, "getFloatingIPOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *getFloatingIPOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/floating_ips/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getFloatingIPOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetFloatingIP")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIP)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateFloatingIP : Update a floating IP
// This request updates a floating IP's name and/or target.
func (vpc *VpcV1) UpdateFloatingIP(updateFloatingIPOptions *UpdateFloatingIPOptions) (result *FloatingIP, response *core.DetailedResponse, err error) {
	return vpc.UpdateFloatingIPWithContext(context.Background(), updateFloatingIPOptions)
}

// UpdateFloatingIPWithContext is an alternate form of the UpdateFloatingIP method which supports a Context parameter
func (vpc *VpcV1) UpdateFloatingIPWithContext(ctx context.Context, updateFloatingIPOptions *UpdateFloatingIPOptions) (result *FloatingIP, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateFloatingIPOptions, "updateFloatingIPOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateFloatingIPOptions, "updateFloatingIPOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *updateFloatingIPOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/floating_ips/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateFloatingIPOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateFloatingIP")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateFloatingIPOptions.FloatingIPPatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFloatingIP)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListNetworkAcls : List all network ACLs
// This request lists all network ACLs in the region. A network ACL defines a set of packet filtering (5-tuple) rules
// for all traffic in and out of a subnet. Both allow and deny rules can be defined, and rules are stateless such that
// reverse traffic in response to allowed traffic is not automatically permitted.
func (vpc *VpcV1) ListNetworkAcls(listNetworkAclsOptions *ListNetworkAclsOptions) (result *NetworkACLCollection, response *core.DetailedResponse, err error) {
	return vpc.ListNetworkAclsWithContext(context.Background(), listNetworkAclsOptions)
}

// ListNetworkAclsWithContext is an alternate form of the ListNetworkAcls method which supports a Context parameter
func (vpc *VpcV1) ListNetworkAclsWithContext(ctx context.Context, listNetworkAclsOptions *ListNetworkAclsOptions) (result *NetworkACLCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateStruct(listNetworkAclsOptions, "listNetworkAclsOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/network_acls`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range listNetworkAclsOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListNetworkAcls")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listNetworkAclsOptions.Start != nil {
		builder.AddQuery("start", fmt.Sprint(*listNetworkAclsOptions.Start))
	}
	if listNetworkAclsOptions.Limit != nil {
		builder.AddQuery("limit", fmt.Sprint(*listNetworkAclsOptions.Limit))
	}
	if listNetworkAclsOptions.ResourceGroupID != nil {
		builder.AddQuery("resource_group.id", fmt.Sprint(*listNetworkAclsOptions.ResourceGroupID))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACLCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateNetworkACL : Create a network ACL
// This request creates a new network ACL from a network ACL prototype object. The prototype object is structured in the
// same way as a retrieved network ACL, and contains the information necessary to create the new network ACL.
func (vpc *VpcV1) CreateNetworkACL(createNetworkACLOptions *CreateNetworkACLOptions) (result *NetworkACL, response *core.DetailedResponse, err error) {
	return vpc.CreateNetworkACLWithContext(context.Background(), createNetworkACLOptions)
}

// CreateNetworkACLWithContext is an alternate form of the CreateNetworkACL method which supports a Context parameter
func (vpc *VpcV1) CreateNetworkACLWithContext(ctx context.Context, createNetworkACLOptions *CreateNetworkACLOptions) (result *NetworkACL, response *core.DetailedResponse, err error) {
	err = core.ValidateStruct(createNetworkACLOptions, "createNetworkACLOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/network_acls`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range createNetworkACLOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateNetworkACL")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	if createNetworkACLOptions.NetworkACLPrototype != nil {
		_, err = builder.SetBodyContentJSON(createNetworkACLOptions.NetworkACLPrototype)
		if err != nil {
			return
		}
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACL)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteNetworkACL : Delete a network ACL
// This request deletes a network ACL. This operation cannot be reversed. For this request to succeed, the network ACL
// must not be the default network ACL for any VPCs, and the network ACL must not be attached to any subnets.
func (vpc *VpcV1) DeleteNetworkACL(deleteNetworkACLOptions *DeleteNetworkACLOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteNetworkACLWithContext(context.Background(), deleteNetworkACLOptions)
}

// DeleteNetworkACLWithContext is an alternate form of the DeleteNetworkACL method which supports a Context parameter
func (vpc *VpcV1) DeleteNetworkACLWithContext(ctx context.Context, deleteNetworkACLOptions *DeleteNetworkACLOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteNetworkACLOptions, "deleteNetworkACLOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteNetworkACLOptions, "deleteNetworkACLOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *deleteNetworkACLOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/network_acls/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteNetworkACLOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteNetworkACL")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetNetworkACL : Retrieve a network ACL
// This request retrieves a single network ACL specified by the identifier in the URL.
func (vpc *VpcV1) GetNetworkACL(getNetworkACLOptions *GetNetworkACLOptions) (result *NetworkACL, response *core.DetailedResponse, err error) {
	return vpc.GetNetworkACLWithContext(context.Background(), getNetworkACLOptions)
}

// GetNetworkACLWithContext is an alternate form of the GetNetworkACL method which supports a Context parameter
func (vpc *VpcV1) GetNetworkACLWithContext(ctx context.Context, getNetworkACLOptions *GetNetworkACLOptions) (result *NetworkACL, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getNetworkACLOptions, "getNetworkACLOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getNetworkACLOptions, "getNetworkACLOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *getNetworkACLOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/network_acls/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getNetworkACLOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetNetworkACL")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACL)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateNetworkACL : Update a network ACL
// This request updates a network ACL's name.
func (vpc *VpcV1) UpdateNetworkACL(updateNetworkACLOptions *UpdateNetworkACLOptions) (result *NetworkACL, response *core.DetailedResponse, err error) {
	return vpc.UpdateNetworkACLWithContext(context.Background(), updateNetworkACLOptions)
}

// UpdateNetworkACLWithContext is an alternate form of the UpdateNetworkACL method which supports a Context parameter
func (vpc *VpcV1) UpdateNetworkACLWithContext(ctx context.Context, updateNetworkACLOptions *UpdateNetworkACLOptions) (result *NetworkACL, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateNetworkACLOptions, "updateNetworkACLOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateNetworkACLOptions, "updateNetworkACLOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *updateNetworkACLOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/network_acls/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateNetworkACLOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateNetworkACL")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateNetworkACLOptions.NetworkACLPatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACL)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListNetworkACLRules : List all rules for a network ACL
// This request lists all rules for a network ACL. These rules can allow or deny traffic between a source CIDR block and
// a destination CIDR block over a particular protocol and port range.
func (vpc *VpcV1) ListNetworkACLRules(listNetworkACLRulesOptions *ListNetworkACLRulesOptions) (result *NetworkACLRuleCollection, response *core.DetailedResponse, err error) {
	return vpc.ListNetworkACLRulesWithContext(context.Background(), listNetworkACLRulesOptions)
}

// ListNetworkACLRulesWithContext is an alternate form of the ListNetworkACLRules method which supports a Context parameter
func (vpc *VpcV1) ListNetworkACLRulesWithContext(ctx context.Context, listNetworkACLRulesOptions *ListNetworkACLRulesOptions) (result *NetworkACLRuleCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(listNetworkACLRulesOptions, "listNetworkACLRulesOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(listNetworkACLRulesOptions, "listNetworkACLRulesOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"network_acl_id": *listNetworkACLRulesOptions.NetworkACLID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/network_acls/{network_acl_id}/rules`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range listNetworkACLRulesOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListNetworkACLRules")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listNetworkACLRulesOptions.Start != nil {
		builder.AddQuery("start", fmt.Sprint(*listNetworkACLRulesOptions.Start))
	}
	if listNetworkACLRulesOptions.Limit != nil {
		builder.AddQuery("limit", fmt.Sprint(*listNetworkACLRulesOptions.Limit))
	}
	if listNetworkACLRulesOptions.Direction != nil {
		builder.AddQuery("direction", fmt.Sprint(*listNetworkACLRulesOptions.Direction))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACLRuleCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateNetworkACLRule : Create a rule for a network ACL
// This request creates a new rule from a network ACL rule prototype object. The prototype object is structured in the
// same way as a retrieved rule, and contains the information necessary to create the new rule.
func (vpc *VpcV1) CreateNetworkACLRule(createNetworkACLRuleOptions *CreateNetworkACLRuleOptions) (result NetworkACLRuleIntf, response *core.DetailedResponse, err error) {
	return vpc.CreateNetworkACLRuleWithContext(context.Background(), createNetworkACLRuleOptions)
}

// CreateNetworkACLRuleWithContext is an alternate form of the CreateNetworkACLRule method which supports a Context parameter
func (vpc *VpcV1) CreateNetworkACLRuleWithContext(ctx context.Context, createNetworkACLRuleOptions *CreateNetworkACLRuleOptions) (result NetworkACLRuleIntf, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createNetworkACLRuleOptions, "createNetworkACLRuleOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createNetworkACLRuleOptions, "createNetworkACLRuleOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"network_acl_id": *createNetworkACLRuleOptions.NetworkACLID,
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/network_acls/{network_acl_id}/rules`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range createNetworkACLRuleOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateNetworkACLRule")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(createNetworkACLRuleOptions.NetworkACLRulePrototype)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACLRule)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteNetworkACLRule : Delete a network ACL rule
// This request deletes a rule. This operation cannot be reversed.
func (vpc *VpcV1) DeleteNetworkACLRule(deleteNetworkACLRuleOptions *DeleteNetworkACLRuleOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteNetworkACLRuleWithContext(context.Background(), deleteNetworkACLRuleOptions)
}

// DeleteNetworkACLRuleWithContext is an alternate form of the DeleteNetworkACLRule method which supports a Context parameter
func (vpc *VpcV1) DeleteNetworkACLRuleWithContext(ctx context.Context, deleteNetworkACLRuleOptions *DeleteNetworkACLRuleOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteNetworkACLRuleOptions, "deleteNetworkACLRuleOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteNetworkACLRuleOptions, "deleteNetworkACLRuleOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"network_acl_id": *deleteNetworkACLRuleOptions.NetworkACLID,
		"id":             *deleteNetworkACLRuleOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/network_acls/{network_acl_id}/rules/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteNetworkACLRuleOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteNetworkACLRule")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetNetworkACLRule : Retrieve a network ACL rule
// This request retrieves a single rule specified by the identifier in the URL.
func (vpc *VpcV1) GetNetworkACLRule(getNetworkACLRuleOptions *GetNetworkACLRuleOptions) (result NetworkACLRuleIntf, response *core.DetailedResponse, err error) {
	return vpc.GetNetworkACLRuleWithContext(context.Background(), getNetworkACLRuleOptions)
}

// GetNetworkACLRuleWithContext is an alternate form of the GetNetworkACLRule method which supports a Context parameter
func (vpc *VpcV1) GetNetworkACLRuleWithContext(ctx context.Context, getNetworkACLRuleOptions *GetNetworkACLRuleOptions) (result NetworkACLRuleIntf, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getNetworkACLRuleOptions, "getNetworkACLRuleOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getNetworkACLRuleOptions, "getNetworkACLRuleOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"network_acl_id": *getNetworkACLRuleOptions.NetworkACLID,
		"id":             *getNetworkACLRuleOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/network_acls/{network_acl_id}/rules/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getNetworkACLRuleOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetNetworkACLRule")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACLRule)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateNetworkACLRule : Update a network ACL rule
// This request updates a rule with the information in a provided rule patch. The rule patch object contains only the
// information to be updated. The request will fail if the information is not applicable to the rule's protocol.
func (vpc *VpcV1) UpdateNetworkACLRule(updateNetworkACLRuleOptions *UpdateNetworkACLRuleOptions) (result NetworkACLRuleIntf, response *core.DetailedResponse, err error) {
	return vpc.UpdateNetworkACLRuleWithContext(context.Background(), updateNetworkACLRuleOptions)
}

// UpdateNetworkACLRuleWithContext is an alternate form of the UpdateNetworkACLRule method which supports a Context parameter
func (vpc *VpcV1) UpdateNetworkACLRuleWithContext(ctx context.Context, updateNetworkACLRuleOptions *UpdateNetworkACLRuleOptions) (result NetworkACLRuleIntf, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateNetworkACLRuleOptions, "updateNetworkACLRuleOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateNetworkACLRuleOptions, "updateNetworkACLRuleOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"network_acl_id": *updateNetworkACLRuleOptions.NetworkACLID,
		"id":             *updateNetworkACLRuleOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/network_acls/{network_acl_id}/rules/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateNetworkACLRuleOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateNetworkACLRule")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateNetworkACLRuleOptions.NetworkACLRulePatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkACLRule)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListSecurityGroups : List all security groups
// This request lists all security groups in the region. Security groups provide a way to apply IP filtering rules to
// instances in the associated VPC. With security groups, all traffic is denied by default, and rules added to security
// groups define which traffic the security group permits. Security group rules are stateful such that reverse traffic
// in response to allowed traffic is automatically permitted.
func (vpc *VpcV1) ListSecurityGroups(listSecurityGroupsOptions *ListSecurityGroupsOptions) (result *SecurityGroupCollection, response *core.DetailedResponse, err error) {
	return vpc.ListSecurityGroupsWithContext(context.Background(), listSecurityGroupsOptions)
}

// ListSecurityGroupsWithContext is an alternate form of the ListSecurityGroups method which supports a Context parameter
func (vpc *VpcV1) ListSecurityGroupsWithContext(ctx context.Context, listSecurityGroupsOptions *ListSecurityGroupsOptions) (result *SecurityGroupCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateStruct(listSecurityGroupsOptions, "listSecurityGroupsOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range listSecurityGroupsOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListSecurityGroups")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listSecurityGroupsOptions.Start != nil {
		builder.AddQuery("start", fmt.Sprint(*listSecurityGroupsOptions.Start))
	}
	if listSecurityGroupsOptions.Limit != nil {
		builder.AddQuery("limit", fmt.Sprint(*listSecurityGroupsOptions.Limit))
	}
	if listSecurityGroupsOptions.ResourceGroupID != nil {
		builder.AddQuery("resource_group.id", fmt.Sprint(*listSecurityGroupsOptions.ResourceGroupID))
	}
	if listSecurityGroupsOptions.VPCID != nil {
		builder.AddQuery("vpc.id", fmt.Sprint(*listSecurityGroupsOptions.VPCID))
	}
	if listSecurityGroupsOptions.VPCCRN != nil {
		builder.AddQuery("vpc.crn", fmt.Sprint(*listSecurityGroupsOptions.VPCCRN))
	}
	if listSecurityGroupsOptions.VPCName != nil {
		builder.AddQuery("vpc.name", fmt.Sprint(*listSecurityGroupsOptions.VPCName))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroupCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateSecurityGroup : Create a security group
// This request creates a new security group from a security group prototype object. The prototype object is structured
// in the same way as a retrieved security group, and contains the information necessary to create the new security
// group. If security group rules are included in the prototype object, those rules will be added to the security group.
// Each security group is scoped to one VPC. Only network interfaces on instances in that VPC can be added to the
// security group.
func (vpc *VpcV1) CreateSecurityGroup(createSecurityGroupOptions *CreateSecurityGroupOptions) (result *SecurityGroup, response *core.DetailedResponse, err error) {
	return vpc.CreateSecurityGroupWithContext(context.Background(), createSecurityGroupOptions)
}

// CreateSecurityGroupWithContext is an alternate form of the CreateSecurityGroup method which supports a Context parameter
func (vpc *VpcV1) CreateSecurityGroupWithContext(ctx context.Context, createSecurityGroupOptions *CreateSecurityGroupOptions) (result *SecurityGroup, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createSecurityGroupOptions, "createSecurityGroupOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createSecurityGroupOptions, "createSecurityGroupOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range createSecurityGroupOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateSecurityGroup")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	body := make(map[string]interface{})
	if createSecurityGroupOptions.VPC != nil {
		body["vpc"] = createSecurityGroupOptions.VPC
	}
	if createSecurityGroupOptions.Name != nil {
		body["name"] = createSecurityGroupOptions.Name
	}
	if createSecurityGroupOptions.ResourceGroup != nil {
		body["resource_group"] = createSecurityGroupOptions.ResourceGroup
	}
	if createSecurityGroupOptions.Rules != nil {
		body["rules"] = createSecurityGroupOptions.Rules
	}
	_, err = builder.SetBodyContentJSON(body)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroup)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteSecurityGroup : Delete a security group
// This request deletes a security group. A security group cannot be deleted if it is referenced by any network
// interfaces or other security group rules. Additionally, a VPC's default security group cannot be deleted. This
// operation cannot be reversed.
func (vpc *VpcV1) DeleteSecurityGroup(deleteSecurityGroupOptions *DeleteSecurityGroupOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteSecurityGroupWithContext(context.Background(), deleteSecurityGroupOptions)
}

// DeleteSecurityGroupWithContext is an alternate form of the DeleteSecurityGroup method which supports a Context parameter
func (vpc *VpcV1) DeleteSecurityGroupWithContext(ctx context.Context, deleteSecurityGroupOptions *DeleteSecurityGroupOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteSecurityGroupOptions, "deleteSecurityGroupOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteSecurityGroupOptions, "deleteSecurityGroupOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *deleteSecurityGroupOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteSecurityGroupOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteSecurityGroup")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetSecurityGroup : Retrieve a security group
// This request retrieves a single security group specified by the identifier in the URL path.
func (vpc *VpcV1) GetSecurityGroup(getSecurityGroupOptions *GetSecurityGroupOptions) (result *SecurityGroup, response *core.DetailedResponse, err error) {
	return vpc.GetSecurityGroupWithContext(context.Background(), getSecurityGroupOptions)
}

// GetSecurityGroupWithContext is an alternate form of the GetSecurityGroup method which supports a Context parameter
func (vpc *VpcV1) GetSecurityGroupWithContext(ctx context.Context, getSecurityGroupOptions *GetSecurityGroupOptions) (result *SecurityGroup, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getSecurityGroupOptions, "getSecurityGroupOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getSecurityGroupOptions, "getSecurityGroupOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *getSecurityGroupOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getSecurityGroupOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetSecurityGroup")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroup)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateSecurityGroup : Update a security group
// This request updates a security group with the information provided in a security group patch object. The security
// group patch object is structured in the same way as a retrieved security group and contains only the information to
// be updated.
func (vpc *VpcV1) UpdateSecurityGroup(updateSecurityGroupOptions *UpdateSecurityGroupOptions) (result *SecurityGroup, response *core.DetailedResponse, err error) {
	return vpc.UpdateSecurityGroupWithContext(context.Background(), updateSecurityGroupOptions)
}

// UpdateSecurityGroupWithContext is an alternate form of the UpdateSecurityGroup method which supports a Context parameter
func (vpc *VpcV1) UpdateSecurityGroupWithContext(ctx context.Context, updateSecurityGroupOptions *UpdateSecurityGroupOptions) (result *SecurityGroup, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateSecurityGroupOptions, "updateSecurityGroupOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateSecurityGroupOptions, "updateSecurityGroupOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *updateSecurityGroupOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateSecurityGroupOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateSecurityGroup")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateSecurityGroupOptions.SecurityGroupPatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroup)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListSecurityGroupNetworkInterfaces : List all network interfaces associated with a security group
// This request lists all network interfaces associated with a security group, to which the rules in the security group
// are applied.
func (vpc *VpcV1) ListSecurityGroupNetworkInterfaces(listSecurityGroupNetworkInterfacesOptions *ListSecurityGroupNetworkInterfacesOptions) (result *NetworkInterfaceCollection, response *core.DetailedResponse, err error) {
	return vpc.ListSecurityGroupNetworkInterfacesWithContext(context.Background(), listSecurityGroupNetworkInterfacesOptions)
}

// ListSecurityGroupNetworkInterfacesWithContext is an alternate form of the ListSecurityGroupNetworkInterfaces method which supports a Context parameter
func (vpc *VpcV1) ListSecurityGroupNetworkInterfacesWithContext(ctx context.Context, listSecurityGroupNetworkInterfacesOptions *ListSecurityGroupNetworkInterfacesOptions) (result *NetworkInterfaceCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(listSecurityGroupNetworkInterfacesOptions, "listSecurityGroupNetworkInterfacesOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(listSecurityGroupNetworkInterfacesOptions, "listSecurityGroupNetworkInterfacesOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"security_group_id": *listSecurityGroupNetworkInterfacesOptions.SecurityGroupID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/network_interfaces`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range listSecurityGroupNetworkInterfacesOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListSecurityGroupNetworkInterfaces")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listSecurityGroupNetworkInterfacesOptions.Start != nil {
		builder.AddQuery("start", fmt.Sprint(*listSecurityGroupNetworkInterfacesOptions.Start))
	}
	if listSecurityGroupNetworkInterfacesOptions.Limit != nil {
		builder.AddQuery("limit", fmt.Sprint(*listSecurityGroupNetworkInterfacesOptions.Limit))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkInterfaceCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// RemoveSecurityGroupNetworkInterface : Remove a network interface from a security group
// This request removes a network interface from a security group. Security groups are stateful, so any changes to a
// network interface's security groups are applied to new connections. Existing connections are not affected. If the
// network interface being removed has no other security groups, it will be attached to the VPC's default security
// group.
func (vpc *VpcV1) RemoveSecurityGroupNetworkInterface(removeSecurityGroupNetworkInterfaceOptions *RemoveSecurityGroupNetworkInterfaceOptions) (response *core.DetailedResponse, err error) {
	return vpc.RemoveSecurityGroupNetworkInterfaceWithContext(context.Background(), removeSecurityGroupNetworkInterfaceOptions)
}

// RemoveSecurityGroupNetworkInterfaceWithContext is an alternate form of the RemoveSecurityGroupNetworkInterface method which supports a Context parameter
func (vpc *VpcV1) RemoveSecurityGroupNetworkInterfaceWithContext(ctx context.Context, removeSecurityGroupNetworkInterfaceOptions *RemoveSecurityGroupNetworkInterfaceOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(removeSecurityGroupNetworkInterfaceOptions, "removeSecurityGroupNetworkInterfaceOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(removeSecurityGroupNetworkInterfaceOptions, "removeSecurityGroupNetworkInterfaceOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"security_group_id": *removeSecurityGroupNetworkInterfaceOptions.SecurityGroupID,
		"id":                *removeSecurityGroupNetworkInterfaceOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/network_interfaces/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range removeSecurityGroupNetworkInterfaceOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "RemoveSecurityGroupNetworkInterface")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetSecurityGroupNetworkInterface : Retrieve a network interface in a security group
// This request retrieves a single network interface specified by the identifier in the URL path. The network interface
// must be an existing member of the security group.
func (vpc *VpcV1) GetSecurityGroupNetworkInterface(getSecurityGroupNetworkInterfaceOptions *GetSecurityGroupNetworkInterfaceOptions) (result *NetworkInterface, response *core.DetailedResponse, err error) {
	return vpc.GetSecurityGroupNetworkInterfaceWithContext(context.Background(), getSecurityGroupNetworkInterfaceOptions)
}

// GetSecurityGroupNetworkInterfaceWithContext is an alternate form of the GetSecurityGroupNetworkInterface method which supports a Context parameter
func (vpc *VpcV1) GetSecurityGroupNetworkInterfaceWithContext(ctx context.Context, getSecurityGroupNetworkInterfaceOptions *GetSecurityGroupNetworkInterfaceOptions) (result *NetworkInterface, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getSecurityGroupNetworkInterfaceOptions, "getSecurityGroupNetworkInterfaceOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getSecurityGroupNetworkInterfaceOptions, "getSecurityGroupNetworkInterfaceOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"security_group_id": *getSecurityGroupNetworkInterfaceOptions.SecurityGroupID,
		"id":                *getSecurityGroupNetworkInterfaceOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/network_interfaces/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getSecurityGroupNetworkInterfaceOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetSecurityGroupNetworkInterface")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkInterface)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// AddSecurityGroupNetworkInterface : Add a network interface to a security group
// This request adds an existing network interface to an existing security group. When a network interface is added to a
// security group, the security group rules are applied to the network interface. A request body is not required, and if
// supplied, is ignored.
func (vpc *VpcV1) AddSecurityGroupNetworkInterface(addSecurityGroupNetworkInterfaceOptions *AddSecurityGroupNetworkInterfaceOptions) (result *NetworkInterface, response *core.DetailedResponse, err error) {
	return vpc.AddSecurityGroupNetworkInterfaceWithContext(context.Background(), addSecurityGroupNetworkInterfaceOptions)
}

// AddSecurityGroupNetworkInterfaceWithContext is an alternate form of the AddSecurityGroupNetworkInterface method which supports a Context parameter
func (vpc *VpcV1) AddSecurityGroupNetworkInterfaceWithContext(ctx context.Context, addSecurityGroupNetworkInterfaceOptions *AddSecurityGroupNetworkInterfaceOptions) (result *NetworkInterface, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(addSecurityGroupNetworkInterfaceOptions, "addSecurityGroupNetworkInterfaceOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(addSecurityGroupNetworkInterfaceOptions, "addSecurityGroupNetworkInterfaceOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"security_group_id": *addSecurityGroupNetworkInterfaceOptions.SecurityGroupID,
		"id":                *addSecurityGroupNetworkInterfaceOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PUT)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/network_interfaces/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range addSecurityGroupNetworkInterfaceOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "AddSecurityGroupNetworkInterface")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkInterface)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListSecurityGroupRules : List all rules in a security group
// This request lists all rules in a security group. These rules define what traffic the security group permits.
// Security group rules are stateful, such that reverse traffic in response to allowed traffic is automatically
// permitted.
func (vpc *VpcV1) ListSecurityGroupRules(listSecurityGroupRulesOptions *ListSecurityGroupRulesOptions) (result *SecurityGroupRuleCollection, response *core.DetailedResponse, err error) {
	return vpc.ListSecurityGroupRulesWithContext(context.Background(), listSecurityGroupRulesOptions)
}

// ListSecurityGroupRulesWithContext is an alternate form of the ListSecurityGroupRules method which supports a Context parameter
func (vpc *VpcV1) ListSecurityGroupRulesWithContext(ctx context.Context, listSecurityGroupRulesOptions *ListSecurityGroupRulesOptions) (result *SecurityGroupRuleCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(listSecurityGroupRulesOptions, "listSecurityGroupRulesOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(listSecurityGroupRulesOptions, "listSecurityGroupRulesOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"security_group_id": *listSecurityGroupRulesOptions.SecurityGroupID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/rules`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range listSecurityGroupRulesOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListSecurityGroupRules")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroupRuleCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateSecurityGroupRule : Create a rule for a security group
// This request creates a new security group rule from a security group rule prototype object. The prototype object is
// structured in the same way as a retrieved security group rule and contains the information necessary to create the
// rule. As part of creating a new rule in a security group, the rule is applied to all the networking interfaces in the
// security group. Rules specify which IP traffic a security group should allow. Security group rules are stateful, such
// that reverse traffic in response to allowed traffic is automatically permitted. A rule allowing inbound TCP traffic
// on port 80 also allows outbound TCP traffic on port 80 without the need for an additional rule.
func (vpc *VpcV1) CreateSecurityGroupRule(createSecurityGroupRuleOptions *CreateSecurityGroupRuleOptions) (result SecurityGroupRuleIntf, response *core.DetailedResponse, err error) {
	return vpc.CreateSecurityGroupRuleWithContext(context.Background(), createSecurityGroupRuleOptions)
}

// CreateSecurityGroupRuleWithContext is an alternate form of the CreateSecurityGroupRule method which supports a Context parameter
func (vpc *VpcV1) CreateSecurityGroupRuleWithContext(ctx context.Context, createSecurityGroupRuleOptions *CreateSecurityGroupRuleOptions) (result SecurityGroupRuleIntf, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createSecurityGroupRuleOptions, "createSecurityGroupRuleOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createSecurityGroupRuleOptions, "createSecurityGroupRuleOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"security_group_id": *createSecurityGroupRuleOptions.SecurityGroupID,
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/rules`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range createSecurityGroupRuleOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateSecurityGroupRule")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(createSecurityGroupRuleOptions.SecurityGroupRulePrototype)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroupRule)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteSecurityGroupRule : Delete a security group rule
// This request deletes a security group rule. This operation cannot be reversed. Removing a security group rule will
// not end existing connections allowed by that rule.
func (vpc *VpcV1) DeleteSecurityGroupRule(deleteSecurityGroupRuleOptions *DeleteSecurityGroupRuleOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteSecurityGroupRuleWithContext(context.Background(), deleteSecurityGroupRuleOptions)
}

// DeleteSecurityGroupRuleWithContext is an alternate form of the DeleteSecurityGroupRule method which supports a Context parameter
func (vpc *VpcV1) DeleteSecurityGroupRuleWithContext(ctx context.Context, deleteSecurityGroupRuleOptions *DeleteSecurityGroupRuleOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteSecurityGroupRuleOptions, "deleteSecurityGroupRuleOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteSecurityGroupRuleOptions, "deleteSecurityGroupRuleOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"security_group_id": *deleteSecurityGroupRuleOptions.SecurityGroupID,
		"id":                *deleteSecurityGroupRuleOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/rules/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteSecurityGroupRuleOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteSecurityGroupRule")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetSecurityGroupRule : Retrieve a security group rule
// This request retrieves a single security group rule specified by the identifier in the URL path.
func (vpc *VpcV1) GetSecurityGroupRule(getSecurityGroupRuleOptions *GetSecurityGroupRuleOptions) (result SecurityGroupRuleIntf, response *core.DetailedResponse, err error) {
	return vpc.GetSecurityGroupRuleWithContext(context.Background(), getSecurityGroupRuleOptions)
}

// GetSecurityGroupRuleWithContext is an alternate form of the GetSecurityGroupRule method which supports a Context parameter
func (vpc *VpcV1) GetSecurityGroupRuleWithContext(ctx context.Context, getSecurityGroupRuleOptions *GetSecurityGroupRuleOptions) (result SecurityGroupRuleIntf, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getSecurityGroupRuleOptions, "getSecurityGroupRuleOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getSecurityGroupRuleOptions, "getSecurityGroupRuleOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"security_group_id": *getSecurityGroupRuleOptions.SecurityGroupID,
		"id":                *getSecurityGroupRuleOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/rules/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getSecurityGroupRuleOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetSecurityGroupRule")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroupRule)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateSecurityGroupRule : Update a security group rule
// This request updates a security group rule with the information in a provided rule patch object. The rule patch
// object contains only the information to be updated. The request will fail if the information is not applicable to the
// rule's protocol.
func (vpc *VpcV1) UpdateSecurityGroupRule(updateSecurityGroupRuleOptions *UpdateSecurityGroupRuleOptions) (result SecurityGroupRuleIntf, response *core.DetailedResponse, err error) {
	return vpc.UpdateSecurityGroupRuleWithContext(context.Background(), updateSecurityGroupRuleOptions)
}

// UpdateSecurityGroupRuleWithContext is an alternate form of the UpdateSecurityGroupRule method which supports a Context parameter
func (vpc *VpcV1) UpdateSecurityGroupRuleWithContext(ctx context.Context, updateSecurityGroupRuleOptions *UpdateSecurityGroupRuleOptions) (result SecurityGroupRuleIntf, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateSecurityGroupRuleOptions, "updateSecurityGroupRuleOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateSecurityGroupRuleOptions, "updateSecurityGroupRuleOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"security_group_id": *updateSecurityGroupRuleOptions.SecurityGroupID,
		"id":                *updateSecurityGroupRuleOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/rules/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateSecurityGroupRuleOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateSecurityGroupRule")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateSecurityGroupRuleOptions.SecurityGroupRulePatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroupRule)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListSecurityGroupTargets : List all targets associated with a security group
// This request lists all targets associated with a security group, to which the rules in the security group are
// applied.
func (vpc *VpcV1) ListSecurityGroupTargets(listSecurityGroupTargetsOptions *ListSecurityGroupTargetsOptions) (result *SecurityGroupTargetCollection, response *core.DetailedResponse, err error) {
	return vpc.ListSecurityGroupTargetsWithContext(context.Background(), listSecurityGroupTargetsOptions)
}

// ListSecurityGroupTargetsWithContext is an alternate form of the ListSecurityGroupTargets method which supports a Context parameter
func (vpc *VpcV1) ListSecurityGroupTargetsWithContext(ctx context.Context, listSecurityGroupTargetsOptions *ListSecurityGroupTargetsOptions) (result *SecurityGroupTargetCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(listSecurityGroupTargetsOptions, "listSecurityGroupTargetsOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(listSecurityGroupTargetsOptions, "listSecurityGroupTargetsOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"security_group_id": *listSecurityGroupTargetsOptions.SecurityGroupID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/targets`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range listSecurityGroupTargetsOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListSecurityGroupTargets")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listSecurityGroupTargetsOptions.Start != nil {
		builder.AddQuery("start", fmt.Sprint(*listSecurityGroupTargetsOptions.Start))
	}
	if listSecurityGroupTargetsOptions.Limit != nil {
		builder.AddQuery("limit", fmt.Sprint(*listSecurityGroupTargetsOptions.Limit))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroupTargetCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteSecurityGroupTargetBinding : Remove a target from a security group
// This request removes a target from a security group. For this request to succeed, the target must be attached to at
// least one other security group.  The supplied target identifier can be:
//
// - A network interface identifier
// - An application load balancer identifier
//
// Security groups are stateful, so any changes to a target's security groups are applied to new connections. Existing
// connections are not affected.
func (vpc *VpcV1) DeleteSecurityGroupTargetBinding(deleteSecurityGroupTargetBindingOptions *DeleteSecurityGroupTargetBindingOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteSecurityGroupTargetBindingWithContext(context.Background(), deleteSecurityGroupTargetBindingOptions)
}

// DeleteSecurityGroupTargetBindingWithContext is an alternate form of the DeleteSecurityGroupTargetBinding method which supports a Context parameter
func (vpc *VpcV1) DeleteSecurityGroupTargetBindingWithContext(ctx context.Context, deleteSecurityGroupTargetBindingOptions *DeleteSecurityGroupTargetBindingOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteSecurityGroupTargetBindingOptions, "deleteSecurityGroupTargetBindingOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteSecurityGroupTargetBindingOptions, "deleteSecurityGroupTargetBindingOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"security_group_id": *deleteSecurityGroupTargetBindingOptions.SecurityGroupID,
		"id":                *deleteSecurityGroupTargetBindingOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/targets/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteSecurityGroupTargetBindingOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteSecurityGroupTargetBinding")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetSecurityGroupTarget : Retrieve a security group target
// This request retrieves a single target specified by the identifier in the URL path. The target must be an existing
// target of the security group.
func (vpc *VpcV1) GetSecurityGroupTarget(getSecurityGroupTargetOptions *GetSecurityGroupTargetOptions) (result SecurityGroupTargetReferenceIntf, response *core.DetailedResponse, err error) {
	return vpc.GetSecurityGroupTargetWithContext(context.Background(), getSecurityGroupTargetOptions)
}

// GetSecurityGroupTargetWithContext is an alternate form of the GetSecurityGroupTarget method which supports a Context parameter
func (vpc *VpcV1) GetSecurityGroupTargetWithContext(ctx context.Context, getSecurityGroupTargetOptions *GetSecurityGroupTargetOptions) (result SecurityGroupTargetReferenceIntf, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getSecurityGroupTargetOptions, "getSecurityGroupTargetOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getSecurityGroupTargetOptions, "getSecurityGroupTargetOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"security_group_id": *getSecurityGroupTargetOptions.SecurityGroupID,
		"id":                *getSecurityGroupTargetOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/targets/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getSecurityGroupTargetOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetSecurityGroupTarget")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroupTargetReference)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateSecurityGroupTargetBinding : Add a target to a security group
// This request adds a resource to an existing security group. The supplied target identifier can be:
//
// - A network interface identifier
// - An application load balancer identifier
//
// When a target is added to a security group, the security group rules are applied to the target. A request body is not
// required, and if supplied, is ignored.
func (vpc *VpcV1) CreateSecurityGroupTargetBinding(createSecurityGroupTargetBindingOptions *CreateSecurityGroupTargetBindingOptions) (result SecurityGroupTargetReferenceIntf, response *core.DetailedResponse, err error) {
	return vpc.CreateSecurityGroupTargetBindingWithContext(context.Background(), createSecurityGroupTargetBindingOptions)
}

// CreateSecurityGroupTargetBindingWithContext is an alternate form of the CreateSecurityGroupTargetBinding method which supports a Context parameter
func (vpc *VpcV1) CreateSecurityGroupTargetBindingWithContext(ctx context.Context, createSecurityGroupTargetBindingOptions *CreateSecurityGroupTargetBindingOptions) (result SecurityGroupTargetReferenceIntf, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createSecurityGroupTargetBindingOptions, "createSecurityGroupTargetBindingOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createSecurityGroupTargetBindingOptions, "createSecurityGroupTargetBindingOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"security_group_id": *createSecurityGroupTargetBindingOptions.SecurityGroupID,
		"id":                *createSecurityGroupTargetBindingOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PUT)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/targets/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range createSecurityGroupTargetBindingOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateSecurityGroupTargetBinding")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalSecurityGroupTargetReference)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListIkePolicies : List all IKE policies
// This request lists all IKE policies in the region.
func (vpc *VpcV1) ListIkePolicies(listIkePoliciesOptions *ListIkePoliciesOptions) (result *IkePolicyCollection, response *core.DetailedResponse, err error) {
	return vpc.ListIkePoliciesWithContext(context.Background(), listIkePoliciesOptions)
}

// ListIkePoliciesWithContext is an alternate form of the ListIkePolicies method which supports a Context parameter
func (vpc *VpcV1) ListIkePoliciesWithContext(ctx context.Context, listIkePoliciesOptions *ListIkePoliciesOptions) (result *IkePolicyCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateStruct(listIkePoliciesOptions, "listIkePoliciesOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ike_policies`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range listIkePoliciesOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListIkePolicies")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listIkePoliciesOptions.Start != nil {
		builder.AddQuery("start", fmt.Sprint(*listIkePoliciesOptions.Start))
	}
	if listIkePoliciesOptions.Limit != nil {
		builder.AddQuery("limit", fmt.Sprint(*listIkePoliciesOptions.Limit))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalIkePolicyCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateIkePolicy : Create an IKE policy
// This request creates a new IKE policy.
func (vpc *VpcV1) CreateIkePolicy(createIkePolicyOptions *CreateIkePolicyOptions) (result *IkePolicy, response *core.DetailedResponse, err error) {
	return vpc.CreateIkePolicyWithContext(context.Background(), createIkePolicyOptions)
}

// CreateIkePolicyWithContext is an alternate form of the CreateIkePolicy method which supports a Context parameter
func (vpc *VpcV1) CreateIkePolicyWithContext(ctx context.Context, createIkePolicyOptions *CreateIkePolicyOptions) (result *IkePolicy, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createIkePolicyOptions, "createIkePolicyOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createIkePolicyOptions, "createIkePolicyOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ike_policies`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range createIkePolicyOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateIkePolicy")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	body := make(map[string]interface{})
	if createIkePolicyOptions.AuthenticationAlgorithm != nil {
		body["authentication_algorithm"] = createIkePolicyOptions.AuthenticationAlgorithm
	}
	if createIkePolicyOptions.DhGroup != nil {
		body["dh_group"] = createIkePolicyOptions.DhGroup
	}
	if createIkePolicyOptions.EncryptionAlgorithm != nil {
		body["encryption_algorithm"] = createIkePolicyOptions.EncryptionAlgorithm
	}
	if createIkePolicyOptions.IkeVersion != nil {
		body["ike_version"] = createIkePolicyOptions.IkeVersion
	}
	if createIkePolicyOptions.KeyLifetime != nil {
		body["key_lifetime"] = createIkePolicyOptions.KeyLifetime
	}
	if createIkePolicyOptions.Name != nil {
		body["name"] = createIkePolicyOptions.Name
	}
	if createIkePolicyOptions.ResourceGroup != nil {
		body["resource_group"] = createIkePolicyOptions.ResourceGroup
	}
	_, err = builder.SetBodyContentJSON(body)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalIkePolicy)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteIkePolicy : Delete an IKE policy
// This request deletes an IKE policy. This operation cannot be reversed.
func (vpc *VpcV1) DeleteIkePolicy(deleteIkePolicyOptions *DeleteIkePolicyOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteIkePolicyWithContext(context.Background(), deleteIkePolicyOptions)
}

// DeleteIkePolicyWithContext is an alternate form of the DeleteIkePolicy method which supports a Context parameter
func (vpc *VpcV1) DeleteIkePolicyWithContext(ctx context.Context, deleteIkePolicyOptions *DeleteIkePolicyOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteIkePolicyOptions, "deleteIkePolicyOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteIkePolicyOptions, "deleteIkePolicyOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *deleteIkePolicyOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ike_policies/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteIkePolicyOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteIkePolicy")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetIkePolicy : Retrieve an IKE policy
// This request retrieves a single IKE policy specified by the identifier in the URL.
func (vpc *VpcV1) GetIkePolicy(getIkePolicyOptions *GetIkePolicyOptions) (result *IkePolicy, response *core.DetailedResponse, err error) {
	return vpc.GetIkePolicyWithContext(context.Background(), getIkePolicyOptions)
}

// GetIkePolicyWithContext is an alternate form of the GetIkePolicy method which supports a Context parameter
func (vpc *VpcV1) GetIkePolicyWithContext(ctx context.Context, getIkePolicyOptions *GetIkePolicyOptions) (result *IkePolicy, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getIkePolicyOptions, "getIkePolicyOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getIkePolicyOptions, "getIkePolicyOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *getIkePolicyOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ike_policies/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getIkePolicyOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetIkePolicy")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalIkePolicy)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateIkePolicy : Update an IKE policy
// This request updates the properties of an existing IKE policy.
func (vpc *VpcV1) UpdateIkePolicy(updateIkePolicyOptions *UpdateIkePolicyOptions) (result *IkePolicy, response *core.DetailedResponse, err error) {
	return vpc.UpdateIkePolicyWithContext(context.Background(), updateIkePolicyOptions)
}

// UpdateIkePolicyWithContext is an alternate form of the UpdateIkePolicy method which supports a Context parameter
func (vpc *VpcV1) UpdateIkePolicyWithContext(ctx context.Context, updateIkePolicyOptions *UpdateIkePolicyOptions) (result *IkePolicy, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateIkePolicyOptions, "updateIkePolicyOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateIkePolicyOptions, "updateIkePolicyOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *updateIkePolicyOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ike_policies/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateIkePolicyOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateIkePolicy")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateIkePolicyOptions.IkePolicyPatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalIkePolicy)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListIkePolicyConnections : List all VPN gateway connections that use a specified IKE policy
// This request lists all VPN gateway connections that use a policy.
func (vpc *VpcV1) ListIkePolicyConnections(listIkePolicyConnectionsOptions *ListIkePolicyConnectionsOptions) (result *VPNGatewayConnectionCollection, response *core.DetailedResponse, err error) {
	return vpc.ListIkePolicyConnectionsWithContext(context.Background(), listIkePolicyConnectionsOptions)
}

// ListIkePolicyConnectionsWithContext is an alternate form of the ListIkePolicyConnections method which supports a Context parameter
func (vpc *VpcV1) ListIkePolicyConnectionsWithContext(ctx context.Context, listIkePolicyConnectionsOptions *ListIkePolicyConnectionsOptions) (result *VPNGatewayConnectionCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(listIkePolicyConnectionsOptions, "listIkePolicyConnectionsOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(listIkePolicyConnectionsOptions, "listIkePolicyConnectionsOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *listIkePolicyConnectionsOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ike_policies/{id}/connections`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range listIkePolicyConnectionsOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListIkePolicyConnections")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnectionCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListIpsecPolicies : List all IPsec policies
// This request lists all IPsec policies in the region.
func (vpc *VpcV1) ListIpsecPolicies(listIpsecPoliciesOptions *ListIpsecPoliciesOptions) (result *IPsecPolicyCollection, response *core.DetailedResponse, err error) {
	return vpc.ListIpsecPoliciesWithContext(context.Background(), listIpsecPoliciesOptions)
}

// ListIpsecPoliciesWithContext is an alternate form of the ListIpsecPolicies method which supports a Context parameter
func (vpc *VpcV1) ListIpsecPoliciesWithContext(ctx context.Context, listIpsecPoliciesOptions *ListIpsecPoliciesOptions) (result *IPsecPolicyCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateStruct(listIpsecPoliciesOptions, "listIpsecPoliciesOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ipsec_policies`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range listIpsecPoliciesOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListIpsecPolicies")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listIpsecPoliciesOptions.Start != nil {
		builder.AddQuery("start", fmt.Sprint(*listIpsecPoliciesOptions.Start))
	}
	if listIpsecPoliciesOptions.Limit != nil {
		builder.AddQuery("limit", fmt.Sprint(*listIpsecPoliciesOptions.Limit))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalIPsecPolicyCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateIpsecPolicy : Create an IPsec policy
// This request creates a new IPsec policy.
func (vpc *VpcV1) CreateIpsecPolicy(createIpsecPolicyOptions *CreateIpsecPolicyOptions) (result *IPsecPolicy, response *core.DetailedResponse, err error) {
	return vpc.CreateIpsecPolicyWithContext(context.Background(), createIpsecPolicyOptions)
}

// CreateIpsecPolicyWithContext is an alternate form of the CreateIpsecPolicy method which supports a Context parameter
func (vpc *VpcV1) CreateIpsecPolicyWithContext(ctx context.Context, createIpsecPolicyOptions *CreateIpsecPolicyOptions) (result *IPsecPolicy, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createIpsecPolicyOptions, "createIpsecPolicyOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createIpsecPolicyOptions, "createIpsecPolicyOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ipsec_policies`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range createIpsecPolicyOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateIpsecPolicy")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	body := make(map[string]interface{})
	if createIpsecPolicyOptions.AuthenticationAlgorithm != nil {
		body["authentication_algorithm"] = createIpsecPolicyOptions.AuthenticationAlgorithm
	}
	if createIpsecPolicyOptions.EncryptionAlgorithm != nil {
		body["encryption_algorithm"] = createIpsecPolicyOptions.EncryptionAlgorithm
	}
	if createIpsecPolicyOptions.Pfs != nil {
		body["pfs"] = createIpsecPolicyOptions.Pfs
	}
	if createIpsecPolicyOptions.KeyLifetime != nil {
		body["key_lifetime"] = createIpsecPolicyOptions.KeyLifetime
	}
	if createIpsecPolicyOptions.Name != nil {
		body["name"] = createIpsecPolicyOptions.Name
	}
	if createIpsecPolicyOptions.ResourceGroup != nil {
		body["resource_group"] = createIpsecPolicyOptions.ResourceGroup
	}
	_, err = builder.SetBodyContentJSON(body)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalIPsecPolicy)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteIpsecPolicy : Delete an IPsec policy
// This request deletes an IPsec policy. This operation cannot be reversed.
func (vpc *VpcV1) DeleteIpsecPolicy(deleteIpsecPolicyOptions *DeleteIpsecPolicyOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteIpsecPolicyWithContext(context.Background(), deleteIpsecPolicyOptions)
}

// DeleteIpsecPolicyWithContext is an alternate form of the DeleteIpsecPolicy method which supports a Context parameter
func (vpc *VpcV1) DeleteIpsecPolicyWithContext(ctx context.Context, deleteIpsecPolicyOptions *DeleteIpsecPolicyOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteIpsecPolicyOptions, "deleteIpsecPolicyOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteIpsecPolicyOptions, "deleteIpsecPolicyOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *deleteIpsecPolicyOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ipsec_policies/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteIpsecPolicyOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteIpsecPolicy")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetIpsecPolicy : Retrieve an IPsec policy
// This request retrieves a single IPsec policy specified by the identifier in the URL.
func (vpc *VpcV1) GetIpsecPolicy(getIpsecPolicyOptions *GetIpsecPolicyOptions) (result *IPsecPolicy, response *core.DetailedResponse, err error) {
	return vpc.GetIpsecPolicyWithContext(context.Background(), getIpsecPolicyOptions)
}

// GetIpsecPolicyWithContext is an alternate form of the GetIpsecPolicy method which supports a Context parameter
func (vpc *VpcV1) GetIpsecPolicyWithContext(ctx context.Context, getIpsecPolicyOptions *GetIpsecPolicyOptions) (result *IPsecPolicy, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getIpsecPolicyOptions, "getIpsecPolicyOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getIpsecPolicyOptions, "getIpsecPolicyOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *getIpsecPolicyOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ipsec_policies/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getIpsecPolicyOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetIpsecPolicy")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalIPsecPolicy)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateIpsecPolicy : Update an IPsec policy
// This request updates the properties of an existing IPsec policy.
func (vpc *VpcV1) UpdateIpsecPolicy(updateIpsecPolicyOptions *UpdateIpsecPolicyOptions) (result *IPsecPolicy, response *core.DetailedResponse, err error) {
	return vpc.UpdateIpsecPolicyWithContext(context.Background(), updateIpsecPolicyOptions)
}

// UpdateIpsecPolicyWithContext is an alternate form of the UpdateIpsecPolicy method which supports a Context parameter
func (vpc *VpcV1) UpdateIpsecPolicyWithContext(ctx context.Context, updateIpsecPolicyOptions *UpdateIpsecPolicyOptions) (result *IPsecPolicy, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateIpsecPolicyOptions, "updateIpsecPolicyOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateIpsecPolicyOptions, "updateIpsecPolicyOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *updateIpsecPolicyOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ipsec_policies/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateIpsecPolicyOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateIpsecPolicy")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateIpsecPolicyOptions.IPsecPolicyPatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalIPsecPolicy)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListIpsecPolicyConnections : List all VPN gateway connections that use a specified IPsec policy
// This request lists all VPN gateway connections that use a policy.
func (vpc *VpcV1) ListIpsecPolicyConnections(listIpsecPolicyConnectionsOptions *ListIpsecPolicyConnectionsOptions) (result *VPNGatewayConnectionCollection, response *core.DetailedResponse, err error) {
	return vpc.ListIpsecPolicyConnectionsWithContext(context.Background(), listIpsecPolicyConnectionsOptions)
}

// ListIpsecPolicyConnectionsWithContext is an alternate form of the ListIpsecPolicyConnections method which supports a Context parameter
func (vpc *VpcV1) ListIpsecPolicyConnectionsWithContext(ctx context.Context, listIpsecPolicyConnectionsOptions *ListIpsecPolicyConnectionsOptions) (result *VPNGatewayConnectionCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(listIpsecPolicyConnectionsOptions, "listIpsecPolicyConnectionsOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(listIpsecPolicyConnectionsOptions, "listIpsecPolicyConnectionsOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *listIpsecPolicyConnectionsOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ipsec_policies/{id}/connections`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range listIpsecPolicyConnectionsOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListIpsecPolicyConnections")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnectionCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListVPNGateways : List all VPN gateways
// This request lists all VPN gateways in the region.
func (vpc *VpcV1) ListVPNGateways(listVPNGatewaysOptions *ListVPNGatewaysOptions) (result *VPNGatewayCollection, response *core.DetailedResponse, err error) {
	return vpc.ListVPNGatewaysWithContext(context.Background(), listVPNGatewaysOptions)
}

// ListVPNGatewaysWithContext is an alternate form of the ListVPNGateways method which supports a Context parameter
func (vpc *VpcV1) ListVPNGatewaysWithContext(ctx context.Context, listVPNGatewaysOptions *ListVPNGatewaysOptions) (result *VPNGatewayCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateStruct(listVPNGatewaysOptions, "listVPNGatewaysOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range listVPNGatewaysOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListVPNGateways")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listVPNGatewaysOptions.Start != nil {
		builder.AddQuery("start", fmt.Sprint(*listVPNGatewaysOptions.Start))
	}
	if listVPNGatewaysOptions.Limit != nil {
		builder.AddQuery("limit", fmt.Sprint(*listVPNGatewaysOptions.Limit))
	}
	if listVPNGatewaysOptions.ResourceGroupID != nil {
		builder.AddQuery("resource_group.id", fmt.Sprint(*listVPNGatewaysOptions.ResourceGroupID))
	}
	if listVPNGatewaysOptions.Mode != nil {
		builder.AddQuery("mode", fmt.Sprint(*listVPNGatewaysOptions.Mode))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateVPNGateway : Create a VPN gateway
// This request creates a new VPN gateway.
func (vpc *VpcV1) CreateVPNGateway(createVPNGatewayOptions *CreateVPNGatewayOptions) (result VPNGatewayIntf, response *core.DetailedResponse, err error) {
	return vpc.CreateVPNGatewayWithContext(context.Background(), createVPNGatewayOptions)
}

// CreateVPNGatewayWithContext is an alternate form of the CreateVPNGateway method which supports a Context parameter
func (vpc *VpcV1) CreateVPNGatewayWithContext(ctx context.Context, createVPNGatewayOptions *CreateVPNGatewayOptions) (result VPNGatewayIntf, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createVPNGatewayOptions, "createVPNGatewayOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createVPNGatewayOptions, "createVPNGatewayOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range createVPNGatewayOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateVPNGateway")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(createVPNGatewayOptions.VPNGatewayPrototype)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGateway)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteVPNGateway : Delete a VPN gateway
// This request deletes a VPN gateway. A VPN gateway with a `status` of `pending` cannot be deleted. This operation
// deletes all VPN gateway connections associated with this VPN gateway.  This operation cannot be reversed.
func (vpc *VpcV1) DeleteVPNGateway(deleteVPNGatewayOptions *DeleteVPNGatewayOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteVPNGatewayWithContext(context.Background(), deleteVPNGatewayOptions)
}

// DeleteVPNGatewayWithContext is an alternate form of the DeleteVPNGateway method which supports a Context parameter
func (vpc *VpcV1) DeleteVPNGatewayWithContext(ctx context.Context, deleteVPNGatewayOptions *DeleteVPNGatewayOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteVPNGatewayOptions, "deleteVPNGatewayOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteVPNGatewayOptions, "deleteVPNGatewayOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *deleteVPNGatewayOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteVPNGatewayOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteVPNGateway")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetVPNGateway : Retrieve a VPN gateway
// This request retrieves a single VPN gateway specified by the identifier in the URL.
func (vpc *VpcV1) GetVPNGateway(getVPNGatewayOptions *GetVPNGatewayOptions) (result VPNGatewayIntf, response *core.DetailedResponse, err error) {
	return vpc.GetVPNGatewayWithContext(context.Background(), getVPNGatewayOptions)
}

// GetVPNGatewayWithContext is an alternate form of the GetVPNGateway method which supports a Context parameter
func (vpc *VpcV1) GetVPNGatewayWithContext(ctx context.Context, getVPNGatewayOptions *GetVPNGatewayOptions) (result VPNGatewayIntf, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getVPNGatewayOptions, "getVPNGatewayOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getVPNGatewayOptions, "getVPNGatewayOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *getVPNGatewayOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getVPNGatewayOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetVPNGateway")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGateway)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateVPNGateway : Update a VPN gateway
// This request updates the properties of an existing VPN gateway.
func (vpc *VpcV1) UpdateVPNGateway(updateVPNGatewayOptions *UpdateVPNGatewayOptions) (result VPNGatewayIntf, response *core.DetailedResponse, err error) {
	return vpc.UpdateVPNGatewayWithContext(context.Background(), updateVPNGatewayOptions)
}

// UpdateVPNGatewayWithContext is an alternate form of the UpdateVPNGateway method which supports a Context parameter
func (vpc *VpcV1) UpdateVPNGatewayWithContext(ctx context.Context, updateVPNGatewayOptions *UpdateVPNGatewayOptions) (result VPNGatewayIntf, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateVPNGatewayOptions, "updateVPNGatewayOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateVPNGatewayOptions, "updateVPNGatewayOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *updateVPNGatewayOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateVPNGatewayOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateVPNGateway")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateVPNGatewayOptions.VPNGatewayPatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGateway)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListVPNGatewayConnections : List all connections of a VPN gateway
// This request lists all connections of a VPN gateway.
func (vpc *VpcV1) ListVPNGatewayConnections(listVPNGatewayConnectionsOptions *ListVPNGatewayConnectionsOptions) (result *VPNGatewayConnectionCollection, response *core.DetailedResponse, err error) {
	return vpc.ListVPNGatewayConnectionsWithContext(context.Background(), listVPNGatewayConnectionsOptions)
}

// ListVPNGatewayConnectionsWithContext is an alternate form of the ListVPNGatewayConnections method which supports a Context parameter
func (vpc *VpcV1) ListVPNGatewayConnectionsWithContext(ctx context.Context, listVPNGatewayConnectionsOptions *ListVPNGatewayConnectionsOptions) (result *VPNGatewayConnectionCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(listVPNGatewayConnectionsOptions, "listVPNGatewayConnectionsOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(listVPNGatewayConnectionsOptions, "listVPNGatewayConnectionsOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"vpn_gateway_id": *listVPNGatewayConnectionsOptions.VPNGatewayID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range listVPNGatewayConnectionsOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListVPNGatewayConnections")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listVPNGatewayConnectionsOptions.Status != nil {
		builder.AddQuery("status", fmt.Sprint(*listVPNGatewayConnectionsOptions.Status))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnectionCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateVPNGatewayConnection : Create a connection for a VPN gateway
// This request creates a new VPN gateway connection.
func (vpc *VpcV1) CreateVPNGatewayConnection(createVPNGatewayConnectionOptions *CreateVPNGatewayConnectionOptions) (result VPNGatewayConnectionIntf, response *core.DetailedResponse, err error) {
	return vpc.CreateVPNGatewayConnectionWithContext(context.Background(), createVPNGatewayConnectionOptions)
}

// CreateVPNGatewayConnectionWithContext is an alternate form of the CreateVPNGatewayConnection method which supports a Context parameter
func (vpc *VpcV1) CreateVPNGatewayConnectionWithContext(ctx context.Context, createVPNGatewayConnectionOptions *CreateVPNGatewayConnectionOptions) (result VPNGatewayConnectionIntf, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createVPNGatewayConnectionOptions, "createVPNGatewayConnectionOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createVPNGatewayConnectionOptions, "createVPNGatewayConnectionOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"vpn_gateway_id": *createVPNGatewayConnectionOptions.VPNGatewayID,
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range createVPNGatewayConnectionOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateVPNGatewayConnection")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(createVPNGatewayConnectionOptions.VPNGatewayConnectionPrototype)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteVPNGatewayConnection : Delete a VPN gateway connection
// This request deletes a VPN gateway connection. This operation cannot be reversed.
func (vpc *VpcV1) DeleteVPNGatewayConnection(deleteVPNGatewayConnectionOptions *DeleteVPNGatewayConnectionOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteVPNGatewayConnectionWithContext(context.Background(), deleteVPNGatewayConnectionOptions)
}

// DeleteVPNGatewayConnectionWithContext is an alternate form of the DeleteVPNGatewayConnection method which supports a Context parameter
func (vpc *VpcV1) DeleteVPNGatewayConnectionWithContext(ctx context.Context, deleteVPNGatewayConnectionOptions *DeleteVPNGatewayConnectionOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteVPNGatewayConnectionOptions, "deleteVPNGatewayConnectionOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteVPNGatewayConnectionOptions, "deleteVPNGatewayConnectionOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"vpn_gateway_id": *deleteVPNGatewayConnectionOptions.VPNGatewayID,
		"id":             *deleteVPNGatewayConnectionOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteVPNGatewayConnectionOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteVPNGatewayConnection")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetVPNGatewayConnection : Retrieve a VPN gateway connection
// This request retrieves a single VPN gateway connection specified by the identifier in the URL.
func (vpc *VpcV1) GetVPNGatewayConnection(getVPNGatewayConnectionOptions *GetVPNGatewayConnectionOptions) (result VPNGatewayConnectionIntf, response *core.DetailedResponse, err error) {
	return vpc.GetVPNGatewayConnectionWithContext(context.Background(), getVPNGatewayConnectionOptions)
}

// GetVPNGatewayConnectionWithContext is an alternate form of the GetVPNGatewayConnection method which supports a Context parameter
func (vpc *VpcV1) GetVPNGatewayConnectionWithContext(ctx context.Context, getVPNGatewayConnectionOptions *GetVPNGatewayConnectionOptions) (result VPNGatewayConnectionIntf, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getVPNGatewayConnectionOptions, "getVPNGatewayConnectionOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getVPNGatewayConnectionOptions, "getVPNGatewayConnectionOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"vpn_gateway_id": *getVPNGatewayConnectionOptions.VPNGatewayID,
		"id":             *getVPNGatewayConnectionOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getVPNGatewayConnectionOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetVPNGatewayConnection")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateVPNGatewayConnection : Update a VPN gateway connection
// This request updates the properties of an existing VPN gateway connection.
func (vpc *VpcV1) UpdateVPNGatewayConnection(updateVPNGatewayConnectionOptions *UpdateVPNGatewayConnectionOptions) (result VPNGatewayConnectionIntf, response *core.DetailedResponse, err error) {
	return vpc.UpdateVPNGatewayConnectionWithContext(context.Background(), updateVPNGatewayConnectionOptions)
}

// UpdateVPNGatewayConnectionWithContext is an alternate form of the UpdateVPNGatewayConnection method which supports a Context parameter
func (vpc *VpcV1) UpdateVPNGatewayConnectionWithContext(ctx context.Context, updateVPNGatewayConnectionOptions *UpdateVPNGatewayConnectionOptions) (result VPNGatewayConnectionIntf, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateVPNGatewayConnectionOptions, "updateVPNGatewayConnectionOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateVPNGatewayConnectionOptions, "updateVPNGatewayConnectionOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"vpn_gateway_id": *updateVPNGatewayConnectionOptions.VPNGatewayID,
		"id":             *updateVPNGatewayConnectionOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateVPNGatewayConnectionOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateVPNGatewayConnection")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateVPNGatewayConnectionOptions.VPNGatewayConnectionPatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListVPNGatewayConnectionLocalCIDRs : List all local CIDRs for a VPN gateway connection
// This request lists all local CIDRs for a VPN gateway connection.
func (vpc *VpcV1) ListVPNGatewayConnectionLocalCIDRs(listVPNGatewayConnectionLocalCIDRsOptions *ListVPNGatewayConnectionLocalCIDRsOptions) (result *VPNGatewayConnectionLocalCIDRs, response *core.DetailedResponse, err error) {
	return vpc.ListVPNGatewayConnectionLocalCIDRsWithContext(context.Background(), listVPNGatewayConnectionLocalCIDRsOptions)
}

// ListVPNGatewayConnectionLocalCIDRsWithContext is an alternate form of the ListVPNGatewayConnectionLocalCIDRs method which supports a Context parameter
func (vpc *VpcV1) ListVPNGatewayConnectionLocalCIDRsWithContext(ctx context.Context, listVPNGatewayConnectionLocalCIDRsOptions *ListVPNGatewayConnectionLocalCIDRsOptions) (result *VPNGatewayConnectionLocalCIDRs, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(listVPNGatewayConnectionLocalCIDRsOptions, "listVPNGatewayConnectionLocalCIDRsOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(listVPNGatewayConnectionLocalCIDRsOptions, "listVPNGatewayConnectionLocalCIDRsOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"vpn_gateway_id": *listVPNGatewayConnectionLocalCIDRsOptions.VPNGatewayID,
		"id":             *listVPNGatewayConnectionLocalCIDRsOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/local_cidrs`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range listVPNGatewayConnectionLocalCIDRsOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListVPNGatewayConnectionLocalCIDRs")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnectionLocalCIDRs)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// RemoveVPNGatewayConnectionLocalCIDR : Remove a local CIDR from a VPN gateway connection
// This request removes a CIDR from a VPN gateway connection.
func (vpc *VpcV1) RemoveVPNGatewayConnectionLocalCIDR(removeVPNGatewayConnectionLocalCIDROptions *RemoveVPNGatewayConnectionLocalCIDROptions) (response *core.DetailedResponse, err error) {
	return vpc.RemoveVPNGatewayConnectionLocalCIDRWithContext(context.Background(), removeVPNGatewayConnectionLocalCIDROptions)
}

// RemoveVPNGatewayConnectionLocalCIDRWithContext is an alternate form of the RemoveVPNGatewayConnectionLocalCIDR method which supports a Context parameter
func (vpc *VpcV1) RemoveVPNGatewayConnectionLocalCIDRWithContext(ctx context.Context, removeVPNGatewayConnectionLocalCIDROptions *RemoveVPNGatewayConnectionLocalCIDROptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(removeVPNGatewayConnectionLocalCIDROptions, "removeVPNGatewayConnectionLocalCIDROptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(removeVPNGatewayConnectionLocalCIDROptions, "removeVPNGatewayConnectionLocalCIDROptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"vpn_gateway_id": *removeVPNGatewayConnectionLocalCIDROptions.VPNGatewayID,
		"id":             *removeVPNGatewayConnectionLocalCIDROptions.ID,
		"cidr_prefix":    *removeVPNGatewayConnectionLocalCIDROptions.CIDRPrefix,
		"prefix_length":  *removeVPNGatewayConnectionLocalCIDROptions.PrefixLength,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/local_cidrs/{cidr_prefix}/{prefix_length}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range removeVPNGatewayConnectionLocalCIDROptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "RemoveVPNGatewayConnectionLocalCIDR")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// CheckVPNGatewayConnectionLocalCIDR : Check if the specified local CIDR exists on a VPN gateway connection
// This request succeeds if a CIDR exists on the specified VPN gateway connection and fails otherwise.
func (vpc *VpcV1) CheckVPNGatewayConnectionLocalCIDR(checkVPNGatewayConnectionLocalCIDROptions *CheckVPNGatewayConnectionLocalCIDROptions) (response *core.DetailedResponse, err error) {
	return vpc.CheckVPNGatewayConnectionLocalCIDRWithContext(context.Background(), checkVPNGatewayConnectionLocalCIDROptions)
}

// CheckVPNGatewayConnectionLocalCIDRWithContext is an alternate form of the CheckVPNGatewayConnectionLocalCIDR method which supports a Context parameter
func (vpc *VpcV1) CheckVPNGatewayConnectionLocalCIDRWithContext(ctx context.Context, checkVPNGatewayConnectionLocalCIDROptions *CheckVPNGatewayConnectionLocalCIDROptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(checkVPNGatewayConnectionLocalCIDROptions, "checkVPNGatewayConnectionLocalCIDROptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(checkVPNGatewayConnectionLocalCIDROptions, "checkVPNGatewayConnectionLocalCIDROptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"vpn_gateway_id": *checkVPNGatewayConnectionLocalCIDROptions.VPNGatewayID,
		"id":             *checkVPNGatewayConnectionLocalCIDROptions.ID,
		"cidr_prefix":    *checkVPNGatewayConnectionLocalCIDROptions.CIDRPrefix,
		"prefix_length":  *checkVPNGatewayConnectionLocalCIDROptions.PrefixLength,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/local_cidrs/{cidr_prefix}/{prefix_length}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range checkVPNGatewayConnectionLocalCIDROptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CheckVPNGatewayConnectionLocalCIDR")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// AddVPNGatewayConnectionLocalCIDR : Set a local CIDR on a VPN gateway connection
// This request adds the specified CIDR to the specified VPN gateway connection. A request body is not required, and if
// supplied, is ignored. This request succeeds if the CIDR already exists on the specified VPN gateway connection.
func (vpc *VpcV1) AddVPNGatewayConnectionLocalCIDR(addVPNGatewayConnectionLocalCIDROptions *AddVPNGatewayConnectionLocalCIDROptions) (response *core.DetailedResponse, err error) {
	return vpc.AddVPNGatewayConnectionLocalCIDRWithContext(context.Background(), addVPNGatewayConnectionLocalCIDROptions)
}

// AddVPNGatewayConnectionLocalCIDRWithContext is an alternate form of the AddVPNGatewayConnectionLocalCIDR method which supports a Context parameter
func (vpc *VpcV1) AddVPNGatewayConnectionLocalCIDRWithContext(ctx context.Context, addVPNGatewayConnectionLocalCIDROptions *AddVPNGatewayConnectionLocalCIDROptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(addVPNGatewayConnectionLocalCIDROptions, "addVPNGatewayConnectionLocalCIDROptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(addVPNGatewayConnectionLocalCIDROptions, "addVPNGatewayConnectionLocalCIDROptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"vpn_gateway_id": *addVPNGatewayConnectionLocalCIDROptions.VPNGatewayID,
		"id":             *addVPNGatewayConnectionLocalCIDROptions.ID,
		"cidr_prefix":    *addVPNGatewayConnectionLocalCIDROptions.CIDRPrefix,
		"prefix_length":  *addVPNGatewayConnectionLocalCIDROptions.PrefixLength,
	}

	builder := core.NewRequestBuilder(core.PUT)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/local_cidrs/{cidr_prefix}/{prefix_length}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range addVPNGatewayConnectionLocalCIDROptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "AddVPNGatewayConnectionLocalCIDR")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// ListVPNGatewayConnectionPeerCIDRs : List all peer CIDRs for a VPN gateway connection
// This request lists all peer CIDRs for a VPN gateway connection.
func (vpc *VpcV1) ListVPNGatewayConnectionPeerCIDRs(listVPNGatewayConnectionPeerCIDRsOptions *ListVPNGatewayConnectionPeerCIDRsOptions) (result *VPNGatewayConnectionPeerCIDRs, response *core.DetailedResponse, err error) {
	return vpc.ListVPNGatewayConnectionPeerCIDRsWithContext(context.Background(), listVPNGatewayConnectionPeerCIDRsOptions)
}

// ListVPNGatewayConnectionPeerCIDRsWithContext is an alternate form of the ListVPNGatewayConnectionPeerCIDRs method which supports a Context parameter
func (vpc *VpcV1) ListVPNGatewayConnectionPeerCIDRsWithContext(ctx context.Context, listVPNGatewayConnectionPeerCIDRsOptions *ListVPNGatewayConnectionPeerCIDRsOptions) (result *VPNGatewayConnectionPeerCIDRs, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(listVPNGatewayConnectionPeerCIDRsOptions, "listVPNGatewayConnectionPeerCIDRsOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(listVPNGatewayConnectionPeerCIDRsOptions, "listVPNGatewayConnectionPeerCIDRsOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"vpn_gateway_id": *listVPNGatewayConnectionPeerCIDRsOptions.VPNGatewayID,
		"id":             *listVPNGatewayConnectionPeerCIDRsOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer_cidrs`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range listVPNGatewayConnectionPeerCIDRsOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListVPNGatewayConnectionPeerCIDRs")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnectionPeerCIDRs)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// RemoveVPNGatewayConnectionPeerCIDR : Remove a peer CIDR from a VPN gateway connection
// This request removes a CIDR from a VPN gateway connection.
func (vpc *VpcV1) RemoveVPNGatewayConnectionPeerCIDR(removeVPNGatewayConnectionPeerCIDROptions *RemoveVPNGatewayConnectionPeerCIDROptions) (response *core.DetailedResponse, err error) {
	return vpc.RemoveVPNGatewayConnectionPeerCIDRWithContext(context.Background(), removeVPNGatewayConnectionPeerCIDROptions)
}

// RemoveVPNGatewayConnectionPeerCIDRWithContext is an alternate form of the RemoveVPNGatewayConnectionPeerCIDR method which supports a Context parameter
func (vpc *VpcV1) RemoveVPNGatewayConnectionPeerCIDRWithContext(ctx context.Context, removeVPNGatewayConnectionPeerCIDROptions *RemoveVPNGatewayConnectionPeerCIDROptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(removeVPNGatewayConnectionPeerCIDROptions, "removeVPNGatewayConnectionPeerCIDROptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(removeVPNGatewayConnectionPeerCIDROptions, "removeVPNGatewayConnectionPeerCIDROptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"vpn_gateway_id": *removeVPNGatewayConnectionPeerCIDROptions.VPNGatewayID,
		"id":             *removeVPNGatewayConnectionPeerCIDROptions.ID,
		"cidr_prefix":    *removeVPNGatewayConnectionPeerCIDROptions.CIDRPrefix,
		"prefix_length":  *removeVPNGatewayConnectionPeerCIDROptions.PrefixLength,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer_cidrs/{cidr_prefix}/{prefix_length}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range removeVPNGatewayConnectionPeerCIDROptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "RemoveVPNGatewayConnectionPeerCIDR")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// CheckVPNGatewayConnectionPeerCIDR : Check if the specified peer CIDR exists on a VPN gateway connection
// This request succeeds if a CIDR exists on the specified VPN gateway connection and fails otherwise.
func (vpc *VpcV1) CheckVPNGatewayConnectionPeerCIDR(checkVPNGatewayConnectionPeerCIDROptions *CheckVPNGatewayConnectionPeerCIDROptions) (response *core.DetailedResponse, err error) {
	return vpc.CheckVPNGatewayConnectionPeerCIDRWithContext(context.Background(), checkVPNGatewayConnectionPeerCIDROptions)
}

// CheckVPNGatewayConnectionPeerCIDRWithContext is an alternate form of the CheckVPNGatewayConnectionPeerCIDR method which supports a Context parameter
func (vpc *VpcV1) CheckVPNGatewayConnectionPeerCIDRWithContext(ctx context.Context, checkVPNGatewayConnectionPeerCIDROptions *CheckVPNGatewayConnectionPeerCIDROptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(checkVPNGatewayConnectionPeerCIDROptions, "checkVPNGatewayConnectionPeerCIDROptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(checkVPNGatewayConnectionPeerCIDROptions, "checkVPNGatewayConnectionPeerCIDROptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"vpn_gateway_id": *checkVPNGatewayConnectionPeerCIDROptions.VPNGatewayID,
		"id":             *checkVPNGatewayConnectionPeerCIDROptions.ID,
		"cidr_prefix":    *checkVPNGatewayConnectionPeerCIDROptions.CIDRPrefix,
		"prefix_length":  *checkVPNGatewayConnectionPeerCIDROptions.PrefixLength,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer_cidrs/{cidr_prefix}/{prefix_length}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range checkVPNGatewayConnectionPeerCIDROptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CheckVPNGatewayConnectionPeerCIDR")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// AddVPNGatewayConnectionPeerCIDR : Set a peer CIDR on a VPN gateway connection
// This request adds the specified CIDR to the specified VPN gateway connection. A request body is not required, and if
// supplied, is ignored. This request succeeds if the CIDR already exists on the specified VPN gateway connection.
func (vpc *VpcV1) AddVPNGatewayConnectionPeerCIDR(addVPNGatewayConnectionPeerCIDROptions *AddVPNGatewayConnectionPeerCIDROptions) (response *core.DetailedResponse, err error) {
	return vpc.AddVPNGatewayConnectionPeerCIDRWithContext(context.Background(), addVPNGatewayConnectionPeerCIDROptions)
}

// AddVPNGatewayConnectionPeerCIDRWithContext is an alternate form of the AddVPNGatewayConnectionPeerCIDR method which supports a Context parameter
func (vpc *VpcV1) AddVPNGatewayConnectionPeerCIDRWithContext(ctx context.Context, addVPNGatewayConnectionPeerCIDROptions *AddVPNGatewayConnectionPeerCIDROptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(addVPNGatewayConnectionPeerCIDROptions, "addVPNGatewayConnectionPeerCIDROptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(addVPNGatewayConnectionPeerCIDROptions, "addVPNGatewayConnectionPeerCIDROptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"vpn_gateway_id": *addVPNGatewayConnectionPeerCIDROptions.VPNGatewayID,
		"id":             *addVPNGatewayConnectionPeerCIDROptions.ID,
		"cidr_prefix":    *addVPNGatewayConnectionPeerCIDROptions.CIDRPrefix,
		"prefix_length":  *addVPNGatewayConnectionPeerCIDROptions.PrefixLength,
	}

	builder := core.NewRequestBuilder(core.PUT)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer_cidrs/{cidr_prefix}/{prefix_length}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range addVPNGatewayConnectionPeerCIDROptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "AddVPNGatewayConnectionPeerCIDR")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// ListLoadBalancerProfiles : List all load balancer profiles
// This request lists all load balancer profiles available in the region. A load balancer profile specifies the
// performance characteristics and pricing model for a load balancer.
func (vpc *VpcV1) ListLoadBalancerProfiles(listLoadBalancerProfilesOptions *ListLoadBalancerProfilesOptions) (result *LoadBalancerProfileCollection, response *core.DetailedResponse, err error) {
	return vpc.ListLoadBalancerProfilesWithContext(context.Background(), listLoadBalancerProfilesOptions)
}

// ListLoadBalancerProfilesWithContext is an alternate form of the ListLoadBalancerProfiles method which supports a Context parameter
func (vpc *VpcV1) ListLoadBalancerProfilesWithContext(ctx context.Context, listLoadBalancerProfilesOptions *ListLoadBalancerProfilesOptions) (result *LoadBalancerProfileCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateStruct(listLoadBalancerProfilesOptions, "listLoadBalancerProfilesOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancer/profiles`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range listLoadBalancerProfilesOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListLoadBalancerProfiles")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listLoadBalancerProfilesOptions.Start != nil {
		builder.AddQuery("start", fmt.Sprint(*listLoadBalancerProfilesOptions.Start))
	}
	if listLoadBalancerProfilesOptions.Limit != nil {
		builder.AddQuery("limit", fmt.Sprint(*listLoadBalancerProfilesOptions.Limit))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerProfileCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// GetLoadBalancerProfile : Retrieve a load balancer profile
// This request retrieves a load balancer profile specified by the name in the URL.
func (vpc *VpcV1) GetLoadBalancerProfile(getLoadBalancerProfileOptions *GetLoadBalancerProfileOptions) (result *LoadBalancerProfile, response *core.DetailedResponse, err error) {
	return vpc.GetLoadBalancerProfileWithContext(context.Background(), getLoadBalancerProfileOptions)
}

// GetLoadBalancerProfileWithContext is an alternate form of the GetLoadBalancerProfile method which supports a Context parameter
func (vpc *VpcV1) GetLoadBalancerProfileWithContext(ctx context.Context, getLoadBalancerProfileOptions *GetLoadBalancerProfileOptions) (result *LoadBalancerProfile, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getLoadBalancerProfileOptions, "getLoadBalancerProfileOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getLoadBalancerProfileOptions, "getLoadBalancerProfileOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"name": *getLoadBalancerProfileOptions.Name,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancer/profiles/{name}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getLoadBalancerProfileOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetLoadBalancerProfile")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerProfile)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListLoadBalancers : List all load balancers
// This request lists all load balancers in the region.
func (vpc *VpcV1) ListLoadBalancers(listLoadBalancersOptions *ListLoadBalancersOptions) (result *LoadBalancerCollection, response *core.DetailedResponse, err error) {
	return vpc.ListLoadBalancersWithContext(context.Background(), listLoadBalancersOptions)
}

// ListLoadBalancersWithContext is an alternate form of the ListLoadBalancers method which supports a Context parameter
func (vpc *VpcV1) ListLoadBalancersWithContext(ctx context.Context, listLoadBalancersOptions *ListLoadBalancersOptions) (result *LoadBalancerCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateStruct(listLoadBalancersOptions, "listLoadBalancersOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range listLoadBalancersOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListLoadBalancers")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateLoadBalancer : Create a load balancer
// This request creates and provisions a new load balancer.
func (vpc *VpcV1) CreateLoadBalancer(createLoadBalancerOptions *CreateLoadBalancerOptions) (result *LoadBalancer, response *core.DetailedResponse, err error) {
	return vpc.CreateLoadBalancerWithContext(context.Background(), createLoadBalancerOptions)
}

// CreateLoadBalancerWithContext is an alternate form of the CreateLoadBalancer method which supports a Context parameter
func (vpc *VpcV1) CreateLoadBalancerWithContext(ctx context.Context, createLoadBalancerOptions *CreateLoadBalancerOptions) (result *LoadBalancer, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createLoadBalancerOptions, "createLoadBalancerOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createLoadBalancerOptions, "createLoadBalancerOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range createLoadBalancerOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateLoadBalancer")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	body := make(map[string]interface{})
	if createLoadBalancerOptions.IsPublic != nil {
		body["is_public"] = createLoadBalancerOptions.IsPublic
	}
	if createLoadBalancerOptions.Subnets != nil {
		body["subnets"] = createLoadBalancerOptions.Subnets
	}
	if createLoadBalancerOptions.Listeners != nil {
		body["listeners"] = createLoadBalancerOptions.Listeners
	}
	if createLoadBalancerOptions.Logging != nil {
		body["logging"] = createLoadBalancerOptions.Logging
	}
	if createLoadBalancerOptions.Name != nil {
		body["name"] = createLoadBalancerOptions.Name
	}
	if createLoadBalancerOptions.Pools != nil {
		body["pools"] = createLoadBalancerOptions.Pools
	}
	if createLoadBalancerOptions.Profile != nil {
		body["profile"] = createLoadBalancerOptions.Profile
	}
	if createLoadBalancerOptions.ResourceGroup != nil {
		body["resource_group"] = createLoadBalancerOptions.ResourceGroup
	}
	if createLoadBalancerOptions.SecurityGroups != nil {
		body["security_groups"] = createLoadBalancerOptions.SecurityGroups
	}
	_, err = builder.SetBodyContentJSON(body)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancer)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteLoadBalancer : Delete a load balancer
// This request deletes a load balancer. This operation cannot be reversed.
func (vpc *VpcV1) DeleteLoadBalancer(deleteLoadBalancerOptions *DeleteLoadBalancerOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteLoadBalancerWithContext(context.Background(), deleteLoadBalancerOptions)
}

// DeleteLoadBalancerWithContext is an alternate form of the DeleteLoadBalancer method which supports a Context parameter
func (vpc *VpcV1) DeleteLoadBalancerWithContext(ctx context.Context, deleteLoadBalancerOptions *DeleteLoadBalancerOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteLoadBalancerOptions, "deleteLoadBalancerOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteLoadBalancerOptions, "deleteLoadBalancerOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *deleteLoadBalancerOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteLoadBalancerOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteLoadBalancer")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetLoadBalancer : Retrieve a load balancer
// This request retrieves a single load balancer specified by the identifier in the URL path.
func (vpc *VpcV1) GetLoadBalancer(getLoadBalancerOptions *GetLoadBalancerOptions) (result *LoadBalancer, response *core.DetailedResponse, err error) {
	return vpc.GetLoadBalancerWithContext(context.Background(), getLoadBalancerOptions)
}

// GetLoadBalancerWithContext is an alternate form of the GetLoadBalancer method which supports a Context parameter
func (vpc *VpcV1) GetLoadBalancerWithContext(ctx context.Context, getLoadBalancerOptions *GetLoadBalancerOptions) (result *LoadBalancer, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getLoadBalancerOptions, "getLoadBalancerOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getLoadBalancerOptions, "getLoadBalancerOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *getLoadBalancerOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getLoadBalancerOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetLoadBalancer")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancer)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateLoadBalancer : Update a load balancer
// This request updates a load balancer.
func (vpc *VpcV1) UpdateLoadBalancer(updateLoadBalancerOptions *UpdateLoadBalancerOptions) (result *LoadBalancer, response *core.DetailedResponse, err error) {
	return vpc.UpdateLoadBalancerWithContext(context.Background(), updateLoadBalancerOptions)
}

// UpdateLoadBalancerWithContext is an alternate form of the UpdateLoadBalancer method which supports a Context parameter
func (vpc *VpcV1) UpdateLoadBalancerWithContext(ctx context.Context, updateLoadBalancerOptions *UpdateLoadBalancerOptions) (result *LoadBalancer, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateLoadBalancerOptions, "updateLoadBalancerOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateLoadBalancerOptions, "updateLoadBalancerOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *updateLoadBalancerOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateLoadBalancerOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateLoadBalancer")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateLoadBalancerOptions.LoadBalancerPatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancer)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// GetLoadBalancerStatistics : List all statistics of a load balancer
// This request lists statistics of a load balancer.
func (vpc *VpcV1) GetLoadBalancerStatistics(getLoadBalancerStatisticsOptions *GetLoadBalancerStatisticsOptions) (result *LoadBalancerStatistics, response *core.DetailedResponse, err error) {
	return vpc.GetLoadBalancerStatisticsWithContext(context.Background(), getLoadBalancerStatisticsOptions)
}

// GetLoadBalancerStatisticsWithContext is an alternate form of the GetLoadBalancerStatistics method which supports a Context parameter
func (vpc *VpcV1) GetLoadBalancerStatisticsWithContext(ctx context.Context, getLoadBalancerStatisticsOptions *GetLoadBalancerStatisticsOptions) (result *LoadBalancerStatistics, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getLoadBalancerStatisticsOptions, "getLoadBalancerStatisticsOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getLoadBalancerStatisticsOptions, "getLoadBalancerStatisticsOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *getLoadBalancerStatisticsOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{id}/statistics`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getLoadBalancerStatisticsOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetLoadBalancerStatistics")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerStatistics)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListLoadBalancerListeners : List all listeners for a load balancer
// This request lists all listeners for a load balancer.
func (vpc *VpcV1) ListLoadBalancerListeners(listLoadBalancerListenersOptions *ListLoadBalancerListenersOptions) (result *LoadBalancerListenerCollection, response *core.DetailedResponse, err error) {
	return vpc.ListLoadBalancerListenersWithContext(context.Background(), listLoadBalancerListenersOptions)
}

// ListLoadBalancerListenersWithContext is an alternate form of the ListLoadBalancerListeners method which supports a Context parameter
func (vpc *VpcV1) ListLoadBalancerListenersWithContext(ctx context.Context, listLoadBalancerListenersOptions *ListLoadBalancerListenersOptions) (result *LoadBalancerListenerCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(listLoadBalancerListenersOptions, "listLoadBalancerListenersOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(listLoadBalancerListenersOptions, "listLoadBalancerListenersOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"load_balancer_id": *listLoadBalancerListenersOptions.LoadBalancerID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range listLoadBalancerListenersOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListLoadBalancerListeners")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateLoadBalancerListener : Create a listener for a load balancer
// This request creates a new listener for a load balancer.
func (vpc *VpcV1) CreateLoadBalancerListener(createLoadBalancerListenerOptions *CreateLoadBalancerListenerOptions) (result *LoadBalancerListener, response *core.DetailedResponse, err error) {
	return vpc.CreateLoadBalancerListenerWithContext(context.Background(), createLoadBalancerListenerOptions)
}

// CreateLoadBalancerListenerWithContext is an alternate form of the CreateLoadBalancerListener method which supports a Context parameter
func (vpc *VpcV1) CreateLoadBalancerListenerWithContext(ctx context.Context, createLoadBalancerListenerOptions *CreateLoadBalancerListenerOptions) (result *LoadBalancerListener, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createLoadBalancerListenerOptions, "createLoadBalancerListenerOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createLoadBalancerListenerOptions, "createLoadBalancerListenerOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"load_balancer_id": *createLoadBalancerListenerOptions.LoadBalancerID,
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range createLoadBalancerListenerOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateLoadBalancerListener")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	body := make(map[string]interface{})
	if createLoadBalancerListenerOptions.Port != nil {
		body["port"] = createLoadBalancerListenerOptions.Port
	}
	if createLoadBalancerListenerOptions.Protocol != nil {
		body["protocol"] = createLoadBalancerListenerOptions.Protocol
	}
	if createLoadBalancerListenerOptions.AcceptProxyProtocol != nil {
		body["accept_proxy_protocol"] = createLoadBalancerListenerOptions.AcceptProxyProtocol
	}
	if createLoadBalancerListenerOptions.CertificateInstance != nil {
		body["certificate_instance"] = createLoadBalancerListenerOptions.CertificateInstance
	}
	if createLoadBalancerListenerOptions.ConnectionLimit != nil {
		body["connection_limit"] = createLoadBalancerListenerOptions.ConnectionLimit
	}
	if createLoadBalancerListenerOptions.DefaultPool != nil {
		body["default_pool"] = createLoadBalancerListenerOptions.DefaultPool
	}
	if createLoadBalancerListenerOptions.Policies != nil {
		body["policies"] = createLoadBalancerListenerOptions.Policies
	}
	_, err = builder.SetBodyContentJSON(body)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListener)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteLoadBalancerListener : Delete a load balancer listener
// This request deletes a load balancer listener. This operation cannot be reversed.
func (vpc *VpcV1) DeleteLoadBalancerListener(deleteLoadBalancerListenerOptions *DeleteLoadBalancerListenerOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteLoadBalancerListenerWithContext(context.Background(), deleteLoadBalancerListenerOptions)
}

// DeleteLoadBalancerListenerWithContext is an alternate form of the DeleteLoadBalancerListener method which supports a Context parameter
func (vpc *VpcV1) DeleteLoadBalancerListenerWithContext(ctx context.Context, deleteLoadBalancerListenerOptions *DeleteLoadBalancerListenerOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteLoadBalancerListenerOptions, "deleteLoadBalancerListenerOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteLoadBalancerListenerOptions, "deleteLoadBalancerListenerOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"load_balancer_id": *deleteLoadBalancerListenerOptions.LoadBalancerID,
		"id":               *deleteLoadBalancerListenerOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteLoadBalancerListenerOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteLoadBalancerListener")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetLoadBalancerListener : Retrieve a load balancer listener
// This request retrieves a single listener specified by the identifier in the URL path.
func (vpc *VpcV1) GetLoadBalancerListener(getLoadBalancerListenerOptions *GetLoadBalancerListenerOptions) (result *LoadBalancerListener, response *core.DetailedResponse, err error) {
	return vpc.GetLoadBalancerListenerWithContext(context.Background(), getLoadBalancerListenerOptions)
}

// GetLoadBalancerListenerWithContext is an alternate form of the GetLoadBalancerListener method which supports a Context parameter
func (vpc *VpcV1) GetLoadBalancerListenerWithContext(ctx context.Context, getLoadBalancerListenerOptions *GetLoadBalancerListenerOptions) (result *LoadBalancerListener, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getLoadBalancerListenerOptions, "getLoadBalancerListenerOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getLoadBalancerListenerOptions, "getLoadBalancerListenerOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"load_balancer_id": *getLoadBalancerListenerOptions.LoadBalancerID,
		"id":               *getLoadBalancerListenerOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getLoadBalancerListenerOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetLoadBalancerListener")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListener)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateLoadBalancerListener : Update a load balancer listener
// This request updates a load balancer listener from a listener patch.
func (vpc *VpcV1) UpdateLoadBalancerListener(updateLoadBalancerListenerOptions *UpdateLoadBalancerListenerOptions) (result *LoadBalancerListener, response *core.DetailedResponse, err error) {
	return vpc.UpdateLoadBalancerListenerWithContext(context.Background(), updateLoadBalancerListenerOptions)
}

// UpdateLoadBalancerListenerWithContext is an alternate form of the UpdateLoadBalancerListener method which supports a Context parameter
func (vpc *VpcV1) UpdateLoadBalancerListenerWithContext(ctx context.Context, updateLoadBalancerListenerOptions *UpdateLoadBalancerListenerOptions) (result *LoadBalancerListener, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateLoadBalancerListenerOptions, "updateLoadBalancerListenerOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateLoadBalancerListenerOptions, "updateLoadBalancerListenerOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"load_balancer_id": *updateLoadBalancerListenerOptions.LoadBalancerID,
		"id":               *updateLoadBalancerListenerOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateLoadBalancerListenerOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateLoadBalancerListener")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateLoadBalancerListenerOptions.LoadBalancerListenerPatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListener)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListLoadBalancerListenerPolicies : List all policies for a load balancer listener
// This request lists all policies for a load balancer listener.
func (vpc *VpcV1) ListLoadBalancerListenerPolicies(listLoadBalancerListenerPoliciesOptions *ListLoadBalancerListenerPoliciesOptions) (result *LoadBalancerListenerPolicyCollection, response *core.DetailedResponse, err error) {
	return vpc.ListLoadBalancerListenerPoliciesWithContext(context.Background(), listLoadBalancerListenerPoliciesOptions)
}

// ListLoadBalancerListenerPoliciesWithContext is an alternate form of the ListLoadBalancerListenerPolicies method which supports a Context parameter
func (vpc *VpcV1) ListLoadBalancerListenerPoliciesWithContext(ctx context.Context, listLoadBalancerListenerPoliciesOptions *ListLoadBalancerListenerPoliciesOptions) (result *LoadBalancerListenerPolicyCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(listLoadBalancerListenerPoliciesOptions, "listLoadBalancerListenerPoliciesOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(listLoadBalancerListenerPoliciesOptions, "listLoadBalancerListenerPoliciesOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"load_balancer_id": *listLoadBalancerListenerPoliciesOptions.LoadBalancerID,
		"listener_id":      *listLoadBalancerListenerPoliciesOptions.ListenerID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range listLoadBalancerListenerPoliciesOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListLoadBalancerListenerPolicies")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerPolicyCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateLoadBalancerListenerPolicy : Create a policy for a load balancer listener
// Creates a new policy for a load balancer listener.
func (vpc *VpcV1) CreateLoadBalancerListenerPolicy(createLoadBalancerListenerPolicyOptions *CreateLoadBalancerListenerPolicyOptions) (result *LoadBalancerListenerPolicy, response *core.DetailedResponse, err error) {
	return vpc.CreateLoadBalancerListenerPolicyWithContext(context.Background(), createLoadBalancerListenerPolicyOptions)
}

// CreateLoadBalancerListenerPolicyWithContext is an alternate form of the CreateLoadBalancerListenerPolicy method which supports a Context parameter
func (vpc *VpcV1) CreateLoadBalancerListenerPolicyWithContext(ctx context.Context, createLoadBalancerListenerPolicyOptions *CreateLoadBalancerListenerPolicyOptions) (result *LoadBalancerListenerPolicy, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createLoadBalancerListenerPolicyOptions, "createLoadBalancerListenerPolicyOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createLoadBalancerListenerPolicyOptions, "createLoadBalancerListenerPolicyOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"load_balancer_id": *createLoadBalancerListenerPolicyOptions.LoadBalancerID,
		"listener_id":      *createLoadBalancerListenerPolicyOptions.ListenerID,
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range createLoadBalancerListenerPolicyOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateLoadBalancerListenerPolicy")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	body := make(map[string]interface{})
	if createLoadBalancerListenerPolicyOptions.Action != nil {
		body["action"] = createLoadBalancerListenerPolicyOptions.Action
	}
	if createLoadBalancerListenerPolicyOptions.Priority != nil {
		body["priority"] = createLoadBalancerListenerPolicyOptions.Priority
	}
	if createLoadBalancerListenerPolicyOptions.Name != nil {
		body["name"] = createLoadBalancerListenerPolicyOptions.Name
	}
	if createLoadBalancerListenerPolicyOptions.Rules != nil {
		body["rules"] = createLoadBalancerListenerPolicyOptions.Rules
	}
	if createLoadBalancerListenerPolicyOptions.Target != nil {
		body["target"] = createLoadBalancerListenerPolicyOptions.Target
	}
	_, err = builder.SetBodyContentJSON(body)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerPolicy)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteLoadBalancerListenerPolicy : Delete a load balancer listener policy
// Deletes a policy of the load balancer listener. This operation cannot be reversed.
func (vpc *VpcV1) DeleteLoadBalancerListenerPolicy(deleteLoadBalancerListenerPolicyOptions *DeleteLoadBalancerListenerPolicyOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteLoadBalancerListenerPolicyWithContext(context.Background(), deleteLoadBalancerListenerPolicyOptions)
}

// DeleteLoadBalancerListenerPolicyWithContext is an alternate form of the DeleteLoadBalancerListenerPolicy method which supports a Context parameter
func (vpc *VpcV1) DeleteLoadBalancerListenerPolicyWithContext(ctx context.Context, deleteLoadBalancerListenerPolicyOptions *DeleteLoadBalancerListenerPolicyOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteLoadBalancerListenerPolicyOptions, "deleteLoadBalancerListenerPolicyOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteLoadBalancerListenerPolicyOptions, "deleteLoadBalancerListenerPolicyOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"load_balancer_id": *deleteLoadBalancerListenerPolicyOptions.LoadBalancerID,
		"listener_id":      *deleteLoadBalancerListenerPolicyOptions.ListenerID,
		"id":               *deleteLoadBalancerListenerPolicyOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteLoadBalancerListenerPolicyOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteLoadBalancerListenerPolicy")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetLoadBalancerListenerPolicy : Retrieve a load balancer listener policy
// Retrieve a single policy specified by the identifier in the URL path.
func (vpc *VpcV1) GetLoadBalancerListenerPolicy(getLoadBalancerListenerPolicyOptions *GetLoadBalancerListenerPolicyOptions) (result *LoadBalancerListenerPolicy, response *core.DetailedResponse, err error) {
	return vpc.GetLoadBalancerListenerPolicyWithContext(context.Background(), getLoadBalancerListenerPolicyOptions)
}

// GetLoadBalancerListenerPolicyWithContext is an alternate form of the GetLoadBalancerListenerPolicy method which supports a Context parameter
func (vpc *VpcV1) GetLoadBalancerListenerPolicyWithContext(ctx context.Context, getLoadBalancerListenerPolicyOptions *GetLoadBalancerListenerPolicyOptions) (result *LoadBalancerListenerPolicy, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getLoadBalancerListenerPolicyOptions, "getLoadBalancerListenerPolicyOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getLoadBalancerListenerPolicyOptions, "getLoadBalancerListenerPolicyOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"load_balancer_id": *getLoadBalancerListenerPolicyOptions.LoadBalancerID,
		"listener_id":      *getLoadBalancerListenerPolicyOptions.ListenerID,
		"id":               *getLoadBalancerListenerPolicyOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getLoadBalancerListenerPolicyOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetLoadBalancerListenerPolicy")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerPolicy)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateLoadBalancerListenerPolicy : Update a load balancer listener policy
// Updates a policy from a policy patch.
func (vpc *VpcV1) UpdateLoadBalancerListenerPolicy(updateLoadBalancerListenerPolicyOptions *UpdateLoadBalancerListenerPolicyOptions) (result *LoadBalancerListenerPolicy, response *core.DetailedResponse, err error) {
	return vpc.UpdateLoadBalancerListenerPolicyWithContext(context.Background(), updateLoadBalancerListenerPolicyOptions)
}

// UpdateLoadBalancerListenerPolicyWithContext is an alternate form of the UpdateLoadBalancerListenerPolicy method which supports a Context parameter
func (vpc *VpcV1) UpdateLoadBalancerListenerPolicyWithContext(ctx context.Context, updateLoadBalancerListenerPolicyOptions *UpdateLoadBalancerListenerPolicyOptions) (result *LoadBalancerListenerPolicy, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateLoadBalancerListenerPolicyOptions, "updateLoadBalancerListenerPolicyOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateLoadBalancerListenerPolicyOptions, "updateLoadBalancerListenerPolicyOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"load_balancer_id": *updateLoadBalancerListenerPolicyOptions.LoadBalancerID,
		"listener_id":      *updateLoadBalancerListenerPolicyOptions.ListenerID,
		"id":               *updateLoadBalancerListenerPolicyOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateLoadBalancerListenerPolicyOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateLoadBalancerListenerPolicy")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateLoadBalancerListenerPolicyOptions.LoadBalancerListenerPolicyPatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerPolicy)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListLoadBalancerListenerPolicyRules : List all rules of a load balancer listener policy
// This request lists all rules of a load balancer listener policy.
func (vpc *VpcV1) ListLoadBalancerListenerPolicyRules(listLoadBalancerListenerPolicyRulesOptions *ListLoadBalancerListenerPolicyRulesOptions) (result *LoadBalancerListenerPolicyRuleCollection, response *core.DetailedResponse, err error) {
	return vpc.ListLoadBalancerListenerPolicyRulesWithContext(context.Background(), listLoadBalancerListenerPolicyRulesOptions)
}

// ListLoadBalancerListenerPolicyRulesWithContext is an alternate form of the ListLoadBalancerListenerPolicyRules method which supports a Context parameter
func (vpc *VpcV1) ListLoadBalancerListenerPolicyRulesWithContext(ctx context.Context, listLoadBalancerListenerPolicyRulesOptions *ListLoadBalancerListenerPolicyRulesOptions) (result *LoadBalancerListenerPolicyRuleCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(listLoadBalancerListenerPolicyRulesOptions, "listLoadBalancerListenerPolicyRulesOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(listLoadBalancerListenerPolicyRulesOptions, "listLoadBalancerListenerPolicyRulesOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"load_balancer_id": *listLoadBalancerListenerPolicyRulesOptions.LoadBalancerID,
		"listener_id":      *listLoadBalancerListenerPolicyRulesOptions.ListenerID,
		"policy_id":        *listLoadBalancerListenerPolicyRulesOptions.PolicyID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range listLoadBalancerListenerPolicyRulesOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListLoadBalancerListenerPolicyRules")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerPolicyRuleCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateLoadBalancerListenerPolicyRule : Create a rule for a load balancer listener policy
// Creates a new rule for the load balancer listener policy.
func (vpc *VpcV1) CreateLoadBalancerListenerPolicyRule(createLoadBalancerListenerPolicyRuleOptions *CreateLoadBalancerListenerPolicyRuleOptions) (result *LoadBalancerListenerPolicyRule, response *core.DetailedResponse, err error) {
	return vpc.CreateLoadBalancerListenerPolicyRuleWithContext(context.Background(), createLoadBalancerListenerPolicyRuleOptions)
}

// CreateLoadBalancerListenerPolicyRuleWithContext is an alternate form of the CreateLoadBalancerListenerPolicyRule method which supports a Context parameter
func (vpc *VpcV1) CreateLoadBalancerListenerPolicyRuleWithContext(ctx context.Context, createLoadBalancerListenerPolicyRuleOptions *CreateLoadBalancerListenerPolicyRuleOptions) (result *LoadBalancerListenerPolicyRule, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createLoadBalancerListenerPolicyRuleOptions, "createLoadBalancerListenerPolicyRuleOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createLoadBalancerListenerPolicyRuleOptions, "createLoadBalancerListenerPolicyRuleOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"load_balancer_id": *createLoadBalancerListenerPolicyRuleOptions.LoadBalancerID,
		"listener_id":      *createLoadBalancerListenerPolicyRuleOptions.ListenerID,
		"policy_id":        *createLoadBalancerListenerPolicyRuleOptions.PolicyID,
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range createLoadBalancerListenerPolicyRuleOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateLoadBalancerListenerPolicyRule")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	body := make(map[string]interface{})
	if createLoadBalancerListenerPolicyRuleOptions.Condition != nil {
		body["condition"] = createLoadBalancerListenerPolicyRuleOptions.Condition
	}
	if createLoadBalancerListenerPolicyRuleOptions.Type != nil {
		body["type"] = createLoadBalancerListenerPolicyRuleOptions.Type
	}
	if createLoadBalancerListenerPolicyRuleOptions.Value != nil {
		body["value"] = createLoadBalancerListenerPolicyRuleOptions.Value
	}
	if createLoadBalancerListenerPolicyRuleOptions.Field != nil {
		body["field"] = createLoadBalancerListenerPolicyRuleOptions.Field
	}
	_, err = builder.SetBodyContentJSON(body)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerPolicyRule)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteLoadBalancerListenerPolicyRule : Delete a load balancer listener policy rule
// Deletes a rule from the load balancer listener policy. This operation cannot be reversed.
func (vpc *VpcV1) DeleteLoadBalancerListenerPolicyRule(deleteLoadBalancerListenerPolicyRuleOptions *DeleteLoadBalancerListenerPolicyRuleOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteLoadBalancerListenerPolicyRuleWithContext(context.Background(), deleteLoadBalancerListenerPolicyRuleOptions)
}

// DeleteLoadBalancerListenerPolicyRuleWithContext is an alternate form of the DeleteLoadBalancerListenerPolicyRule method which supports a Context parameter
func (vpc *VpcV1) DeleteLoadBalancerListenerPolicyRuleWithContext(ctx context.Context, deleteLoadBalancerListenerPolicyRuleOptions *DeleteLoadBalancerListenerPolicyRuleOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteLoadBalancerListenerPolicyRuleOptions, "deleteLoadBalancerListenerPolicyRuleOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteLoadBalancerListenerPolicyRuleOptions, "deleteLoadBalancerListenerPolicyRuleOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"load_balancer_id": *deleteLoadBalancerListenerPolicyRuleOptions.LoadBalancerID,
		"listener_id":      *deleteLoadBalancerListenerPolicyRuleOptions.ListenerID,
		"policy_id":        *deleteLoadBalancerListenerPolicyRuleOptions.PolicyID,
		"id":               *deleteLoadBalancerListenerPolicyRuleOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteLoadBalancerListenerPolicyRuleOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteLoadBalancerListenerPolicyRule")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetLoadBalancerListenerPolicyRule : Retrieve a load balancer listener policy rule
// Retrieves a single rule specified by the identifier in the URL path.
func (vpc *VpcV1) GetLoadBalancerListenerPolicyRule(getLoadBalancerListenerPolicyRuleOptions *GetLoadBalancerListenerPolicyRuleOptions) (result *LoadBalancerListenerPolicyRule, response *core.DetailedResponse, err error) {
	return vpc.GetLoadBalancerListenerPolicyRuleWithContext(context.Background(), getLoadBalancerListenerPolicyRuleOptions)
}

// GetLoadBalancerListenerPolicyRuleWithContext is an alternate form of the GetLoadBalancerListenerPolicyRule method which supports a Context parameter
func (vpc *VpcV1) GetLoadBalancerListenerPolicyRuleWithContext(ctx context.Context, getLoadBalancerListenerPolicyRuleOptions *GetLoadBalancerListenerPolicyRuleOptions) (result *LoadBalancerListenerPolicyRule, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getLoadBalancerListenerPolicyRuleOptions, "getLoadBalancerListenerPolicyRuleOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getLoadBalancerListenerPolicyRuleOptions, "getLoadBalancerListenerPolicyRuleOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"load_balancer_id": *getLoadBalancerListenerPolicyRuleOptions.LoadBalancerID,
		"listener_id":      *getLoadBalancerListenerPolicyRuleOptions.ListenerID,
		"policy_id":        *getLoadBalancerListenerPolicyRuleOptions.PolicyID,
		"id":               *getLoadBalancerListenerPolicyRuleOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getLoadBalancerListenerPolicyRuleOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetLoadBalancerListenerPolicyRule")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerPolicyRule)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateLoadBalancerListenerPolicyRule : Update a load balancer listener policy rule
// Updates a rule of the load balancer listener policy.
func (vpc *VpcV1) UpdateLoadBalancerListenerPolicyRule(updateLoadBalancerListenerPolicyRuleOptions *UpdateLoadBalancerListenerPolicyRuleOptions) (result *LoadBalancerListenerPolicyRule, response *core.DetailedResponse, err error) {
	return vpc.UpdateLoadBalancerListenerPolicyRuleWithContext(context.Background(), updateLoadBalancerListenerPolicyRuleOptions)
}

// UpdateLoadBalancerListenerPolicyRuleWithContext is an alternate form of the UpdateLoadBalancerListenerPolicyRule method which supports a Context parameter
func (vpc *VpcV1) UpdateLoadBalancerListenerPolicyRuleWithContext(ctx context.Context, updateLoadBalancerListenerPolicyRuleOptions *UpdateLoadBalancerListenerPolicyRuleOptions) (result *LoadBalancerListenerPolicyRule, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateLoadBalancerListenerPolicyRuleOptions, "updateLoadBalancerListenerPolicyRuleOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateLoadBalancerListenerPolicyRuleOptions, "updateLoadBalancerListenerPolicyRuleOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"load_balancer_id": *updateLoadBalancerListenerPolicyRuleOptions.LoadBalancerID,
		"listener_id":      *updateLoadBalancerListenerPolicyRuleOptions.ListenerID,
		"policy_id":        *updateLoadBalancerListenerPolicyRuleOptions.PolicyID,
		"id":               *updateLoadBalancerListenerPolicyRuleOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateLoadBalancerListenerPolicyRuleOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateLoadBalancerListenerPolicyRule")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateLoadBalancerListenerPolicyRuleOptions.LoadBalancerListenerPolicyRulePatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerListenerPolicyRule)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListLoadBalancerPools : List all pools of a load balancer
// This request lists all pools of a load balancer.
func (vpc *VpcV1) ListLoadBalancerPools(listLoadBalancerPoolsOptions *ListLoadBalancerPoolsOptions) (result *LoadBalancerPoolCollection, response *core.DetailedResponse, err error) {
	return vpc.ListLoadBalancerPoolsWithContext(context.Background(), listLoadBalancerPoolsOptions)
}

// ListLoadBalancerPoolsWithContext is an alternate form of the ListLoadBalancerPools method which supports a Context parameter
func (vpc *VpcV1) ListLoadBalancerPoolsWithContext(ctx context.Context, listLoadBalancerPoolsOptions *ListLoadBalancerPoolsOptions) (result *LoadBalancerPoolCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(listLoadBalancerPoolsOptions, "listLoadBalancerPoolsOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(listLoadBalancerPoolsOptions, "listLoadBalancerPoolsOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"load_balancer_id": *listLoadBalancerPoolsOptions.LoadBalancerID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range listLoadBalancerPoolsOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListLoadBalancerPools")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPoolCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateLoadBalancerPool : Create a load balancer pool
// This request creates a new pool from a pool prototype object.
func (vpc *VpcV1) CreateLoadBalancerPool(createLoadBalancerPoolOptions *CreateLoadBalancerPoolOptions) (result *LoadBalancerPool, response *core.DetailedResponse, err error) {
	return vpc.CreateLoadBalancerPoolWithContext(context.Background(), createLoadBalancerPoolOptions)
}

// CreateLoadBalancerPoolWithContext is an alternate form of the CreateLoadBalancerPool method which supports a Context parameter
func (vpc *VpcV1) CreateLoadBalancerPoolWithContext(ctx context.Context, createLoadBalancerPoolOptions *CreateLoadBalancerPoolOptions) (result *LoadBalancerPool, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createLoadBalancerPoolOptions, "createLoadBalancerPoolOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createLoadBalancerPoolOptions, "createLoadBalancerPoolOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"load_balancer_id": *createLoadBalancerPoolOptions.LoadBalancerID,
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range createLoadBalancerPoolOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateLoadBalancerPool")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	body := make(map[string]interface{})
	if createLoadBalancerPoolOptions.Algorithm != nil {
		body["algorithm"] = createLoadBalancerPoolOptions.Algorithm
	}
	if createLoadBalancerPoolOptions.HealthMonitor != nil {
		body["health_monitor"] = createLoadBalancerPoolOptions.HealthMonitor
	}
	if createLoadBalancerPoolOptions.Protocol != nil {
		body["protocol"] = createLoadBalancerPoolOptions.Protocol
	}
	if createLoadBalancerPoolOptions.Members != nil {
		body["members"] = createLoadBalancerPoolOptions.Members
	}
	if createLoadBalancerPoolOptions.Name != nil {
		body["name"] = createLoadBalancerPoolOptions.Name
	}
	if createLoadBalancerPoolOptions.ProxyProtocol != nil {
		body["proxy_protocol"] = createLoadBalancerPoolOptions.ProxyProtocol
	}
	if createLoadBalancerPoolOptions.SessionPersistence != nil {
		body["session_persistence"] = createLoadBalancerPoolOptions.SessionPersistence
	}
	_, err = builder.SetBodyContentJSON(body)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPool)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteLoadBalancerPool : Delete a load balancer pool
// This request deletes a load balancer pool. This operation cannot be reversed. The pool must not currently be the
// default pool for any listener in the load balancer.
func (vpc *VpcV1) DeleteLoadBalancerPool(deleteLoadBalancerPoolOptions *DeleteLoadBalancerPoolOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteLoadBalancerPoolWithContext(context.Background(), deleteLoadBalancerPoolOptions)
}

// DeleteLoadBalancerPoolWithContext is an alternate form of the DeleteLoadBalancerPool method which supports a Context parameter
func (vpc *VpcV1) DeleteLoadBalancerPoolWithContext(ctx context.Context, deleteLoadBalancerPoolOptions *DeleteLoadBalancerPoolOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteLoadBalancerPoolOptions, "deleteLoadBalancerPoolOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteLoadBalancerPoolOptions, "deleteLoadBalancerPoolOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"load_balancer_id": *deleteLoadBalancerPoolOptions.LoadBalancerID,
		"id":               *deleteLoadBalancerPoolOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteLoadBalancerPoolOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteLoadBalancerPool")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetLoadBalancerPool : Retrieve a load balancer pool
// This request retrieves a single pool specified by the identifier in the URL path.
func (vpc *VpcV1) GetLoadBalancerPool(getLoadBalancerPoolOptions *GetLoadBalancerPoolOptions) (result *LoadBalancerPool, response *core.DetailedResponse, err error) {
	return vpc.GetLoadBalancerPoolWithContext(context.Background(), getLoadBalancerPoolOptions)
}

// GetLoadBalancerPoolWithContext is an alternate form of the GetLoadBalancerPool method which supports a Context parameter
func (vpc *VpcV1) GetLoadBalancerPoolWithContext(ctx context.Context, getLoadBalancerPoolOptions *GetLoadBalancerPoolOptions) (result *LoadBalancerPool, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getLoadBalancerPoolOptions, "getLoadBalancerPoolOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getLoadBalancerPoolOptions, "getLoadBalancerPoolOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"load_balancer_id": *getLoadBalancerPoolOptions.LoadBalancerID,
		"id":               *getLoadBalancerPoolOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getLoadBalancerPoolOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetLoadBalancerPool")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPool)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateLoadBalancerPool : Update a load balancer pool
// This request updates a load balancer pool from a pool patch.
func (vpc *VpcV1) UpdateLoadBalancerPool(updateLoadBalancerPoolOptions *UpdateLoadBalancerPoolOptions) (result *LoadBalancerPool, response *core.DetailedResponse, err error) {
	return vpc.UpdateLoadBalancerPoolWithContext(context.Background(), updateLoadBalancerPoolOptions)
}

// UpdateLoadBalancerPoolWithContext is an alternate form of the UpdateLoadBalancerPool method which supports a Context parameter
func (vpc *VpcV1) UpdateLoadBalancerPoolWithContext(ctx context.Context, updateLoadBalancerPoolOptions *UpdateLoadBalancerPoolOptions) (result *LoadBalancerPool, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateLoadBalancerPoolOptions, "updateLoadBalancerPoolOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateLoadBalancerPoolOptions, "updateLoadBalancerPoolOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"load_balancer_id": *updateLoadBalancerPoolOptions.LoadBalancerID,
		"id":               *updateLoadBalancerPoolOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateLoadBalancerPoolOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateLoadBalancerPool")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateLoadBalancerPoolOptions.LoadBalancerPoolPatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPool)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListLoadBalancerPoolMembers : List all members of a load balancer pool
// This request lists all members of a load balancer pool.
func (vpc *VpcV1) ListLoadBalancerPoolMembers(listLoadBalancerPoolMembersOptions *ListLoadBalancerPoolMembersOptions) (result *LoadBalancerPoolMemberCollection, response *core.DetailedResponse, err error) {
	return vpc.ListLoadBalancerPoolMembersWithContext(context.Background(), listLoadBalancerPoolMembersOptions)
}

// ListLoadBalancerPoolMembersWithContext is an alternate form of the ListLoadBalancerPoolMembers method which supports a Context parameter
func (vpc *VpcV1) ListLoadBalancerPoolMembersWithContext(ctx context.Context, listLoadBalancerPoolMembersOptions *ListLoadBalancerPoolMembersOptions) (result *LoadBalancerPoolMemberCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(listLoadBalancerPoolMembersOptions, "listLoadBalancerPoolMembersOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(listLoadBalancerPoolMembersOptions, "listLoadBalancerPoolMembersOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"load_balancer_id": *listLoadBalancerPoolMembersOptions.LoadBalancerID,
		"pool_id":          *listLoadBalancerPoolMembersOptions.PoolID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{pool_id}/members`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range listLoadBalancerPoolMembersOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListLoadBalancerPoolMembers")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPoolMemberCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateLoadBalancerPoolMember : Create a member in a load balancer pool
// This request creates a new member and adds the member to the pool.
func (vpc *VpcV1) CreateLoadBalancerPoolMember(createLoadBalancerPoolMemberOptions *CreateLoadBalancerPoolMemberOptions) (result *LoadBalancerPoolMember, response *core.DetailedResponse, err error) {
	return vpc.CreateLoadBalancerPoolMemberWithContext(context.Background(), createLoadBalancerPoolMemberOptions)
}

// CreateLoadBalancerPoolMemberWithContext is an alternate form of the CreateLoadBalancerPoolMember method which supports a Context parameter
func (vpc *VpcV1) CreateLoadBalancerPoolMemberWithContext(ctx context.Context, createLoadBalancerPoolMemberOptions *CreateLoadBalancerPoolMemberOptions) (result *LoadBalancerPoolMember, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createLoadBalancerPoolMemberOptions, "createLoadBalancerPoolMemberOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createLoadBalancerPoolMemberOptions, "createLoadBalancerPoolMemberOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"load_balancer_id": *createLoadBalancerPoolMemberOptions.LoadBalancerID,
		"pool_id":          *createLoadBalancerPoolMemberOptions.PoolID,
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{pool_id}/members`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range createLoadBalancerPoolMemberOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateLoadBalancerPoolMember")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	body := make(map[string]interface{})
	if createLoadBalancerPoolMemberOptions.Port != nil {
		body["port"] = createLoadBalancerPoolMemberOptions.Port
	}
	if createLoadBalancerPoolMemberOptions.Target != nil {
		body["target"] = createLoadBalancerPoolMemberOptions.Target
	}
	if createLoadBalancerPoolMemberOptions.Weight != nil {
		body["weight"] = createLoadBalancerPoolMemberOptions.Weight
	}
	_, err = builder.SetBodyContentJSON(body)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPoolMember)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ReplaceLoadBalancerPoolMembers : Replace load balancer pool members
// This request replaces the existing members of the load balancer pool with new members created from the collection of
// member prototype objects.
func (vpc *VpcV1) ReplaceLoadBalancerPoolMembers(replaceLoadBalancerPoolMembersOptions *ReplaceLoadBalancerPoolMembersOptions) (result *LoadBalancerPoolMemberCollection, response *core.DetailedResponse, err error) {
	return vpc.ReplaceLoadBalancerPoolMembersWithContext(context.Background(), replaceLoadBalancerPoolMembersOptions)
}

// ReplaceLoadBalancerPoolMembersWithContext is an alternate form of the ReplaceLoadBalancerPoolMembers method which supports a Context parameter
func (vpc *VpcV1) ReplaceLoadBalancerPoolMembersWithContext(ctx context.Context, replaceLoadBalancerPoolMembersOptions *ReplaceLoadBalancerPoolMembersOptions) (result *LoadBalancerPoolMemberCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(replaceLoadBalancerPoolMembersOptions, "replaceLoadBalancerPoolMembersOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(replaceLoadBalancerPoolMembersOptions, "replaceLoadBalancerPoolMembersOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"load_balancer_id": *replaceLoadBalancerPoolMembersOptions.LoadBalancerID,
		"pool_id":          *replaceLoadBalancerPoolMembersOptions.PoolID,
	}

	builder := core.NewRequestBuilder(core.PUT)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{pool_id}/members`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range replaceLoadBalancerPoolMembersOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ReplaceLoadBalancerPoolMembers")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	body := make(map[string]interface{})
	if replaceLoadBalancerPoolMembersOptions.Members != nil {
		body["members"] = replaceLoadBalancerPoolMembersOptions.Members
	}
	_, err = builder.SetBodyContentJSON(body)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPoolMemberCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteLoadBalancerPoolMember : Delete a load balancer pool member
// This request deletes a member from the pool. This operation cannot be reversed.
func (vpc *VpcV1) DeleteLoadBalancerPoolMember(deleteLoadBalancerPoolMemberOptions *DeleteLoadBalancerPoolMemberOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteLoadBalancerPoolMemberWithContext(context.Background(), deleteLoadBalancerPoolMemberOptions)
}

// DeleteLoadBalancerPoolMemberWithContext is an alternate form of the DeleteLoadBalancerPoolMember method which supports a Context parameter
func (vpc *VpcV1) DeleteLoadBalancerPoolMemberWithContext(ctx context.Context, deleteLoadBalancerPoolMemberOptions *DeleteLoadBalancerPoolMemberOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteLoadBalancerPoolMemberOptions, "deleteLoadBalancerPoolMemberOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteLoadBalancerPoolMemberOptions, "deleteLoadBalancerPoolMemberOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"load_balancer_id": *deleteLoadBalancerPoolMemberOptions.LoadBalancerID,
		"pool_id":          *deleteLoadBalancerPoolMemberOptions.PoolID,
		"id":               *deleteLoadBalancerPoolMemberOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{pool_id}/members/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteLoadBalancerPoolMemberOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteLoadBalancerPoolMember")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetLoadBalancerPoolMember : Retrieve a load balancer pool member
// This request retrieves a single member specified by the identifier in the URL path.
func (vpc *VpcV1) GetLoadBalancerPoolMember(getLoadBalancerPoolMemberOptions *GetLoadBalancerPoolMemberOptions) (result *LoadBalancerPoolMember, response *core.DetailedResponse, err error) {
	return vpc.GetLoadBalancerPoolMemberWithContext(context.Background(), getLoadBalancerPoolMemberOptions)
}

// GetLoadBalancerPoolMemberWithContext is an alternate form of the GetLoadBalancerPoolMember method which supports a Context parameter
func (vpc *VpcV1) GetLoadBalancerPoolMemberWithContext(ctx context.Context, getLoadBalancerPoolMemberOptions *GetLoadBalancerPoolMemberOptions) (result *LoadBalancerPoolMember, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getLoadBalancerPoolMemberOptions, "getLoadBalancerPoolMemberOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getLoadBalancerPoolMemberOptions, "getLoadBalancerPoolMemberOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"load_balancer_id": *getLoadBalancerPoolMemberOptions.LoadBalancerID,
		"pool_id":          *getLoadBalancerPoolMemberOptions.PoolID,
		"id":               *getLoadBalancerPoolMemberOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{pool_id}/members/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getLoadBalancerPoolMemberOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetLoadBalancerPoolMember")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPoolMember)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateLoadBalancerPoolMember : Update a load balancer pool member
// This request updates an existing member from a member patch.
func (vpc *VpcV1) UpdateLoadBalancerPoolMember(updateLoadBalancerPoolMemberOptions *UpdateLoadBalancerPoolMemberOptions) (result *LoadBalancerPoolMember, response *core.DetailedResponse, err error) {
	return vpc.UpdateLoadBalancerPoolMemberWithContext(context.Background(), updateLoadBalancerPoolMemberOptions)
}

// UpdateLoadBalancerPoolMemberWithContext is an alternate form of the UpdateLoadBalancerPoolMember method which supports a Context parameter
func (vpc *VpcV1) UpdateLoadBalancerPoolMemberWithContext(ctx context.Context, updateLoadBalancerPoolMemberOptions *UpdateLoadBalancerPoolMemberOptions) (result *LoadBalancerPoolMember, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateLoadBalancerPoolMemberOptions, "updateLoadBalancerPoolMemberOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateLoadBalancerPoolMemberOptions, "updateLoadBalancerPoolMemberOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"load_balancer_id": *updateLoadBalancerPoolMemberOptions.LoadBalancerID,
		"pool_id":          *updateLoadBalancerPoolMemberOptions.PoolID,
		"id":               *updateLoadBalancerPoolMemberOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{pool_id}/members/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateLoadBalancerPoolMemberOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateLoadBalancerPoolMember")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateLoadBalancerPoolMemberOptions.LoadBalancerPoolMemberPatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalLoadBalancerPoolMember)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListEndpointGateways : List all endpoint gateways
// This request lists all endpoint gateways in the region. An endpoint gateway maps one or more reserved IPs in a VPC to
// a target outside the VPC.
func (vpc *VpcV1) ListEndpointGateways(listEndpointGatewaysOptions *ListEndpointGatewaysOptions) (result *EndpointGatewayCollection, response *core.DetailedResponse, err error) {
	return vpc.ListEndpointGatewaysWithContext(context.Background(), listEndpointGatewaysOptions)
}

// ListEndpointGatewaysWithContext is an alternate form of the ListEndpointGateways method which supports a Context parameter
func (vpc *VpcV1) ListEndpointGatewaysWithContext(ctx context.Context, listEndpointGatewaysOptions *ListEndpointGatewaysOptions) (result *EndpointGatewayCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateStruct(listEndpointGatewaysOptions, "listEndpointGatewaysOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/endpoint_gateways`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range listEndpointGatewaysOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListEndpointGateways")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listEndpointGatewaysOptions.Name != nil {
		builder.AddQuery("name", fmt.Sprint(*listEndpointGatewaysOptions.Name))
	}
	if listEndpointGatewaysOptions.Start != nil {
		builder.AddQuery("start", fmt.Sprint(*listEndpointGatewaysOptions.Start))
	}
	if listEndpointGatewaysOptions.Limit != nil {
		builder.AddQuery("limit", fmt.Sprint(*listEndpointGatewaysOptions.Limit))
	}
	if listEndpointGatewaysOptions.ResourceGroupID != nil {
		builder.AddQuery("resource_group.id", fmt.Sprint(*listEndpointGatewaysOptions.ResourceGroupID))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalEndpointGatewayCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateEndpointGateway : Create an endpoint gateway
// This request creates a new endpoint gateway. An endpoint gateway maps one or more reserved IPs in a VPC to a target
// outside the VPC.
func (vpc *VpcV1) CreateEndpointGateway(createEndpointGatewayOptions *CreateEndpointGatewayOptions) (result *EndpointGateway, response *core.DetailedResponse, err error) {
	return vpc.CreateEndpointGatewayWithContext(context.Background(), createEndpointGatewayOptions)
}

// CreateEndpointGatewayWithContext is an alternate form of the CreateEndpointGateway method which supports a Context parameter
func (vpc *VpcV1) CreateEndpointGatewayWithContext(ctx context.Context, createEndpointGatewayOptions *CreateEndpointGatewayOptions) (result *EndpointGateway, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createEndpointGatewayOptions, "createEndpointGatewayOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createEndpointGatewayOptions, "createEndpointGatewayOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/endpoint_gateways`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range createEndpointGatewayOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateEndpointGateway")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	body := make(map[string]interface{})
	if createEndpointGatewayOptions.Target != nil {
		body["target"] = createEndpointGatewayOptions.Target
	}
	if createEndpointGatewayOptions.VPC != nil {
		body["vpc"] = createEndpointGatewayOptions.VPC
	}
	if createEndpointGatewayOptions.Ips != nil {
		body["ips"] = createEndpointGatewayOptions.Ips
	}
	if createEndpointGatewayOptions.Name != nil {
		body["name"] = createEndpointGatewayOptions.Name
	}
	if createEndpointGatewayOptions.ResourceGroup != nil {
		body["resource_group"] = createEndpointGatewayOptions.ResourceGroup
	}
	_, err = builder.SetBodyContentJSON(body)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalEndpointGateway)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListEndpointGatewayIps : List all reserved IPs bound to an endpoint gateway
// This request lists all reserved IPs bound to an endpoint gateway.
func (vpc *VpcV1) ListEndpointGatewayIps(listEndpointGatewayIpsOptions *ListEndpointGatewayIpsOptions) (result *ReservedIPCollectionEndpointGatewayContext, response *core.DetailedResponse, err error) {
	return vpc.ListEndpointGatewayIpsWithContext(context.Background(), listEndpointGatewayIpsOptions)
}

// ListEndpointGatewayIpsWithContext is an alternate form of the ListEndpointGatewayIps method which supports a Context parameter
func (vpc *VpcV1) ListEndpointGatewayIpsWithContext(ctx context.Context, listEndpointGatewayIpsOptions *ListEndpointGatewayIpsOptions) (result *ReservedIPCollectionEndpointGatewayContext, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(listEndpointGatewayIpsOptions, "listEndpointGatewayIpsOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(listEndpointGatewayIpsOptions, "listEndpointGatewayIpsOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"endpoint_gateway_id": *listEndpointGatewayIpsOptions.EndpointGatewayID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/endpoint_gateways/{endpoint_gateway_id}/ips`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range listEndpointGatewayIpsOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListEndpointGatewayIps")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listEndpointGatewayIpsOptions.Start != nil {
		builder.AddQuery("start", fmt.Sprint(*listEndpointGatewayIpsOptions.Start))
	}
	if listEndpointGatewayIpsOptions.Limit != nil {
		builder.AddQuery("limit", fmt.Sprint(*listEndpointGatewayIpsOptions.Limit))
	}
	if listEndpointGatewayIpsOptions.Sort != nil {
		builder.AddQuery("sort", fmt.Sprint(*listEndpointGatewayIpsOptions.Sort))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIPCollectionEndpointGatewayContext)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// RemoveEndpointGatewayIP : Unbind a reserved IP from an endpoint gateway
// This request unbinds the specified reserved IP from the specified endpoint gateway. If the reserved IP has
// `auto_delete` set to `true`, the reserved IP will be deleted.
func (vpc *VpcV1) RemoveEndpointGatewayIP(removeEndpointGatewayIPOptions *RemoveEndpointGatewayIPOptions) (response *core.DetailedResponse, err error) {
	return vpc.RemoveEndpointGatewayIPWithContext(context.Background(), removeEndpointGatewayIPOptions)
}

// RemoveEndpointGatewayIPWithContext is an alternate form of the RemoveEndpointGatewayIP method which supports a Context parameter
func (vpc *VpcV1) RemoveEndpointGatewayIPWithContext(ctx context.Context, removeEndpointGatewayIPOptions *RemoveEndpointGatewayIPOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(removeEndpointGatewayIPOptions, "removeEndpointGatewayIPOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(removeEndpointGatewayIPOptions, "removeEndpointGatewayIPOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"endpoint_gateway_id": *removeEndpointGatewayIPOptions.EndpointGatewayID,
		"id":                  *removeEndpointGatewayIPOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/endpoint_gateways/{endpoint_gateway_id}/ips/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range removeEndpointGatewayIPOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "RemoveEndpointGatewayIP")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetEndpointGatewayIP : Retrieve a reserved IP bound to an endpoint gateway
// This request a retrieves the specified reserved IP address if it is bound to the endpoint gateway specified in the
// URL.
func (vpc *VpcV1) GetEndpointGatewayIP(getEndpointGatewayIPOptions *GetEndpointGatewayIPOptions) (result *ReservedIP, response *core.DetailedResponse, err error) {
	return vpc.GetEndpointGatewayIPWithContext(context.Background(), getEndpointGatewayIPOptions)
}

// GetEndpointGatewayIPWithContext is an alternate form of the GetEndpointGatewayIP method which supports a Context parameter
func (vpc *VpcV1) GetEndpointGatewayIPWithContext(ctx context.Context, getEndpointGatewayIPOptions *GetEndpointGatewayIPOptions) (result *ReservedIP, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getEndpointGatewayIPOptions, "getEndpointGatewayIPOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getEndpointGatewayIPOptions, "getEndpointGatewayIPOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"endpoint_gateway_id": *getEndpointGatewayIPOptions.EndpointGatewayID,
		"id":                  *getEndpointGatewayIPOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/endpoint_gateways/{endpoint_gateway_id}/ips/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getEndpointGatewayIPOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetEndpointGatewayIP")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIP)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// AddEndpointGatewayIP : Bind a reserved IP to an endpoint gateway
// This request binds the specified reserved IP to the specified endpoint gateway. The reserved IP:
//
// - must currently be unbound
// - must not be in the same zone as any other reserved IP bound to the endpoint gateway.
func (vpc *VpcV1) AddEndpointGatewayIP(addEndpointGatewayIPOptions *AddEndpointGatewayIPOptions) (result *ReservedIP, response *core.DetailedResponse, err error) {
	return vpc.AddEndpointGatewayIPWithContext(context.Background(), addEndpointGatewayIPOptions)
}

// AddEndpointGatewayIPWithContext is an alternate form of the AddEndpointGatewayIP method which supports a Context parameter
func (vpc *VpcV1) AddEndpointGatewayIPWithContext(ctx context.Context, addEndpointGatewayIPOptions *AddEndpointGatewayIPOptions) (result *ReservedIP, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(addEndpointGatewayIPOptions, "addEndpointGatewayIPOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(addEndpointGatewayIPOptions, "addEndpointGatewayIPOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"endpoint_gateway_id": *addEndpointGatewayIPOptions.EndpointGatewayID,
		"id":                  *addEndpointGatewayIPOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PUT)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/endpoint_gateways/{endpoint_gateway_id}/ips/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range addEndpointGatewayIPOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "AddEndpointGatewayIP")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalReservedIP)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteEndpointGateway : Delete an endpoint gateway
// This request deletes an endpoint gateway. This operation cannot be reversed.
//
// Reserved IPs that were bound to the endpoint gateway will be released if their
// `auto_delete` property is set to true.
func (vpc *VpcV1) DeleteEndpointGateway(deleteEndpointGatewayOptions *DeleteEndpointGatewayOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteEndpointGatewayWithContext(context.Background(), deleteEndpointGatewayOptions)
}

// DeleteEndpointGatewayWithContext is an alternate form of the DeleteEndpointGateway method which supports a Context parameter
func (vpc *VpcV1) DeleteEndpointGatewayWithContext(ctx context.Context, deleteEndpointGatewayOptions *DeleteEndpointGatewayOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteEndpointGatewayOptions, "deleteEndpointGatewayOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteEndpointGatewayOptions, "deleteEndpointGatewayOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *deleteEndpointGatewayOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/endpoint_gateways/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteEndpointGatewayOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteEndpointGateway")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetEndpointGateway : Retrieve an endpoint gateway
// This request retrieves a single endpoint gateway specified by the identifier in the URL.
func (vpc *VpcV1) GetEndpointGateway(getEndpointGatewayOptions *GetEndpointGatewayOptions) (result *EndpointGateway, response *core.DetailedResponse, err error) {
	return vpc.GetEndpointGatewayWithContext(context.Background(), getEndpointGatewayOptions)
}

// GetEndpointGatewayWithContext is an alternate form of the GetEndpointGateway method which supports a Context parameter
func (vpc *VpcV1) GetEndpointGatewayWithContext(ctx context.Context, getEndpointGatewayOptions *GetEndpointGatewayOptions) (result *EndpointGateway, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getEndpointGatewayOptions, "getEndpointGatewayOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getEndpointGatewayOptions, "getEndpointGatewayOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *getEndpointGatewayOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/endpoint_gateways/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getEndpointGatewayOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetEndpointGateway")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalEndpointGateway)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateEndpointGateway : Update an endpoint gateway
// This request updates an endpoint gateway's name.
func (vpc *VpcV1) UpdateEndpointGateway(updateEndpointGatewayOptions *UpdateEndpointGatewayOptions) (result *EndpointGateway, response *core.DetailedResponse, err error) {
	return vpc.UpdateEndpointGatewayWithContext(context.Background(), updateEndpointGatewayOptions)
}

// UpdateEndpointGatewayWithContext is an alternate form of the UpdateEndpointGateway method which supports a Context parameter
func (vpc *VpcV1) UpdateEndpointGatewayWithContext(ctx context.Context, updateEndpointGatewayOptions *UpdateEndpointGatewayOptions) (result *EndpointGateway, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateEndpointGatewayOptions, "updateEndpointGatewayOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateEndpointGatewayOptions, "updateEndpointGatewayOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *updateEndpointGatewayOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/endpoint_gateways/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateEndpointGatewayOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateEndpointGateway")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateEndpointGatewayOptions.EndpointGatewayPatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalEndpointGateway)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// ListFlowLogCollectors : List all flow log collectors
// This request lists all flow log collectors in the region. A flow log collector summarizes data sent over one or more
// network interfaces within a VPC, depending on the chosen target.
func (vpc *VpcV1) ListFlowLogCollectors(listFlowLogCollectorsOptions *ListFlowLogCollectorsOptions) (result *FlowLogCollectorCollection, response *core.DetailedResponse, err error) {
	return vpc.ListFlowLogCollectorsWithContext(context.Background(), listFlowLogCollectorsOptions)
}

// ListFlowLogCollectorsWithContext is an alternate form of the ListFlowLogCollectors method which supports a Context parameter
func (vpc *VpcV1) ListFlowLogCollectorsWithContext(ctx context.Context, listFlowLogCollectorsOptions *ListFlowLogCollectorsOptions) (result *FlowLogCollectorCollection, response *core.DetailedResponse, err error) {
	err = core.ValidateStruct(listFlowLogCollectorsOptions, "listFlowLogCollectorsOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/flow_log_collectors`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range listFlowLogCollectorsOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListFlowLogCollectors")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))
	if listFlowLogCollectorsOptions.Start != nil {
		builder.AddQuery("start", fmt.Sprint(*listFlowLogCollectorsOptions.Start))
	}
	if listFlowLogCollectorsOptions.Limit != nil {
		builder.AddQuery("limit", fmt.Sprint(*listFlowLogCollectorsOptions.Limit))
	}
	if listFlowLogCollectorsOptions.ResourceGroupID != nil {
		builder.AddQuery("resource_group.id", fmt.Sprint(*listFlowLogCollectorsOptions.ResourceGroupID))
	}
	if listFlowLogCollectorsOptions.Name != nil {
		builder.AddQuery("name", fmt.Sprint(*listFlowLogCollectorsOptions.Name))
	}
	if listFlowLogCollectorsOptions.VPCID != nil {
		builder.AddQuery("vpc.id", fmt.Sprint(*listFlowLogCollectorsOptions.VPCID))
	}
	if listFlowLogCollectorsOptions.VPCCRN != nil {
		builder.AddQuery("vpc.crn", fmt.Sprint(*listFlowLogCollectorsOptions.VPCCRN))
	}
	if listFlowLogCollectorsOptions.VPCName != nil {
		builder.AddQuery("vpc.name", fmt.Sprint(*listFlowLogCollectorsOptions.VPCName))
	}
	if listFlowLogCollectorsOptions.TargetID != nil {
		builder.AddQuery("target.id", fmt.Sprint(*listFlowLogCollectorsOptions.TargetID))
	}
	if listFlowLogCollectorsOptions.TargetResourceType != nil {
		builder.AddQuery("target.resource_type", fmt.Sprint(*listFlowLogCollectorsOptions.TargetResourceType))
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFlowLogCollectorCollection)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// CreateFlowLogCollector : Create a flow log collector
// This request creates and starts a new flow log collector from a flow log collector prototype object. The prototype
// object is structured in the same way as a retrieved flow log collector, and contains the information necessary to
// create and start the new flow log collector.
func (vpc *VpcV1) CreateFlowLogCollector(createFlowLogCollectorOptions *CreateFlowLogCollectorOptions) (result *FlowLogCollector, response *core.DetailedResponse, err error) {
	return vpc.CreateFlowLogCollectorWithContext(context.Background(), createFlowLogCollectorOptions)
}

// CreateFlowLogCollectorWithContext is an alternate form of the CreateFlowLogCollector method which supports a Context parameter
func (vpc *VpcV1) CreateFlowLogCollectorWithContext(ctx context.Context, createFlowLogCollectorOptions *CreateFlowLogCollectorOptions) (result *FlowLogCollector, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(createFlowLogCollectorOptions, "createFlowLogCollectorOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(createFlowLogCollectorOptions, "createFlowLogCollectorOptions")
	if err != nil {
		return
	}

	builder := core.NewRequestBuilder(core.POST)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/flow_log_collectors`, nil)
	if err != nil {
		return
	}

	for headerName, headerValue := range createFlowLogCollectorOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "CreateFlowLogCollector")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	body := make(map[string]interface{})
	if createFlowLogCollectorOptions.StorageBucket != nil {
		body["storage_bucket"] = createFlowLogCollectorOptions.StorageBucket
	}
	if createFlowLogCollectorOptions.Target != nil {
		body["target"] = createFlowLogCollectorOptions.Target
	}
	if createFlowLogCollectorOptions.Active != nil {
		body["active"] = createFlowLogCollectorOptions.Active
	}
	if createFlowLogCollectorOptions.Name != nil {
		body["name"] = createFlowLogCollectorOptions.Name
	}
	if createFlowLogCollectorOptions.ResourceGroup != nil {
		body["resource_group"] = createFlowLogCollectorOptions.ResourceGroup
	}
	_, err = builder.SetBodyContentJSON(body)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFlowLogCollector)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// DeleteFlowLogCollector : Delete a flow log collector
// This request stops and deletes a flow log collector. Collected flow logs remain available within the flow log
// collector's bucket.
func (vpc *VpcV1) DeleteFlowLogCollector(deleteFlowLogCollectorOptions *DeleteFlowLogCollectorOptions) (response *core.DetailedResponse, err error) {
	return vpc.DeleteFlowLogCollectorWithContext(context.Background(), deleteFlowLogCollectorOptions)
}

// DeleteFlowLogCollectorWithContext is an alternate form of the DeleteFlowLogCollector method which supports a Context parameter
func (vpc *VpcV1) DeleteFlowLogCollectorWithContext(ctx context.Context, deleteFlowLogCollectorOptions *DeleteFlowLogCollectorOptions) (response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(deleteFlowLogCollectorOptions, "deleteFlowLogCollectorOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(deleteFlowLogCollectorOptions, "deleteFlowLogCollectorOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *deleteFlowLogCollectorOptions.ID,
	}

	builder := core.NewRequestBuilder(core.DELETE)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/flow_log_collectors/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range deleteFlowLogCollectorOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "DeleteFlowLogCollector")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	response, err = vpc.Service.Request(request, nil)

	return
}

// GetFlowLogCollector : Retrieve a flow log collector
// This request retrieves a single flow log collector specified by the identifier in the URL.
func (vpc *VpcV1) GetFlowLogCollector(getFlowLogCollectorOptions *GetFlowLogCollectorOptions) (result *FlowLogCollector, response *core.DetailedResponse, err error) {
	return vpc.GetFlowLogCollectorWithContext(context.Background(), getFlowLogCollectorOptions)
}

// GetFlowLogCollectorWithContext is an alternate form of the GetFlowLogCollector method which supports a Context parameter
func (vpc *VpcV1) GetFlowLogCollectorWithContext(ctx context.Context, getFlowLogCollectorOptions *GetFlowLogCollectorOptions) (result *FlowLogCollector, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(getFlowLogCollectorOptions, "getFlowLogCollectorOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(getFlowLogCollectorOptions, "getFlowLogCollectorOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *getFlowLogCollectorOptions.ID,
	}

	builder := core.NewRequestBuilder(core.GET)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/flow_log_collectors/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range getFlowLogCollectorOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "GetFlowLogCollector")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFlowLogCollector)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// UpdateFlowLogCollector : Update a flow log collector
// This request updates a flow log collector with the information in a provided flow log collector patch. The flow log
// collector patch object is structured in the same way as a retrieved flow log collector and contains only the
// information to be updated.
func (vpc *VpcV1) UpdateFlowLogCollector(updateFlowLogCollectorOptions *UpdateFlowLogCollectorOptions) (result *FlowLogCollector, response *core.DetailedResponse, err error) {
	return vpc.UpdateFlowLogCollectorWithContext(context.Background(), updateFlowLogCollectorOptions)
}

// UpdateFlowLogCollectorWithContext is an alternate form of the UpdateFlowLogCollector method which supports a Context parameter
func (vpc *VpcV1) UpdateFlowLogCollectorWithContext(ctx context.Context, updateFlowLogCollectorOptions *UpdateFlowLogCollectorOptions) (result *FlowLogCollector, response *core.DetailedResponse, err error) {
	err = core.ValidateNotNil(updateFlowLogCollectorOptions, "updateFlowLogCollectorOptions cannot be nil")
	if err != nil {
		return
	}
	err = core.ValidateStruct(updateFlowLogCollectorOptions, "updateFlowLogCollectorOptions")
	if err != nil {
		return
	}

	pathParamsMap := map[string]string{
		"id": *updateFlowLogCollectorOptions.ID,
	}

	builder := core.NewRequestBuilder(core.PATCH)
	builder = builder.WithContext(ctx)
	builder.EnableGzipCompression = vpc.GetEnableGzipCompression()
	_, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/flow_log_collectors/{id}`, pathParamsMap)
	if err != nil {
		return
	}

	for headerName, headerValue := range updateFlowLogCollectorOptions.Headers {
		builder.AddHeader(headerName, headerValue)
	}

	sdkHeaders := common.GetSdkHeaders("vpc", "V1", "UpdateFlowLogCollector")
	for headerName, headerValue := range sdkHeaders {
		builder.AddHeader(headerName, headerValue)
	}
	builder.AddHeader("Accept", "application/json")
	builder.AddHeader("Content-Type", "application/merge-patch+json")

	builder.AddQuery("version", fmt.Sprint(*vpc.Version))
	builder.AddQuery("generation", fmt.Sprint(*vpc.generation))

	_, err = builder.SetBodyContentJSON(updateFlowLogCollectorOptions.FlowLogCollectorPatch)
	if err != nil {
		return
	}

	request, err := builder.Build()
	if err != nil {
		return
	}

	var rawResponse map[string]json.RawMessage
	response, err = vpc.Service.Request(request, &rawResponse)
	if err != nil {
		return
	}
	if rawResponse != nil {
		err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalFlowLogCollector)
		if err != nil {
			return
		}
		response.Result = result
	}

	return
}

// AddEndpointGatewayIPOptions : The AddEndpointGatewayIP options.
type AddEndpointGatewayIPOptions struct {
	// The endpoint gateway identifier.
	EndpointGatewayID *string `validate:"required,ne="`

	// The reserved IP identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewAddEndpointGatewayIPOptions : Instantiate AddEndpointGatewayIPOptions
func (*VpcV1) NewAddEndpointGatewayIPOptions(endpointGatewayID string, id string) *AddEndpointGatewayIPOptions {
	return &AddEndpointGatewayIPOptions{
		EndpointGatewayID: core.StringPtr(endpointGatewayID),
		ID:                core.StringPtr(id),
	}
}

// SetEndpointGatewayID : Allow user to set EndpointGatewayID
func (options *AddEndpointGatewayIPOptions) SetEndpointGatewayID(endpointGatewayID string) *AddEndpointGatewayIPOptions {
	options.EndpointGatewayID = core.StringPtr(endpointGatewayID)
	return options
}

// SetID : Allow user to set ID
func (options *AddEndpointGatewayIPOptions) SetID(id string) *AddEndpointGatewayIPOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *AddEndpointGatewayIPOptions) SetHeaders(param map[string]string) *AddEndpointGatewayIPOptions {
	options.Headers = param
	return options
}

// AddInstanceNetworkInterfaceFloatingIPOptions : The AddInstanceNetworkInterfaceFloatingIP options.
type AddInstanceNetworkInterfaceFloatingIPOptions struct {
	// The instance identifier.
	InstanceID *string `validate:"required,ne="`

	// The network interface identifier.
	NetworkInterfaceID *string `validate:"required,ne="`

	// The floating IP identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewAddInstanceNetworkInterfaceFloatingIPOptions : Instantiate AddInstanceNetworkInterfaceFloatingIPOptions
func (*VpcV1) NewAddInstanceNetworkInterfaceFloatingIPOptions(instanceID string, networkInterfaceID string, id string) *AddInstanceNetworkInterfaceFloatingIPOptions {
	return &AddInstanceNetworkInterfaceFloatingIPOptions{
		InstanceID:         core.StringPtr(instanceID),
		NetworkInterfaceID: core.StringPtr(networkInterfaceID),
		ID:                 core.StringPtr(id),
	}
}

// SetInstanceID : Allow user to set InstanceID
func (options *AddInstanceNetworkInterfaceFloatingIPOptions) SetInstanceID(instanceID string) *AddInstanceNetworkInterfaceFloatingIPOptions {
	options.InstanceID = core.StringPtr(instanceID)
	return options
}

// SetNetworkInterfaceID : Allow user to set NetworkInterfaceID
func (options *AddInstanceNetworkInterfaceFloatingIPOptions) SetNetworkInterfaceID(networkInterfaceID string) *AddInstanceNetworkInterfaceFloatingIPOptions {
	options.NetworkInterfaceID = core.StringPtr(networkInterfaceID)
	return options
}

// SetID : Allow user to set ID
func (options *AddInstanceNetworkInterfaceFloatingIPOptions) SetID(id string) *AddInstanceNetworkInterfaceFloatingIPOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *AddInstanceNetworkInterfaceFloatingIPOptions) SetHeaders(param map[string]string) *AddInstanceNetworkInterfaceFloatingIPOptions {
	options.Headers = param
	return options
}

// AddSecurityGroupNetworkInterfaceOptions : The AddSecurityGroupNetworkInterface options.
type AddSecurityGroupNetworkInterfaceOptions struct {
	// The security group identifier.
	SecurityGroupID *string `validate:"required,ne="`

	// The network interface identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewAddSecurityGroupNetworkInterfaceOptions : Instantiate AddSecurityGroupNetworkInterfaceOptions
func (*VpcV1) NewAddSecurityGroupNetworkInterfaceOptions(securityGroupID string, id string) *AddSecurityGroupNetworkInterfaceOptions {
	return &AddSecurityGroupNetworkInterfaceOptions{
		SecurityGroupID: core.StringPtr(securityGroupID),
		ID:              core.StringPtr(id),
	}
}

// SetSecurityGroupID : Allow user to set SecurityGroupID
func (options *AddSecurityGroupNetworkInterfaceOptions) SetSecurityGroupID(securityGroupID string) *AddSecurityGroupNetworkInterfaceOptions {
	options.SecurityGroupID = core.StringPtr(securityGroupID)
	return options
}

// SetID : Allow user to set ID
func (options *AddSecurityGroupNetworkInterfaceOptions) SetID(id string) *AddSecurityGroupNetworkInterfaceOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *AddSecurityGroupNetworkInterfaceOptions) SetHeaders(param map[string]string) *AddSecurityGroupNetworkInterfaceOptions {
	options.Headers = param
	return options
}

// AddVPNGatewayConnectionLocalCIDROptions : The AddVPNGatewayConnectionLocalCIDR options.
type AddVPNGatewayConnectionLocalCIDROptions struct {
	// The VPN gateway identifier.
	VPNGatewayID *string `validate:"required,ne="`

	// The VPN gateway connection identifier.
	ID *string `validate:"required,ne="`

	// The address prefix part of the CIDR.
	CIDRPrefix *string `validate:"required,ne="`

	// The prefix length part of the CIDR.
	PrefixLength *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewAddVPNGatewayConnectionLocalCIDROptions : Instantiate AddVPNGatewayConnectionLocalCIDROptions
func (*VpcV1) NewAddVPNGatewayConnectionLocalCIDROptions(vpnGatewayID string, id string, cidrPrefix string, prefixLength string) *AddVPNGatewayConnectionLocalCIDROptions {
	return &AddVPNGatewayConnectionLocalCIDROptions{
		VPNGatewayID: core.StringPtr(vpnGatewayID),
		ID:           core.StringPtr(id),
		CIDRPrefix:   core.StringPtr(cidrPrefix),
		PrefixLength: core.StringPtr(prefixLength),
	}
}

// SetVPNGatewayID : Allow user to set VPNGatewayID
func (options *AddVPNGatewayConnectionLocalCIDROptions) SetVPNGatewayID(vpnGatewayID string) *AddVPNGatewayConnectionLocalCIDROptions {
	options.VPNGatewayID = core.StringPtr(vpnGatewayID)
	return options
}

// SetID : Allow user to set ID
func (options *AddVPNGatewayConnectionLocalCIDROptions) SetID(id string) *AddVPNGatewayConnectionLocalCIDROptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetCIDRPrefix : Allow user to set CIDRPrefix
func (options *AddVPNGatewayConnectionLocalCIDROptions) SetCIDRPrefix(cidrPrefix string) *AddVPNGatewayConnectionLocalCIDROptions {
	options.CIDRPrefix = core.StringPtr(cidrPrefix)
	return options
}

// SetPrefixLength : Allow user to set PrefixLength
func (options *AddVPNGatewayConnectionLocalCIDROptions) SetPrefixLength(prefixLength string) *AddVPNGatewayConnectionLocalCIDROptions {
	options.PrefixLength = core.StringPtr(prefixLength)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *AddVPNGatewayConnectionLocalCIDROptions) SetHeaders(param map[string]string) *AddVPNGatewayConnectionLocalCIDROptions {
	options.Headers = param
	return options
}

// AddVPNGatewayConnectionPeerCIDROptions : The AddVPNGatewayConnectionPeerCIDR options.
type AddVPNGatewayConnectionPeerCIDROptions struct {
	// The VPN gateway identifier.
	VPNGatewayID *string `validate:"required,ne="`

	// The VPN gateway connection identifier.
	ID *string `validate:"required,ne="`

	// The address prefix part of the CIDR.
	CIDRPrefix *string `validate:"required,ne="`

	// The prefix length part of the CIDR.
	PrefixLength *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewAddVPNGatewayConnectionPeerCIDROptions : Instantiate AddVPNGatewayConnectionPeerCIDROptions
func (*VpcV1) NewAddVPNGatewayConnectionPeerCIDROptions(vpnGatewayID string, id string, cidrPrefix string, prefixLength string) *AddVPNGatewayConnectionPeerCIDROptions {
	return &AddVPNGatewayConnectionPeerCIDROptions{
		VPNGatewayID: core.StringPtr(vpnGatewayID),
		ID:           core.StringPtr(id),
		CIDRPrefix:   core.StringPtr(cidrPrefix),
		PrefixLength: core.StringPtr(prefixLength),
	}
}

// SetVPNGatewayID : Allow user to set VPNGatewayID
func (options *AddVPNGatewayConnectionPeerCIDROptions) SetVPNGatewayID(vpnGatewayID string) *AddVPNGatewayConnectionPeerCIDROptions {
	options.VPNGatewayID = core.StringPtr(vpnGatewayID)
	return options
}

// SetID : Allow user to set ID
func (options *AddVPNGatewayConnectionPeerCIDROptions) SetID(id string) *AddVPNGatewayConnectionPeerCIDROptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetCIDRPrefix : Allow user to set CIDRPrefix
func (options *AddVPNGatewayConnectionPeerCIDROptions) SetCIDRPrefix(cidrPrefix string) *AddVPNGatewayConnectionPeerCIDROptions {
	options.CIDRPrefix = core.StringPtr(cidrPrefix)
	return options
}

// SetPrefixLength : Allow user to set PrefixLength
func (options *AddVPNGatewayConnectionPeerCIDROptions) SetPrefixLength(prefixLength string) *AddVPNGatewayConnectionPeerCIDROptions {
	options.PrefixLength = core.StringPtr(prefixLength)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *AddVPNGatewayConnectionPeerCIDROptions) SetHeaders(param map[string]string) *AddVPNGatewayConnectionPeerCIDROptions {
	options.Headers = param
	return options
}

// AddressPrefix : AddressPrefix struct
type AddressPrefix struct {
	// The CIDR block for this prefix.
	CIDR *string `json:"cidr" validate:"required"`

	// The date and time that the prefix was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// Indicates whether subnets exist with addresses from this prefix.
	HasSubnets *bool `json:"has_subnets" validate:"required"`

	// The URL for this address prefix.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this address prefix.
	ID *string `json:"id" validate:"required"`

	// Indicates whether this is the default prefix for this zone in this VPC. If a default prefix was automatically
	// created when the VPC was created, the prefix is automatically named using a hyphenated list of randomly-selected
	// words, but may be updated with a user-specified name.
	IsDefault *bool `json:"is_default" validate:"required"`

	// The user-defined name for this address prefix. Names must be unique within the VPC the address prefix resides in.
	Name *string `json:"name" validate:"required"`

	// The zone this address prefix resides in.
	Zone *ZoneReference `json:"zone" validate:"required"`
}

// UnmarshalAddressPrefix unmarshals an instance of AddressPrefix from the specified map of raw messages.
func UnmarshalAddressPrefix(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(AddressPrefix)
	err = core.UnmarshalPrimitive(m, "cidr", &obj.CIDR)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "has_subnets", &obj.HasSubnets)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "is_default", &obj.IsDefault)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneReference)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AddressPrefixCollection : AddressPrefixCollection struct
type AddressPrefixCollection struct {
	// Collection of address prefixes.
	AddressPrefixes []AddressPrefix `json:"address_prefixes" validate:"required"`

	// A link to the first page of resources.
	First *AddressPrefixCollectionFirst `json:"first" validate:"required"`

	// The maximum number of resources that can be returned by the request.
	Limit *int64 `json:"limit" validate:"required"`

	// A link to the next page of resources. This property is present for all pages
	// except the last page.
	Next *AddressPrefixCollectionNext `json:"next,omitempty"`

	// The total number of resources across all pages.
	TotalCount *int64 `json:"total_count" validate:"required"`
}

// UnmarshalAddressPrefixCollection unmarshals an instance of AddressPrefixCollection from the specified map of raw messages.
func UnmarshalAddressPrefixCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(AddressPrefixCollection)
	err = core.UnmarshalModel(m, "address_prefixes", &obj.AddressPrefixes, UnmarshalAddressPrefix)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalAddressPrefixCollectionFirst)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalAddressPrefixCollectionNext)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AddressPrefixCollectionFirst : A link to the first page of resources.
type AddressPrefixCollectionFirst struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalAddressPrefixCollectionFirst unmarshals an instance of AddressPrefixCollectionFirst from the specified map of raw messages.
func UnmarshalAddressPrefixCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(AddressPrefixCollectionFirst)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AddressPrefixCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
type AddressPrefixCollectionNext struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalAddressPrefixCollectionNext unmarshals an instance of AddressPrefixCollectionNext from the specified map of raw messages.
func UnmarshalAddressPrefixCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(AddressPrefixCollectionNext)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AddressPrefixPatch : AddressPrefixPatch struct
type AddressPrefixPatch struct {
	// Indicates whether this is the default prefix for this zone in this VPC. Updating to true makes this prefix the
	// default prefix for this zone in this VPC, provided the VPC currently has no default address prefix for this zone.
	// Updating to false removes the default prefix for this zone in this VPC.
	IsDefault *bool `json:"is_default,omitempty"`

	// The user-defined name for this address prefix. Names must be unique within the VPC the address prefix resides in.
	Name *string `json:"name,omitempty"`
}

// UnmarshalAddressPrefixPatch unmarshals an instance of AddressPrefixPatch from the specified map of raw messages.
func UnmarshalAddressPrefixPatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(AddressPrefixPatch)
	err = core.UnmarshalPrimitive(m, "is_default", &obj.IsDefault)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the AddressPrefixPatch
func (addressPrefixPatch *AddressPrefixPatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(addressPrefixPatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// CertificateInstanceIdentity : Identifies a certificate instance by a unique property.
// Models which "extend" this model:
// - CertificateInstanceIdentityByCRN
type CertificateInstanceIdentity struct {
	// The CRN for this certificate instance.
	CRN *string `json:"crn,omitempty"`
}

func (*CertificateInstanceIdentity) isaCertificateInstanceIdentity() bool {
	return true
}

type CertificateInstanceIdentityIntf interface {
	isaCertificateInstanceIdentity() bool
}

// UnmarshalCertificateInstanceIdentity unmarshals an instance of CertificateInstanceIdentity from the specified map of raw messages.
func UnmarshalCertificateInstanceIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(CertificateInstanceIdentity)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// CertificateInstanceReference : CertificateInstanceReference struct
type CertificateInstanceReference struct {
	// The CRN for this certificate instance.
	CRN *string `json:"crn" validate:"required"`
}

// UnmarshalCertificateInstanceReference unmarshals an instance of CertificateInstanceReference from the specified map of raw messages.
func UnmarshalCertificateInstanceReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(CertificateInstanceReference)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// CheckVPNGatewayConnectionLocalCIDROptions : The CheckVPNGatewayConnectionLocalCIDR options.
type CheckVPNGatewayConnectionLocalCIDROptions struct {
	// The VPN gateway identifier.
	VPNGatewayID *string `validate:"required,ne="`

	// The VPN gateway connection identifier.
	ID *string `validate:"required,ne="`

	// The address prefix part of the CIDR.
	CIDRPrefix *string `validate:"required,ne="`

	// The prefix length part of the CIDR.
	PrefixLength *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewCheckVPNGatewayConnectionLocalCIDROptions : Instantiate CheckVPNGatewayConnectionLocalCIDROptions
func (*VpcV1) NewCheckVPNGatewayConnectionLocalCIDROptions(vpnGatewayID string, id string, cidrPrefix string, prefixLength string) *CheckVPNGatewayConnectionLocalCIDROptions {
	return &CheckVPNGatewayConnectionLocalCIDROptions{
		VPNGatewayID: core.StringPtr(vpnGatewayID),
		ID:           core.StringPtr(id),
		CIDRPrefix:   core.StringPtr(cidrPrefix),
		PrefixLength: core.StringPtr(prefixLength),
	}
}

// SetVPNGatewayID : Allow user to set VPNGatewayID
func (options *CheckVPNGatewayConnectionLocalCIDROptions) SetVPNGatewayID(vpnGatewayID string) *CheckVPNGatewayConnectionLocalCIDROptions {
	options.VPNGatewayID = core.StringPtr(vpnGatewayID)
	return options
}

// SetID : Allow user to set ID
func (options *CheckVPNGatewayConnectionLocalCIDROptions) SetID(id string) *CheckVPNGatewayConnectionLocalCIDROptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetCIDRPrefix : Allow user to set CIDRPrefix
func (options *CheckVPNGatewayConnectionLocalCIDROptions) SetCIDRPrefix(cidrPrefix string) *CheckVPNGatewayConnectionLocalCIDROptions {
	options.CIDRPrefix = core.StringPtr(cidrPrefix)
	return options
}

// SetPrefixLength : Allow user to set PrefixLength
func (options *CheckVPNGatewayConnectionLocalCIDROptions) SetPrefixLength(prefixLength string) *CheckVPNGatewayConnectionLocalCIDROptions {
	options.PrefixLength = core.StringPtr(prefixLength)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CheckVPNGatewayConnectionLocalCIDROptions) SetHeaders(param map[string]string) *CheckVPNGatewayConnectionLocalCIDROptions {
	options.Headers = param
	return options
}

// CheckVPNGatewayConnectionPeerCIDROptions : The CheckVPNGatewayConnectionPeerCIDR options.
type CheckVPNGatewayConnectionPeerCIDROptions struct {
	// The VPN gateway identifier.
	VPNGatewayID *string `validate:"required,ne="`

	// The VPN gateway connection identifier.
	ID *string `validate:"required,ne="`

	// The address prefix part of the CIDR.
	CIDRPrefix *string `validate:"required,ne="`

	// The prefix length part of the CIDR.
	PrefixLength *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewCheckVPNGatewayConnectionPeerCIDROptions : Instantiate CheckVPNGatewayConnectionPeerCIDROptions
func (*VpcV1) NewCheckVPNGatewayConnectionPeerCIDROptions(vpnGatewayID string, id string, cidrPrefix string, prefixLength string) *CheckVPNGatewayConnectionPeerCIDROptions {
	return &CheckVPNGatewayConnectionPeerCIDROptions{
		VPNGatewayID: core.StringPtr(vpnGatewayID),
		ID:           core.StringPtr(id),
		CIDRPrefix:   core.StringPtr(cidrPrefix),
		PrefixLength: core.StringPtr(prefixLength),
	}
}

// SetVPNGatewayID : Allow user to set VPNGatewayID
func (options *CheckVPNGatewayConnectionPeerCIDROptions) SetVPNGatewayID(vpnGatewayID string) *CheckVPNGatewayConnectionPeerCIDROptions {
	options.VPNGatewayID = core.StringPtr(vpnGatewayID)
	return options
}

// SetID : Allow user to set ID
func (options *CheckVPNGatewayConnectionPeerCIDROptions) SetID(id string) *CheckVPNGatewayConnectionPeerCIDROptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetCIDRPrefix : Allow user to set CIDRPrefix
func (options *CheckVPNGatewayConnectionPeerCIDROptions) SetCIDRPrefix(cidrPrefix string) *CheckVPNGatewayConnectionPeerCIDROptions {
	options.CIDRPrefix = core.StringPtr(cidrPrefix)
	return options
}

// SetPrefixLength : Allow user to set PrefixLength
func (options *CheckVPNGatewayConnectionPeerCIDROptions) SetPrefixLength(prefixLength string) *CheckVPNGatewayConnectionPeerCIDROptions {
	options.PrefixLength = core.StringPtr(prefixLength)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CheckVPNGatewayConnectionPeerCIDROptions) SetHeaders(param map[string]string) *CheckVPNGatewayConnectionPeerCIDROptions {
	options.Headers = param
	return options
}

// CloudObjectStorageBucketIdentity : Identifies a Cloud Object Storage bucket by a unique property.
// Models which "extend" this model:
// - CloudObjectStorageBucketIdentityByName
type CloudObjectStorageBucketIdentity struct {
	// The globally unique name of this COS bucket.
	Name *string `json:"name,omitempty"`
}

func (*CloudObjectStorageBucketIdentity) isaCloudObjectStorageBucketIdentity() bool {
	return true
}

type CloudObjectStorageBucketIdentityIntf interface {
	isaCloudObjectStorageBucketIdentity() bool
}

// UnmarshalCloudObjectStorageBucketIdentity unmarshals an instance of CloudObjectStorageBucketIdentity from the specified map of raw messages.
func UnmarshalCloudObjectStorageBucketIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(CloudObjectStorageBucketIdentity)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// CloudObjectStorageBucketReference : CloudObjectStorageBucketReference struct
type CloudObjectStorageBucketReference struct {
	// The globally unique name of this COS bucket.
	Name *string `json:"name" validate:"required"`
}

// UnmarshalCloudObjectStorageBucketReference unmarshals an instance of CloudObjectStorageBucketReference from the specified map of raw messages.
func UnmarshalCloudObjectStorageBucketReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(CloudObjectStorageBucketReference)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// CreateDedicatedHostGroupOptions : The CreateDedicatedHostGroup options.
type CreateDedicatedHostGroupOptions struct {
	// The dedicated host profile class for hosts in this group.
	Class *string

	// The dedicated host profile family for hosts in this group.
	Family *string

	// The unique user-defined name for this dedicated host group. If unspecified, the name will be a hyphenated list of
	// randomly-selected words.
	Name *string

	// The resource group to use. If unspecified, the account's [default resource
	// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
	ResourceGroup ResourceGroupIdentityIntf

	// The zone this dedicated host group will reside in.
	Zone ZoneIdentityIntf

	// Allows users to set headers on API requests
	Headers map[string]string
}

// Constants associated with the CreateDedicatedHostGroupOptions.Family property.
// The dedicated host profile family for hosts in this group.
const (
	CreateDedicatedHostGroupOptionsFamilyBalancedConst = "balanced"
	CreateDedicatedHostGroupOptionsFamilyComputeConst  = "compute"
	CreateDedicatedHostGroupOptionsFamilyMemoryConst   = "memory"
)

// NewCreateDedicatedHostGroupOptions : Instantiate CreateDedicatedHostGroupOptions
func (*VpcV1) NewCreateDedicatedHostGroupOptions() *CreateDedicatedHostGroupOptions {
	return &CreateDedicatedHostGroupOptions{}
}

// SetClass : Allow user to set Class
func (options *CreateDedicatedHostGroupOptions) SetClass(class string) *CreateDedicatedHostGroupOptions {
	options.Class = core.StringPtr(class)
	return options
}

// SetFamily : Allow user to set Family
func (options *CreateDedicatedHostGroupOptions) SetFamily(family string) *CreateDedicatedHostGroupOptions {
	options.Family = core.StringPtr(family)
	return options
}

// SetName : Allow user to set Name
func (options *CreateDedicatedHostGroupOptions) SetName(name string) *CreateDedicatedHostGroupOptions {
	options.Name = core.StringPtr(name)
	return options
}

// SetResourceGroup : Allow user to set ResourceGroup
func (options *CreateDedicatedHostGroupOptions) SetResourceGroup(resourceGroup ResourceGroupIdentityIntf) *CreateDedicatedHostGroupOptions {
	options.ResourceGroup = resourceGroup
	return options
}

// SetZone : Allow user to set Zone
func (options *CreateDedicatedHostGroupOptions) SetZone(zone ZoneIdentityIntf) *CreateDedicatedHostGroupOptions {
	options.Zone = zone
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateDedicatedHostGroupOptions) SetHeaders(param map[string]string) *CreateDedicatedHostGroupOptions {
	options.Headers = param
	return options
}

// CreateDedicatedHostOptions : The CreateDedicatedHost options.
type CreateDedicatedHostOptions struct {
	// The dedicated host prototype object.
	DedicatedHostPrototype DedicatedHostPrototypeIntf `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewCreateDedicatedHostOptions : Instantiate CreateDedicatedHostOptions
func (*VpcV1) NewCreateDedicatedHostOptions(dedicatedHostPrototype DedicatedHostPrototypeIntf) *CreateDedicatedHostOptions {
	return &CreateDedicatedHostOptions{
		DedicatedHostPrototype: dedicatedHostPrototype,
	}
}

// SetDedicatedHostPrototype : Allow user to set DedicatedHostPrototype
func (options *CreateDedicatedHostOptions) SetDedicatedHostPrototype(dedicatedHostPrototype DedicatedHostPrototypeIntf) *CreateDedicatedHostOptions {
	options.DedicatedHostPrototype = dedicatedHostPrototype
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateDedicatedHostOptions) SetHeaders(param map[string]string) *CreateDedicatedHostOptions {
	options.Headers = param
	return options
}

// CreateEndpointGatewayOptions : The CreateEndpointGateway options.
type CreateEndpointGatewayOptions struct {
	// The target for this endpoint gateway.
	Target EndpointGatewayTargetPrototypeIntf `validate:"required"`

	// The VPC this endpoint gateway will serve.
	VPC VPCIdentityIntf `validate:"required"`

	// An array of reserved IPs to bind to this endpoint gateway. At most one reserved IP per zone is allowed.
	Ips []EndpointGatewayReservedIPIntf

	// The user-defined name for this endpoint gateway. If unspecified, the name will be a hyphenated list of
	// randomly-selected words. Names must be unique within the VPC this endpoint gateway is serving.
	Name *string

	// The resource group to use. If unspecified, the account's [default resource
	// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
	ResourceGroup ResourceGroupIdentityIntf

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewCreateEndpointGatewayOptions : Instantiate CreateEndpointGatewayOptions
func (*VpcV1) NewCreateEndpointGatewayOptions(target EndpointGatewayTargetPrototypeIntf, vpc VPCIdentityIntf) *CreateEndpointGatewayOptions {
	return &CreateEndpointGatewayOptions{
		Target: target,
		VPC:    vpc,
	}
}

// SetTarget : Allow user to set Target
func (options *CreateEndpointGatewayOptions) SetTarget(target EndpointGatewayTargetPrototypeIntf) *CreateEndpointGatewayOptions {
	options.Target = target
	return options
}

// SetVPC : Allow user to set VPC
func (options *CreateEndpointGatewayOptions) SetVPC(vpc VPCIdentityIntf) *CreateEndpointGatewayOptions {
	options.VPC = vpc
	return options
}

// SetIps : Allow user to set Ips
func (options *CreateEndpointGatewayOptions) SetIps(ips []EndpointGatewayReservedIPIntf) *CreateEndpointGatewayOptions {
	options.Ips = ips
	return options
}

// SetName : Allow user to set Name
func (options *CreateEndpointGatewayOptions) SetName(name string) *CreateEndpointGatewayOptions {
	options.Name = core.StringPtr(name)
	return options
}

// SetResourceGroup : Allow user to set ResourceGroup
func (options *CreateEndpointGatewayOptions) SetResourceGroup(resourceGroup ResourceGroupIdentityIntf) *CreateEndpointGatewayOptions {
	options.ResourceGroup = resourceGroup
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateEndpointGatewayOptions) SetHeaders(param map[string]string) *CreateEndpointGatewayOptions {
	options.Headers = param
	return options
}

// CreateFloatingIPOptions : The CreateFloatingIP options.
type CreateFloatingIPOptions struct {
	// The floating IP prototype object.
	FloatingIPPrototype FloatingIPPrototypeIntf `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewCreateFloatingIPOptions : Instantiate CreateFloatingIPOptions
func (*VpcV1) NewCreateFloatingIPOptions(floatingIPPrototype FloatingIPPrototypeIntf) *CreateFloatingIPOptions {
	return &CreateFloatingIPOptions{
		FloatingIPPrototype: floatingIPPrototype,
	}
}

// SetFloatingIPPrototype : Allow user to set FloatingIPPrototype
func (options *CreateFloatingIPOptions) SetFloatingIPPrototype(floatingIPPrototype FloatingIPPrototypeIntf) *CreateFloatingIPOptions {
	options.FloatingIPPrototype = floatingIPPrototype
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateFloatingIPOptions) SetHeaders(param map[string]string) *CreateFloatingIPOptions {
	options.Headers = param
	return options
}

// CreateFlowLogCollectorOptions : The CreateFlowLogCollector options.
type CreateFlowLogCollectorOptions struct {
	// The Cloud Object Storage bucket where the collected flows will be logged.
	// The bucket must exist and an IAM service authorization must grant
	// `IBM Cloud Flow Logs` resources of `VPC Infrastructure Services` writer
	// access to the bucket.
	StorageBucket CloudObjectStorageBucketIdentityIntf `validate:"required"`

	// The target this collector will collect flow logs for. If the target is an instance,
	// subnet, or VPC, flow logs will not be collected for any network interfaces within the
	// target that are themselves the target of a more specific flow log collector.
	Target FlowLogCollectorTargetPrototypeIntf `validate:"required"`

	// Indicates whether this collector will be active upon creation.
	Active *bool

	// The unique user-defined name for this flow log collector. If unspecified, the name will be a hyphenated list of
	// randomly-selected words.
	Name *string

	// The resource group to use. If unspecified, the account's [default resource
	// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
	ResourceGroup ResourceGroupIdentityIntf

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewCreateFlowLogCollectorOptions : Instantiate CreateFlowLogCollectorOptions
func (*VpcV1) NewCreateFlowLogCollectorOptions(storageBucket CloudObjectStorageBucketIdentityIntf, target FlowLogCollectorTargetPrototypeIntf) *CreateFlowLogCollectorOptions {
	return &CreateFlowLogCollectorOptions{
		StorageBucket: storageBucket,
		Target:        target,
	}
}

// SetStorageBucket : Allow user to set StorageBucket
func (options *CreateFlowLogCollectorOptions) SetStorageBucket(storageBucket CloudObjectStorageBucketIdentityIntf) *CreateFlowLogCollectorOptions {
	options.StorageBucket = storageBucket
	return options
}

// SetTarget : Allow user to set Target
func (options *CreateFlowLogCollectorOptions) SetTarget(target FlowLogCollectorTargetPrototypeIntf) *CreateFlowLogCollectorOptions {
	options.Target = target
	return options
}

// SetActive : Allow user to set Active
func (options *CreateFlowLogCollectorOptions) SetActive(active bool) *CreateFlowLogCollectorOptions {
	options.Active = core.BoolPtr(active)
	return options
}

// SetName : Allow user to set Name
func (options *CreateFlowLogCollectorOptions) SetName(name string) *CreateFlowLogCollectorOptions {
	options.Name = core.StringPtr(name)
	return options
}

// SetResourceGroup : Allow user to set ResourceGroup
func (options *CreateFlowLogCollectorOptions) SetResourceGroup(resourceGroup ResourceGroupIdentityIntf) *CreateFlowLogCollectorOptions {
	options.ResourceGroup = resourceGroup
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateFlowLogCollectorOptions) SetHeaders(param map[string]string) *CreateFlowLogCollectorOptions {
	options.Headers = param
	return options
}

// CreateIkePolicyOptions : The CreateIkePolicy options.
type CreateIkePolicyOptions struct {
	// The authentication algorithm.
	AuthenticationAlgorithm *string `validate:"required"`

	// The Diffie-Hellman group.
	DhGroup *int64 `validate:"required"`

	// The encryption algorithm.
	EncryptionAlgorithm *string `validate:"required"`

	// The IKE protocol version.
	IkeVersion *int64 `validate:"required"`

	// The key lifetime in seconds.
	KeyLifetime *int64

	// The user-defined name for this IKE policy.
	Name *string

	// The resource group to use. If unspecified, the account's [default resource
	// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
	ResourceGroup ResourceGroupIdentityIntf

	// Allows users to set headers on API requests
	Headers map[string]string
}

// Constants associated with the CreateIkePolicyOptions.AuthenticationAlgorithm property.
// The authentication algorithm.
const (
	CreateIkePolicyOptionsAuthenticationAlgorithmMd5Const    = "md5"
	CreateIkePolicyOptionsAuthenticationAlgorithmSha1Const   = "sha1"
	CreateIkePolicyOptionsAuthenticationAlgorithmSha256Const = "sha256"
	CreateIkePolicyOptionsAuthenticationAlgorithmSha512Const = "sha512"
)

// Constants associated with the CreateIkePolicyOptions.EncryptionAlgorithm property.
// The encryption algorithm.
const (
	CreateIkePolicyOptionsEncryptionAlgorithmAes128Const    = "aes128"
	CreateIkePolicyOptionsEncryptionAlgorithmAes256Const    = "aes256"
	CreateIkePolicyOptionsEncryptionAlgorithmTripleDesConst = "triple_des"
)

// NewCreateIkePolicyOptions : Instantiate CreateIkePolicyOptions
func (*VpcV1) NewCreateIkePolicyOptions(authenticationAlgorithm string, dhGroup int64, encryptionAlgorithm string, ikeVersion int64) *CreateIkePolicyOptions {
	return &CreateIkePolicyOptions{
		AuthenticationAlgorithm: core.StringPtr(authenticationAlgorithm),
		DhGroup:                 core.Int64Ptr(dhGroup),
		EncryptionAlgorithm:     core.StringPtr(encryptionAlgorithm),
		IkeVersion:              core.Int64Ptr(ikeVersion),
	}
}

// SetAuthenticationAlgorithm : Allow user to set AuthenticationAlgorithm
func (options *CreateIkePolicyOptions) SetAuthenticationAlgorithm(authenticationAlgorithm string) *CreateIkePolicyOptions {
	options.AuthenticationAlgorithm = core.StringPtr(authenticationAlgorithm)
	return options
}

// SetDhGroup : Allow user to set DhGroup
func (options *CreateIkePolicyOptions) SetDhGroup(dhGroup int64) *CreateIkePolicyOptions {
	options.DhGroup = core.Int64Ptr(dhGroup)
	return options
}

// SetEncryptionAlgorithm : Allow user to set EncryptionAlgorithm
func (options *CreateIkePolicyOptions) SetEncryptionAlgorithm(encryptionAlgorithm string) *CreateIkePolicyOptions {
	options.EncryptionAlgorithm = core.StringPtr(encryptionAlgorithm)
	return options
}

// SetIkeVersion : Allow user to set IkeVersion
func (options *CreateIkePolicyOptions) SetIkeVersion(ikeVersion int64) *CreateIkePolicyOptions {
	options.IkeVersion = core.Int64Ptr(ikeVersion)
	return options
}

// SetKeyLifetime : Allow user to set KeyLifetime
func (options *CreateIkePolicyOptions) SetKeyLifetime(keyLifetime int64) *CreateIkePolicyOptions {
	options.KeyLifetime = core.Int64Ptr(keyLifetime)
	return options
}

// SetName : Allow user to set Name
func (options *CreateIkePolicyOptions) SetName(name string) *CreateIkePolicyOptions {
	options.Name = core.StringPtr(name)
	return options
}

// SetResourceGroup : Allow user to set ResourceGroup
func (options *CreateIkePolicyOptions) SetResourceGroup(resourceGroup ResourceGroupIdentityIntf) *CreateIkePolicyOptions {
	options.ResourceGroup = resourceGroup
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateIkePolicyOptions) SetHeaders(param map[string]string) *CreateIkePolicyOptions {
	options.Headers = param
	return options
}

// CreateImageOptions : The CreateImage options.
type CreateImageOptions struct {
	// The image prototype object.
	ImagePrototype ImagePrototypeIntf `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewCreateImageOptions : Instantiate CreateImageOptions
func (*VpcV1) NewCreateImageOptions(imagePrototype ImagePrototypeIntf) *CreateImageOptions {
	return &CreateImageOptions{
		ImagePrototype: imagePrototype,
	}
}

// SetImagePrototype : Allow user to set ImagePrototype
func (options *CreateImageOptions) SetImagePrototype(imagePrototype ImagePrototypeIntf) *CreateImageOptions {
	options.ImagePrototype = imagePrototype
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateImageOptions) SetHeaders(param map[string]string) *CreateImageOptions {
	options.Headers = param
	return options
}

// CreateInstanceActionOptions : The CreateInstanceAction options.
type CreateInstanceActionOptions struct {
	// The instance identifier.
	InstanceID *string `validate:"required,ne="`

	// The type of action.
	Type *string `validate:"required"`

	// If set to true, the action will be forced immediately, and all queued actions deleted. Ignored for the start action.
	Force *bool

	// Allows users to set headers on API requests
	Headers map[string]string
}

// Constants associated with the CreateInstanceActionOptions.Type property.
// The type of action.
const (
	CreateInstanceActionOptionsTypeRebootConst = "reboot"
	CreateInstanceActionOptionsTypeStartConst  = "start"
	CreateInstanceActionOptionsTypeStopConst   = "stop"
)

// NewCreateInstanceActionOptions : Instantiate CreateInstanceActionOptions
func (*VpcV1) NewCreateInstanceActionOptions(instanceID string, typeVar string) *CreateInstanceActionOptions {
	return &CreateInstanceActionOptions{
		InstanceID: core.StringPtr(instanceID),
		Type:       core.StringPtr(typeVar),
	}
}

// SetInstanceID : Allow user to set InstanceID
func (options *CreateInstanceActionOptions) SetInstanceID(instanceID string) *CreateInstanceActionOptions {
	options.InstanceID = core.StringPtr(instanceID)
	return options
}

// SetType : Allow user to set Type
func (options *CreateInstanceActionOptions) SetType(typeVar string) *CreateInstanceActionOptions {
	options.Type = core.StringPtr(typeVar)
	return options
}

// SetForce : Allow user to set Force
func (options *CreateInstanceActionOptions) SetForce(force bool) *CreateInstanceActionOptions {
	options.Force = core.BoolPtr(force)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateInstanceActionOptions) SetHeaders(param map[string]string) *CreateInstanceActionOptions {
	options.Headers = param
	return options
}

// CreateInstanceConsoleAccessTokenOptions : The CreateInstanceConsoleAccessToken options.
type CreateInstanceConsoleAccessTokenOptions struct {
	// The instance identifier.
	InstanceID *string `validate:"required,ne="`

	// The instance console type for which this token may be used.
	ConsoleType *string `validate:"required"`

	// Indicates whether to disconnect an existing serial console session as the serial console cannot be shared.  This has
	// no effect on VNC consoles.
	Force *bool

	// Allows users to set headers on API requests
	Headers map[string]string
}

// Constants associated with the CreateInstanceConsoleAccessTokenOptions.ConsoleType property.
// The instance console type for which this token may be used.
const (
	CreateInstanceConsoleAccessTokenOptionsConsoleTypeSerialConst = "serial"
	CreateInstanceConsoleAccessTokenOptionsConsoleTypeVncConst    = "vnc"
)

// NewCreateInstanceConsoleAccessTokenOptions : Instantiate CreateInstanceConsoleAccessTokenOptions
func (*VpcV1) NewCreateInstanceConsoleAccessTokenOptions(instanceID string, consoleType string) *CreateInstanceConsoleAccessTokenOptions {
	return &CreateInstanceConsoleAccessTokenOptions{
		InstanceID:  core.StringPtr(instanceID),
		ConsoleType: core.StringPtr(consoleType),
	}
}

// SetInstanceID : Allow user to set InstanceID
func (options *CreateInstanceConsoleAccessTokenOptions) SetInstanceID(instanceID string) *CreateInstanceConsoleAccessTokenOptions {
	options.InstanceID = core.StringPtr(instanceID)
	return options
}

// SetConsoleType : Allow user to set ConsoleType
func (options *CreateInstanceConsoleAccessTokenOptions) SetConsoleType(consoleType string) *CreateInstanceConsoleAccessTokenOptions {
	options.ConsoleType = core.StringPtr(consoleType)
	return options
}

// SetForce : Allow user to set Force
func (options *CreateInstanceConsoleAccessTokenOptions) SetForce(force bool) *CreateInstanceConsoleAccessTokenOptions {
	options.Force = core.BoolPtr(force)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateInstanceConsoleAccessTokenOptions) SetHeaders(param map[string]string) *CreateInstanceConsoleAccessTokenOptions {
	options.Headers = param
	return options
}

// CreateInstanceGroupManagerActionOptions : The CreateInstanceGroupManagerAction options.
type CreateInstanceGroupManagerActionOptions struct {
	// The instance group identifier.
	InstanceGroupID *string `validate:"required,ne="`

	// The instance group manager identifier.
	InstanceGroupManagerID *string `validate:"required,ne="`

	// The instance group manager action prototype object.
	InstanceGroupManagerActionPrototype InstanceGroupManagerActionPrototypeIntf `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewCreateInstanceGroupManagerActionOptions : Instantiate CreateInstanceGroupManagerActionOptions
func (*VpcV1) NewCreateInstanceGroupManagerActionOptions(instanceGroupID string, instanceGroupManagerID string, instanceGroupManagerActionPrototype InstanceGroupManagerActionPrototypeIntf) *CreateInstanceGroupManagerActionOptions {
	return &CreateInstanceGroupManagerActionOptions{
		InstanceGroupID:                     core.StringPtr(instanceGroupID),
		InstanceGroupManagerID:              core.StringPtr(instanceGroupManagerID),
		InstanceGroupManagerActionPrototype: instanceGroupManagerActionPrototype,
	}
}

// SetInstanceGroupID : Allow user to set InstanceGroupID
func (options *CreateInstanceGroupManagerActionOptions) SetInstanceGroupID(instanceGroupID string) *CreateInstanceGroupManagerActionOptions {
	options.InstanceGroupID = core.StringPtr(instanceGroupID)
	return options
}

// SetInstanceGroupManagerID : Allow user to set InstanceGroupManagerID
func (options *CreateInstanceGroupManagerActionOptions) SetInstanceGroupManagerID(instanceGroupManagerID string) *CreateInstanceGroupManagerActionOptions {
	options.InstanceGroupManagerID = core.StringPtr(instanceGroupManagerID)
	return options
}

// SetInstanceGroupManagerActionPrototype : Allow user to set InstanceGroupManagerActionPrototype
func (options *CreateInstanceGroupManagerActionOptions) SetInstanceGroupManagerActionPrototype(instanceGroupManagerActionPrototype InstanceGroupManagerActionPrototypeIntf) *CreateInstanceGroupManagerActionOptions {
	options.InstanceGroupManagerActionPrototype = instanceGroupManagerActionPrototype
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateInstanceGroupManagerActionOptions) SetHeaders(param map[string]string) *CreateInstanceGroupManagerActionOptions {
	options.Headers = param
	return options
}

// CreateInstanceGroupManagerOptions : The CreateInstanceGroupManager options.
type CreateInstanceGroupManagerOptions struct {
	// The instance group identifier.
	InstanceGroupID *string `validate:"required,ne="`

	// The instance group manager prototype object.
	InstanceGroupManagerPrototype InstanceGroupManagerPrototypeIntf `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewCreateInstanceGroupManagerOptions : Instantiate CreateInstanceGroupManagerOptions
func (*VpcV1) NewCreateInstanceGroupManagerOptions(instanceGroupID string, instanceGroupManagerPrototype InstanceGroupManagerPrototypeIntf) *CreateInstanceGroupManagerOptions {
	return &CreateInstanceGroupManagerOptions{
		InstanceGroupID:               core.StringPtr(instanceGroupID),
		InstanceGroupManagerPrototype: instanceGroupManagerPrototype,
	}
}

// SetInstanceGroupID : Allow user to set InstanceGroupID
func (options *CreateInstanceGroupManagerOptions) SetInstanceGroupID(instanceGroupID string) *CreateInstanceGroupManagerOptions {
	options.InstanceGroupID = core.StringPtr(instanceGroupID)
	return options
}

// SetInstanceGroupManagerPrototype : Allow user to set InstanceGroupManagerPrototype
func (options *CreateInstanceGroupManagerOptions) SetInstanceGroupManagerPrototype(instanceGroupManagerPrototype InstanceGroupManagerPrototypeIntf) *CreateInstanceGroupManagerOptions {
	options.InstanceGroupManagerPrototype = instanceGroupManagerPrototype
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateInstanceGroupManagerOptions) SetHeaders(param map[string]string) *CreateInstanceGroupManagerOptions {
	options.Headers = param
	return options
}

// CreateInstanceGroupManagerPolicyOptions : The CreateInstanceGroupManagerPolicy options.
type CreateInstanceGroupManagerPolicyOptions struct {
	// The instance group identifier.
	InstanceGroupID *string `validate:"required,ne="`

	// The instance group manager identifier.
	InstanceGroupManagerID *string `validate:"required,ne="`

	// The instance group manager policy prototype object.
	InstanceGroupManagerPolicyPrototype InstanceGroupManagerPolicyPrototypeIntf `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewCreateInstanceGroupManagerPolicyOptions : Instantiate CreateInstanceGroupManagerPolicyOptions
func (*VpcV1) NewCreateInstanceGroupManagerPolicyOptions(instanceGroupID string, instanceGroupManagerID string, instanceGroupManagerPolicyPrototype InstanceGroupManagerPolicyPrototypeIntf) *CreateInstanceGroupManagerPolicyOptions {
	return &CreateInstanceGroupManagerPolicyOptions{
		InstanceGroupID:                     core.StringPtr(instanceGroupID),
		InstanceGroupManagerID:              core.StringPtr(instanceGroupManagerID),
		InstanceGroupManagerPolicyPrototype: instanceGroupManagerPolicyPrototype,
	}
}

// SetInstanceGroupID : Allow user to set InstanceGroupID
func (options *CreateInstanceGroupManagerPolicyOptions) SetInstanceGroupID(instanceGroupID string) *CreateInstanceGroupManagerPolicyOptions {
	options.InstanceGroupID = core.StringPtr(instanceGroupID)
	return options
}

// SetInstanceGroupManagerID : Allow user to set InstanceGroupManagerID
func (options *CreateInstanceGroupManagerPolicyOptions) SetInstanceGroupManagerID(instanceGroupManagerID string) *CreateInstanceGroupManagerPolicyOptions {
	options.InstanceGroupManagerID = core.StringPtr(instanceGroupManagerID)
	return options
}

// SetInstanceGroupManagerPolicyPrototype : Allow user to set InstanceGroupManagerPolicyPrototype
func (options *CreateInstanceGroupManagerPolicyOptions) SetInstanceGroupManagerPolicyPrototype(instanceGroupManagerPolicyPrototype InstanceGroupManagerPolicyPrototypeIntf) *CreateInstanceGroupManagerPolicyOptions {
	options.InstanceGroupManagerPolicyPrototype = instanceGroupManagerPolicyPrototype
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateInstanceGroupManagerPolicyOptions) SetHeaders(param map[string]string) *CreateInstanceGroupManagerPolicyOptions {
	options.Headers = param
	return options
}

// CreateInstanceGroupOptions : The CreateInstanceGroup options.
type CreateInstanceGroupOptions struct {
	// Instance template to use when creating new instances.
	InstanceTemplate InstanceTemplateIdentityIntf `validate:"required"`

	// Array of identities to subnets to use when creating new instances.
	Subnets []SubnetIdentityIntf `validate:"required"`

	// Required if specifying a load balancer pool only. Used by the instance group when scaling up instances to supply the
	// port for the load balancer pool member.
	ApplicationPort *int64

	// The load balancer that the load balancer pool used by this group
	// is in. Must be supplied when using a load balancer pool.
	LoadBalancer LoadBalancerIdentityIntf

	// When specified, the load balancer pool will be managed by this
	// group. Instances created by this group will have a new load
	// balancer pool member in that pool created. Must be used with
	// `application_port`.
	LoadBalancerPool LoadBalancerPoolIdentityIntf

	// The number of instances in the instance group.
	MembershipCount *int64

	// The user-defined name for this instance group.
	Name *string

	// The resource group to use. If unspecified, the account's [default resource
	// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
	ResourceGroup ResourceGroupIdentityIntf

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewCreateInstanceGroupOptions : Instantiate CreateInstanceGroupOptions
func (*VpcV1) NewCreateInstanceGroupOptions(instanceTemplate InstanceTemplateIdentityIntf, subnets []SubnetIdentityIntf) *CreateInstanceGroupOptions {
	return &CreateInstanceGroupOptions{
		InstanceTemplate: instanceTemplate,
		Subnets:          subnets,
	}
}

// SetInstanceTemplate : Allow user to set InstanceTemplate
func (options *CreateInstanceGroupOptions) SetInstanceTemplate(instanceTemplate InstanceTemplateIdentityIntf) *CreateInstanceGroupOptions {
	options.InstanceTemplate = instanceTemplate
	return options
}

// SetSubnets : Allow user to set Subnets
func (options *CreateInstanceGroupOptions) SetSubnets(subnets []SubnetIdentityIntf) *CreateInstanceGroupOptions {
	options.Subnets = subnets
	return options
}

// SetApplicationPort : Allow user to set ApplicationPort
func (options *CreateInstanceGroupOptions) SetApplicationPort(applicationPort int64) *CreateInstanceGroupOptions {
	options.ApplicationPort = core.Int64Ptr(applicationPort)
	return options
}

// SetLoadBalancer : Allow user to set LoadBalancer
func (options *CreateInstanceGroupOptions) SetLoadBalancer(loadBalancer LoadBalancerIdentityIntf) *CreateInstanceGroupOptions {
	options.LoadBalancer = loadBalancer
	return options
}

// SetLoadBalancerPool : Allow user to set LoadBalancerPool
func (options *CreateInstanceGroupOptions) SetLoadBalancerPool(loadBalancerPool LoadBalancerPoolIdentityIntf) *CreateInstanceGroupOptions {
	options.LoadBalancerPool = loadBalancerPool
	return options
}

// SetMembershipCount : Allow user to set MembershipCount
func (options *CreateInstanceGroupOptions) SetMembershipCount(membershipCount int64) *CreateInstanceGroupOptions {
	options.MembershipCount = core.Int64Ptr(membershipCount)
	return options
}

// SetName : Allow user to set Name
func (options *CreateInstanceGroupOptions) SetName(name string) *CreateInstanceGroupOptions {
	options.Name = core.StringPtr(name)
	return options
}

// SetResourceGroup : Allow user to set ResourceGroup
func (options *CreateInstanceGroupOptions) SetResourceGroup(resourceGroup ResourceGroupIdentityIntf) *CreateInstanceGroupOptions {
	options.ResourceGroup = resourceGroup
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateInstanceGroupOptions) SetHeaders(param map[string]string) *CreateInstanceGroupOptions {
	options.Headers = param
	return options
}

// CreateInstanceNetworkInterfaceOptions : The CreateInstanceNetworkInterface options.
type CreateInstanceNetworkInterfaceOptions struct {
	// The instance identifier.
	InstanceID *string `validate:"required,ne="`

	// The associated subnet.
	Subnet SubnetIdentityIntf `validate:"required"`

	// Indicates whether source IP spoofing is allowed on this interface. If false, source IP spoofing is prevented on this
	// interface. If true, source IP spoofing is allowed on this interface.
	AllowIPSpoofing *bool

	// The user-defined name for this network interface. If unspecified, the name will be a hyphenated list of
	// randomly-selected words.
	Name *string

	// The primary IPv4 address. If specified, it must be an available address on the network interface's subnet. If
	// unspecified, an available address on the subnet will be automatically selected.
	PrimaryIpv4Address *string

	// Collection of security groups.
	SecurityGroups []SecurityGroupIdentityIntf

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewCreateInstanceNetworkInterfaceOptions : Instantiate CreateInstanceNetworkInterfaceOptions
func (*VpcV1) NewCreateInstanceNetworkInterfaceOptions(instanceID string, subnet SubnetIdentityIntf) *CreateInstanceNetworkInterfaceOptions {
	return &CreateInstanceNetworkInterfaceOptions{
		InstanceID: core.StringPtr(instanceID),
		Subnet:     subnet,
	}
}

// SetInstanceID : Allow user to set InstanceID
func (options *CreateInstanceNetworkInterfaceOptions) SetInstanceID(instanceID string) *CreateInstanceNetworkInterfaceOptions {
	options.InstanceID = core.StringPtr(instanceID)
	return options
}

// SetSubnet : Allow user to set Subnet
func (options *CreateInstanceNetworkInterfaceOptions) SetSubnet(subnet SubnetIdentityIntf) *CreateInstanceNetworkInterfaceOptions {
	options.Subnet = subnet
	return options
}

// SetAllowIPSpoofing : Allow user to set AllowIPSpoofing
func (options *CreateInstanceNetworkInterfaceOptions) SetAllowIPSpoofing(allowIPSpoofing bool) *CreateInstanceNetworkInterfaceOptions {
	options.AllowIPSpoofing = core.BoolPtr(allowIPSpoofing)
	return options
}

// SetName : Allow user to set Name
func (options *CreateInstanceNetworkInterfaceOptions) SetName(name string) *CreateInstanceNetworkInterfaceOptions {
	options.Name = core.StringPtr(name)
	return options
}

// SetPrimaryIpv4Address : Allow user to set PrimaryIpv4Address
func (options *CreateInstanceNetworkInterfaceOptions) SetPrimaryIpv4Address(primaryIpv4Address string) *CreateInstanceNetworkInterfaceOptions {
	options.PrimaryIpv4Address = core.StringPtr(primaryIpv4Address)
	return options
}

// SetSecurityGroups : Allow user to set SecurityGroups
func (options *CreateInstanceNetworkInterfaceOptions) SetSecurityGroups(securityGroups []SecurityGroupIdentityIntf) *CreateInstanceNetworkInterfaceOptions {
	options.SecurityGroups = securityGroups
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateInstanceNetworkInterfaceOptions) SetHeaders(param map[string]string) *CreateInstanceNetworkInterfaceOptions {
	options.Headers = param
	return options
}

// CreateInstanceOptions : The CreateInstance options.
type CreateInstanceOptions struct {
	// The instance prototype object.
	InstancePrototype InstancePrototypeIntf `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewCreateInstanceOptions : Instantiate CreateInstanceOptions
func (*VpcV1) NewCreateInstanceOptions(instancePrototype InstancePrototypeIntf) *CreateInstanceOptions {
	return &CreateInstanceOptions{
		InstancePrototype: instancePrototype,
	}
}

// SetInstancePrototype : Allow user to set InstancePrototype
func (options *CreateInstanceOptions) SetInstancePrototype(instancePrototype InstancePrototypeIntf) *CreateInstanceOptions {
	options.InstancePrototype = instancePrototype
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateInstanceOptions) SetHeaders(param map[string]string) *CreateInstanceOptions {
	options.Headers = param
	return options
}

// CreateInstanceTemplateOptions : The CreateInstanceTemplate options.
type CreateInstanceTemplateOptions struct {
	// The instance template prototype object.
	InstanceTemplatePrototype InstanceTemplatePrototypeIntf `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewCreateInstanceTemplateOptions : Instantiate CreateInstanceTemplateOptions
func (*VpcV1) NewCreateInstanceTemplateOptions(instanceTemplatePrototype InstanceTemplatePrototypeIntf) *CreateInstanceTemplateOptions {
	return &CreateInstanceTemplateOptions{
		InstanceTemplatePrototype: instanceTemplatePrototype,
	}
}

// SetInstanceTemplatePrototype : Allow user to set InstanceTemplatePrototype
func (options *CreateInstanceTemplateOptions) SetInstanceTemplatePrototype(instanceTemplatePrototype InstanceTemplatePrototypeIntf) *CreateInstanceTemplateOptions {
	options.InstanceTemplatePrototype = instanceTemplatePrototype
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateInstanceTemplateOptions) SetHeaders(param map[string]string) *CreateInstanceTemplateOptions {
	options.Headers = param
	return options
}

// CreateInstanceVolumeAttachmentOptions : The CreateInstanceVolumeAttachment options.
type CreateInstanceVolumeAttachmentOptions struct {
	// The instance identifier.
	InstanceID *string `validate:"required,ne="`

	// The identity of the volume to attach to the instance.
	Volume VolumeIdentityIntf `validate:"required"`

	// If set to true, when deleting the instance the volume will also be deleted.
	DeleteVolumeOnInstanceDelete *bool

	// The user-defined name for this volume attachment. If unspecified, the name will be a hyphenated list of
	// randomly-selected words.
	Name *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewCreateInstanceVolumeAttachmentOptions : Instantiate CreateInstanceVolumeAttachmentOptions
func (*VpcV1) NewCreateInstanceVolumeAttachmentOptions(instanceID string, volume VolumeIdentityIntf) *CreateInstanceVolumeAttachmentOptions {
	return &CreateInstanceVolumeAttachmentOptions{
		InstanceID: core.StringPtr(instanceID),
		Volume:     volume,
	}
}

// SetInstanceID : Allow user to set InstanceID
func (options *CreateInstanceVolumeAttachmentOptions) SetInstanceID(instanceID string) *CreateInstanceVolumeAttachmentOptions {
	options.InstanceID = core.StringPtr(instanceID)
	return options
}

// SetVolume : Allow user to set Volume
func (options *CreateInstanceVolumeAttachmentOptions) SetVolume(volume VolumeIdentityIntf) *CreateInstanceVolumeAttachmentOptions {
	options.Volume = volume
	return options
}

// SetDeleteVolumeOnInstanceDelete : Allow user to set DeleteVolumeOnInstanceDelete
func (options *CreateInstanceVolumeAttachmentOptions) SetDeleteVolumeOnInstanceDelete(deleteVolumeOnInstanceDelete bool) *CreateInstanceVolumeAttachmentOptions {
	options.DeleteVolumeOnInstanceDelete = core.BoolPtr(deleteVolumeOnInstanceDelete)
	return options
}

// SetName : Allow user to set Name
func (options *CreateInstanceVolumeAttachmentOptions) SetName(name string) *CreateInstanceVolumeAttachmentOptions {
	options.Name = core.StringPtr(name)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateInstanceVolumeAttachmentOptions) SetHeaders(param map[string]string) *CreateInstanceVolumeAttachmentOptions {
	options.Headers = param
	return options
}

// CreateIpsecPolicyOptions : The CreateIpsecPolicy options.
type CreateIpsecPolicyOptions struct {
	// The authentication algorithm.
	AuthenticationAlgorithm *string `validate:"required"`

	// The encryption algorithm.
	EncryptionAlgorithm *string `validate:"required"`

	// Perfect Forward Secrecy.
	Pfs *string `validate:"required"`

	// The key lifetime in seconds.
	KeyLifetime *int64

	// The user-defined name for this IPsec policy.
	Name *string

	// The resource group to use. If unspecified, the account's [default resource
	// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
	ResourceGroup ResourceGroupIdentityIntf

	// Allows users to set headers on API requests
	Headers map[string]string
}

// Constants associated with the CreateIpsecPolicyOptions.AuthenticationAlgorithm property.
// The authentication algorithm.
const (
	CreateIpsecPolicyOptionsAuthenticationAlgorithmMd5Const    = "md5"
	CreateIpsecPolicyOptionsAuthenticationAlgorithmSha1Const   = "sha1"
	CreateIpsecPolicyOptionsAuthenticationAlgorithmSha256Const = "sha256"
	CreateIpsecPolicyOptionsAuthenticationAlgorithmSha512Const = "sha512"
)

// Constants associated with the CreateIpsecPolicyOptions.EncryptionAlgorithm property.
// The encryption algorithm.
const (
	CreateIpsecPolicyOptionsEncryptionAlgorithmAes128Const    = "aes128"
	CreateIpsecPolicyOptionsEncryptionAlgorithmAes256Const    = "aes256"
	CreateIpsecPolicyOptionsEncryptionAlgorithmTripleDesConst = "triple_des"
)

// Constants associated with the CreateIpsecPolicyOptions.Pfs property.
// Perfect Forward Secrecy.
const (
	CreateIpsecPolicyOptionsPfsDisabledConst = "disabled"
	CreateIpsecPolicyOptionsPfsGroup14Const  = "group_14"
	CreateIpsecPolicyOptionsPfsGroup19Const  = "group_19"
	CreateIpsecPolicyOptionsPfsGroup2Const   = "group_2"
	CreateIpsecPolicyOptionsPfsGroup5Const   = "group_5"
)

// NewCreateIpsecPolicyOptions : Instantiate CreateIpsecPolicyOptions
func (*VpcV1) NewCreateIpsecPolicyOptions(authenticationAlgorithm string, encryptionAlgorithm string, pfs string) *CreateIpsecPolicyOptions {
	return &CreateIpsecPolicyOptions{
		AuthenticationAlgorithm: core.StringPtr(authenticationAlgorithm),
		EncryptionAlgorithm:     core.StringPtr(encryptionAlgorithm),
		Pfs:                     core.StringPtr(pfs),
	}
}

// SetAuthenticationAlgorithm : Allow user to set AuthenticationAlgorithm
func (options *CreateIpsecPolicyOptions) SetAuthenticationAlgorithm(authenticationAlgorithm string) *CreateIpsecPolicyOptions {
	options.AuthenticationAlgorithm = core.StringPtr(authenticationAlgorithm)
	return options
}

// SetEncryptionAlgorithm : Allow user to set EncryptionAlgorithm
func (options *CreateIpsecPolicyOptions) SetEncryptionAlgorithm(encryptionAlgorithm string) *CreateIpsecPolicyOptions {
	options.EncryptionAlgorithm = core.StringPtr(encryptionAlgorithm)
	return options
}

// SetPfs : Allow user to set Pfs
func (options *CreateIpsecPolicyOptions) SetPfs(pfs string) *CreateIpsecPolicyOptions {
	options.Pfs = core.StringPtr(pfs)
	return options
}

// SetKeyLifetime : Allow user to set KeyLifetime
func (options *CreateIpsecPolicyOptions) SetKeyLifetime(keyLifetime int64) *CreateIpsecPolicyOptions {
	options.KeyLifetime = core.Int64Ptr(keyLifetime)
	return options
}

// SetName : Allow user to set Name
func (options *CreateIpsecPolicyOptions) SetName(name string) *CreateIpsecPolicyOptions {
	options.Name = core.StringPtr(name)
	return options
}

// SetResourceGroup : Allow user to set ResourceGroup
func (options *CreateIpsecPolicyOptions) SetResourceGroup(resourceGroup ResourceGroupIdentityIntf) *CreateIpsecPolicyOptions {
	options.ResourceGroup = resourceGroup
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateIpsecPolicyOptions) SetHeaders(param map[string]string) *CreateIpsecPolicyOptions {
	options.Headers = param
	return options
}

// CreateKeyOptions : The CreateKey options.
type CreateKeyOptions struct {
	// A unique public SSH key to import, encoded in PEM format. The key (prior to encoding) must be either 2048 or 4096
	// bits long.
	PublicKey *string `validate:"required"`

	// The unique user-defined name for this key. If unspecified, the name will be a hyphenated list of randomly-selected
	// words.
	Name *string

	// The resource group to use. If unspecified, the account's [default resource
	// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
	ResourceGroup ResourceGroupIdentityIntf

	// The crypto-system used by this key.
	Type *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

// Constants associated with the CreateKeyOptions.Type property.
// The crypto-system used by this key.
const (
	CreateKeyOptionsTypeRsaConst = "rsa"
)

// NewCreateKeyOptions : Instantiate CreateKeyOptions
func (*VpcV1) NewCreateKeyOptions(publicKey string) *CreateKeyOptions {
	return &CreateKeyOptions{
		PublicKey: core.StringPtr(publicKey),
	}
}

// SetPublicKey : Allow user to set PublicKey
func (options *CreateKeyOptions) SetPublicKey(publicKey string) *CreateKeyOptions {
	options.PublicKey = core.StringPtr(publicKey)
	return options
}

// SetName : Allow user to set Name
func (options *CreateKeyOptions) SetName(name string) *CreateKeyOptions {
	options.Name = core.StringPtr(name)
	return options
}

// SetResourceGroup : Allow user to set ResourceGroup
func (options *CreateKeyOptions) SetResourceGroup(resourceGroup ResourceGroupIdentityIntf) *CreateKeyOptions {
	options.ResourceGroup = resourceGroup
	return options
}

// SetType : Allow user to set Type
func (options *CreateKeyOptions) SetType(typeVar string) *CreateKeyOptions {
	options.Type = core.StringPtr(typeVar)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateKeyOptions) SetHeaders(param map[string]string) *CreateKeyOptions {
	options.Headers = param
	return options
}

// CreateLoadBalancerListenerOptions : The CreateLoadBalancerListener options.
type CreateLoadBalancerListenerOptions struct {
	// The load balancer identifier.
	LoadBalancerID *string `validate:"required,ne="`

	// The listener port number, or the inclusive lower bound of the port range. Each listener in the load balancer must
	// have a unique `port` and `protocol` combination.
	Port *int64 `validate:"required"`

	// The listener protocol. Load balancers in the `network` family support `tcp`. Load balancers in the `application`
	// family support `tcp`, `http`, and `https`. Each listener in the load balancer must have a unique `port` and
	// `protocol` combination.
	Protocol *string `validate:"required"`

	// If set to `true`, this listener will accept and forward PROXY protocol information. Supported by load balancers in
	// the `application` family (otherwise always `false`).
	AcceptProxyProtocol *bool

	// The certificate instance used for SSL termination. It is applicable only to `https`
	// protocol.
	CertificateInstance CertificateInstanceIdentityIntf

	// The connection limit of the listener.
	ConnectionLimit *int64

	// The default pool associated with the listener. The specified pool must:
	//
	// - Belong to this load balancer
	// - Have the same `protocol` as this listener
	// - Not already be the default pool for another listener.
	DefaultPool LoadBalancerPoolIdentityIntf

	// An array of policies for this listener.
	Policies []LoadBalancerListenerPolicyPrototype

	// Allows users to set headers on API requests
	Headers map[string]string
}

// Constants associated with the CreateLoadBalancerListenerOptions.Protocol property.
// The listener protocol. Load balancers in the `network` family support `tcp`. Load balancers in the `application`
// family support `tcp`, `http`, and `https`. Each listener in the load balancer must have a unique `port` and
// `protocol` combination.
const (
	CreateLoadBalancerListenerOptionsProtocolHTTPConst  = "http"
	CreateLoadBalancerListenerOptionsProtocolHTTPSConst = "https"
	CreateLoadBalancerListenerOptionsProtocolTCPConst   = "tcp"
)

// NewCreateLoadBalancerListenerOptions : Instantiate CreateLoadBalancerListenerOptions
func (*VpcV1) NewCreateLoadBalancerListenerOptions(loadBalancerID string, port int64, protocol string) *CreateLoadBalancerListenerOptions {
	return &CreateLoadBalancerListenerOptions{
		LoadBalancerID: core.StringPtr(loadBalancerID),
		Port:           core.Int64Ptr(port),
		Protocol:       core.StringPtr(protocol),
	}
}

// SetLoadBalancerID : Allow user to set LoadBalancerID
func (options *CreateLoadBalancerListenerOptions) SetLoadBalancerID(loadBalancerID string) *CreateLoadBalancerListenerOptions {
	options.LoadBalancerID = core.StringPtr(loadBalancerID)
	return options
}

// SetPort : Allow user to set Port
func (options *CreateLoadBalancerListenerOptions) SetPort(port int64) *CreateLoadBalancerListenerOptions {
	options.Port = core.Int64Ptr(port)
	return options
}

// SetProtocol : Allow user to set Protocol
func (options *CreateLoadBalancerListenerOptions) SetProtocol(protocol string) *CreateLoadBalancerListenerOptions {
	options.Protocol = core.StringPtr(protocol)
	return options
}

// SetAcceptProxyProtocol : Allow user to set AcceptProxyProtocol
func (options *CreateLoadBalancerListenerOptions) SetAcceptProxyProtocol(acceptProxyProtocol bool) *CreateLoadBalancerListenerOptions {
	options.AcceptProxyProtocol = core.BoolPtr(acceptProxyProtocol)
	return options
}

// SetCertificateInstance : Allow user to set CertificateInstance
func (options *CreateLoadBalancerListenerOptions) SetCertificateInstance(certificateInstance CertificateInstanceIdentityIntf) *CreateLoadBalancerListenerOptions {
	options.CertificateInstance = certificateInstance
	return options
}

// SetConnectionLimit : Allow user to set ConnectionLimit
func (options *CreateLoadBalancerListenerOptions) SetConnectionLimit(connectionLimit int64) *CreateLoadBalancerListenerOptions {
	options.ConnectionLimit = core.Int64Ptr(connectionLimit)
	return options
}

// SetDefaultPool : Allow user to set DefaultPool
func (options *CreateLoadBalancerListenerOptions) SetDefaultPool(defaultPool LoadBalancerPoolIdentityIntf) *CreateLoadBalancerListenerOptions {
	options.DefaultPool = defaultPool
	return options
}

// SetPolicies : Allow user to set Policies
func (options *CreateLoadBalancerListenerOptions) SetPolicies(policies []LoadBalancerListenerPolicyPrototype) *CreateLoadBalancerListenerOptions {
	options.Policies = policies
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateLoadBalancerListenerOptions) SetHeaders(param map[string]string) *CreateLoadBalancerListenerOptions {
	options.Headers = param
	return options
}

// CreateLoadBalancerListenerPolicyOptions : The CreateLoadBalancerListenerPolicy options.
type CreateLoadBalancerListenerPolicyOptions struct {
	// The load balancer identifier.
	LoadBalancerID *string `validate:"required,ne="`

	// The listener identifier.
	ListenerID *string `validate:"required,ne="`

	// The policy action.
	Action *string `validate:"required"`

	// Priority of the policy. Lower value indicates higher priority.
	Priority *int64 `validate:"required"`

	// The user-defined name for this policy. Names must be unique within the load balancer listener the policy resides in.
	Name *string

	// An array of rules for this policy.
	Rules []LoadBalancerListenerPolicyRulePrototype

	// When `action` is `forward`, `LoadBalancerPoolIdentity` is required to specify which
	// pool the load balancer forwards the traffic to. When `action` is `redirect`,
	// `LoadBalancerListenerPolicyRedirectURLPrototype` is required to specify the url and
	// http status code used in the redirect response.
	Target LoadBalancerListenerPolicyTargetPrototypeIntf

	// Allows users to set headers on API requests
	Headers map[string]string
}

// Constants associated with the CreateLoadBalancerListenerPolicyOptions.Action property.
// The policy action.
const (
	CreateLoadBalancerListenerPolicyOptionsActionForwardConst  = "forward"
	CreateLoadBalancerListenerPolicyOptionsActionRedirectConst = "redirect"
	CreateLoadBalancerListenerPolicyOptionsActionRejectConst   = "reject"
)

// NewCreateLoadBalancerListenerPolicyOptions : Instantiate CreateLoadBalancerListenerPolicyOptions
func (*VpcV1) NewCreateLoadBalancerListenerPolicyOptions(loadBalancerID string, listenerID string, action string, priority int64) *CreateLoadBalancerListenerPolicyOptions {
	return &CreateLoadBalancerListenerPolicyOptions{
		LoadBalancerID: core.StringPtr(loadBalancerID),
		ListenerID:     core.StringPtr(listenerID),
		Action:         core.StringPtr(action),
		Priority:       core.Int64Ptr(priority),
	}
}

// SetLoadBalancerID : Allow user to set LoadBalancerID
func (options *CreateLoadBalancerListenerPolicyOptions) SetLoadBalancerID(loadBalancerID string) *CreateLoadBalancerListenerPolicyOptions {
	options.LoadBalancerID = core.StringPtr(loadBalancerID)
	return options
}

// SetListenerID : Allow user to set ListenerID
func (options *CreateLoadBalancerListenerPolicyOptions) SetListenerID(listenerID string) *CreateLoadBalancerListenerPolicyOptions {
	options.ListenerID = core.StringPtr(listenerID)
	return options
}

// SetAction : Allow user to set Action
func (options *CreateLoadBalancerListenerPolicyOptions) SetAction(action string) *CreateLoadBalancerListenerPolicyOptions {
	options.Action = core.StringPtr(action)
	return options
}

// SetPriority : Allow user to set Priority
func (options *CreateLoadBalancerListenerPolicyOptions) SetPriority(priority int64) *CreateLoadBalancerListenerPolicyOptions {
	options.Priority = core.Int64Ptr(priority)
	return options
}

// SetName : Allow user to set Name
func (options *CreateLoadBalancerListenerPolicyOptions) SetName(name string) *CreateLoadBalancerListenerPolicyOptions {
	options.Name = core.StringPtr(name)
	return options
}

// SetRules : Allow user to set Rules
func (options *CreateLoadBalancerListenerPolicyOptions) SetRules(rules []LoadBalancerListenerPolicyRulePrototype) *CreateLoadBalancerListenerPolicyOptions {
	options.Rules = rules
	return options
}

// SetTarget : Allow user to set Target
func (options *CreateLoadBalancerListenerPolicyOptions) SetTarget(target LoadBalancerListenerPolicyTargetPrototypeIntf) *CreateLoadBalancerListenerPolicyOptions {
	options.Target = target
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateLoadBalancerListenerPolicyOptions) SetHeaders(param map[string]string) *CreateLoadBalancerListenerPolicyOptions {
	options.Headers = param
	return options
}

// CreateLoadBalancerListenerPolicyRuleOptions : The CreateLoadBalancerListenerPolicyRule options.
type CreateLoadBalancerListenerPolicyRuleOptions struct {
	// The load balancer identifier.
	LoadBalancerID *string `validate:"required,ne="`

	// The listener identifier.
	ListenerID *string `validate:"required,ne="`

	// The policy identifier.
	PolicyID *string `validate:"required,ne="`

	// The condition of the rule.
	Condition *string `validate:"required"`

	// The type of the rule.
	//
	// Body rules are applied to form-encoded request bodies using the `UTF-8` character set.
	Type *string `validate:"required"`

	// Value to be matched for rule condition.
	//
	// If the rule type is `query` and the rule condition is not `matches_regex`, the value must be percent-encoded.
	Value *string `validate:"required"`

	// The field. This is applicable to `header`, `query`, and `body` rule types.
	//
	// If the rule type is `header`, this field is required.
	//
	// If the rule type is `query`, this is optional. If specified and the rule condition is not
	// `matches_regex`, the value must be percent-encoded.
	//
	// If the rule type is `body`, this is optional.
	Field *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

// Constants associated with the CreateLoadBalancerListenerPolicyRuleOptions.Condition property.
// The condition of the rule.
const (
	CreateLoadBalancerListenerPolicyRuleOptionsConditionContainsConst     = "contains"
	CreateLoadBalancerListenerPolicyRuleOptionsConditionEqualsConst       = "equals"
	CreateLoadBalancerListenerPolicyRuleOptionsConditionMatchesRegexConst = "matches_regex"
)

// Constants associated with the CreateLoadBalancerListenerPolicyRuleOptions.Type property.
// The type of the rule.
//
// Body rules are applied to form-encoded request bodies using the `UTF-8` character set.
const (
	CreateLoadBalancerListenerPolicyRuleOptionsTypeBodyConst     = "body"
	CreateLoadBalancerListenerPolicyRuleOptionsTypeHeaderConst   = "header"
	CreateLoadBalancerListenerPolicyRuleOptionsTypeHostnameConst = "hostname"
	CreateLoadBalancerListenerPolicyRuleOptionsTypePathConst     = "path"
	CreateLoadBalancerListenerPolicyRuleOptionsTypeQueryConst    = "query"
)

// NewCreateLoadBalancerListenerPolicyRuleOptions : Instantiate CreateLoadBalancerListenerPolicyRuleOptions
func (*VpcV1) NewCreateLoadBalancerListenerPolicyRuleOptions(loadBalancerID string, listenerID string, policyID string, condition string, typeVar string, value string) *CreateLoadBalancerListenerPolicyRuleOptions {
	return &CreateLoadBalancerListenerPolicyRuleOptions{
		LoadBalancerID: core.StringPtr(loadBalancerID),
		ListenerID:     core.StringPtr(listenerID),
		PolicyID:       core.StringPtr(policyID),
		Condition:      core.StringPtr(condition),
		Type:           core.StringPtr(typeVar),
		Value:          core.StringPtr(value),
	}
}

// SetLoadBalancerID : Allow user to set LoadBalancerID
func (options *CreateLoadBalancerListenerPolicyRuleOptions) SetLoadBalancerID(loadBalancerID string) *CreateLoadBalancerListenerPolicyRuleOptions {
	options.LoadBalancerID = core.StringPtr(loadBalancerID)
	return options
}

// SetListenerID : Allow user to set ListenerID
func (options *CreateLoadBalancerListenerPolicyRuleOptions) SetListenerID(listenerID string) *CreateLoadBalancerListenerPolicyRuleOptions {
	options.ListenerID = core.StringPtr(listenerID)
	return options
}

// SetPolicyID : Allow user to set PolicyID
func (options *CreateLoadBalancerListenerPolicyRuleOptions) SetPolicyID(policyID string) *CreateLoadBalancerListenerPolicyRuleOptions {
	options.PolicyID = core.StringPtr(policyID)
	return options
}

// SetCondition : Allow user to set Condition
func (options *CreateLoadBalancerListenerPolicyRuleOptions) SetCondition(condition string) *CreateLoadBalancerListenerPolicyRuleOptions {
	options.Condition = core.StringPtr(condition)
	return options
}

// SetType : Allow user to set Type
func (options *CreateLoadBalancerListenerPolicyRuleOptions) SetType(typeVar string) *CreateLoadBalancerListenerPolicyRuleOptions {
	options.Type = core.StringPtr(typeVar)
	return options
}

// SetValue : Allow user to set Value
func (options *CreateLoadBalancerListenerPolicyRuleOptions) SetValue(value string) *CreateLoadBalancerListenerPolicyRuleOptions {
	options.Value = core.StringPtr(value)
	return options
}

// SetField : Allow user to set Field
func (options *CreateLoadBalancerListenerPolicyRuleOptions) SetField(field string) *CreateLoadBalancerListenerPolicyRuleOptions {
	options.Field = core.StringPtr(field)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateLoadBalancerListenerPolicyRuleOptions) SetHeaders(param map[string]string) *CreateLoadBalancerListenerPolicyRuleOptions {
	options.Headers = param
	return options
}

// CreateLoadBalancerOptions : The CreateLoadBalancer options.
type CreateLoadBalancerOptions struct {
	// Indicates whether this load balancer is public or private.
	IsPublic *bool `validate:"required"`

	// The subnets to provision this load balancer.
	Subnets []SubnetIdentityIntf `validate:"required"`

	// The listeners of this load balancer.
	Listeners []LoadBalancerListenerPrototypeLoadBalancerContext

	// The logging configuration to use for this load balancer. See [VPC Datapath
	// Logging](https://cloud.ibm.com/docs/vpc?topic=vpc-datapath-logging)
	// on the logging format, fields and permitted values.
	//
	// To activate logging, the load balancer profile must support the specified logging
	// type.
	Logging *LoadBalancerLogging

	// The user-defined name for this load balancer. If unspecified, the name will be a hyphenated list of
	// randomly-selected words.
	Name *string

	// The pools of this load balancer.
	Pools []LoadBalancerPoolPrototype

	// The profile to use for this load balancer.
	Profile LoadBalancerProfileIdentityIntf

	// The resource group to use. If unspecified, the account's [default resource
	// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
	ResourceGroup ResourceGroupIdentityIntf

	// The security groups to use for this load balancer.
	//
	// The load balancer profile must support security groups.
	SecurityGroups []SecurityGroupIdentityIntf

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewCreateLoadBalancerOptions : Instantiate CreateLoadBalancerOptions
func (*VpcV1) NewCreateLoadBalancerOptions(isPublic bool, subnets []SubnetIdentityIntf) *CreateLoadBalancerOptions {
	return &CreateLoadBalancerOptions{
		IsPublic: core.BoolPtr(isPublic),
		Subnets:  subnets,
	}
}

// SetIsPublic : Allow user to set IsPublic
func (options *CreateLoadBalancerOptions) SetIsPublic(isPublic bool) *CreateLoadBalancerOptions {
	options.IsPublic = core.BoolPtr(isPublic)
	return options
}

// SetSubnets : Allow user to set Subnets
func (options *CreateLoadBalancerOptions) SetSubnets(subnets []SubnetIdentityIntf) *CreateLoadBalancerOptions {
	options.Subnets = subnets
	return options
}

// SetListeners : Allow user to set Listeners
func (options *CreateLoadBalancerOptions) SetListeners(listeners []LoadBalancerListenerPrototypeLoadBalancerContext) *CreateLoadBalancerOptions {
	options.Listeners = listeners
	return options
}

// SetLogging : Allow user to set Logging
func (options *CreateLoadBalancerOptions) SetLogging(logging *LoadBalancerLogging) *CreateLoadBalancerOptions {
	options.Logging = logging
	return options
}

// SetName : Allow user to set Name
func (options *CreateLoadBalancerOptions) SetName(name string) *CreateLoadBalancerOptions {
	options.Name = core.StringPtr(name)
	return options
}

// SetPools : Allow user to set Pools
func (options *CreateLoadBalancerOptions) SetPools(pools []LoadBalancerPoolPrototype) *CreateLoadBalancerOptions {
	options.Pools = pools
	return options
}

// SetProfile : Allow user to set Profile
func (options *CreateLoadBalancerOptions) SetProfile(profile LoadBalancerProfileIdentityIntf) *CreateLoadBalancerOptions {
	options.Profile = profile
	return options
}

// SetResourceGroup : Allow user to set ResourceGroup
func (options *CreateLoadBalancerOptions) SetResourceGroup(resourceGroup ResourceGroupIdentityIntf) *CreateLoadBalancerOptions {
	options.ResourceGroup = resourceGroup
	return options
}

// SetSecurityGroups : Allow user to set SecurityGroups
func (options *CreateLoadBalancerOptions) SetSecurityGroups(securityGroups []SecurityGroupIdentityIntf) *CreateLoadBalancerOptions {
	options.SecurityGroups = securityGroups
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateLoadBalancerOptions) SetHeaders(param map[string]string) *CreateLoadBalancerOptions {
	options.Headers = param
	return options
}

// CreateLoadBalancerPoolMemberOptions : The CreateLoadBalancerPoolMember options.
type CreateLoadBalancerPoolMemberOptions struct {
	// The load balancer identifier.
	LoadBalancerID *string `validate:"required,ne="`

	// The pool identifier.
	PoolID *string `validate:"required,ne="`

	// The port number of the application running in the server member.
	Port *int64 `validate:"required"`

	// The pool member target. Load balancers in the `network` family support virtual server
	// instances. Load balancers in the `application` family support IP addresses.
	Target LoadBalancerPoolMemberTargetPrototypeIntf `validate:"required"`

	// Weight of the server member. Applicable only if the pool algorithm is
	// `weighted_round_robin`.
	Weight *int64

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewCreateLoadBalancerPoolMemberOptions : Instantiate CreateLoadBalancerPoolMemberOptions
func (*VpcV1) NewCreateLoadBalancerPoolMemberOptions(loadBalancerID string, poolID string, port int64, target LoadBalancerPoolMemberTargetPrototypeIntf) *CreateLoadBalancerPoolMemberOptions {
	return &CreateLoadBalancerPoolMemberOptions{
		LoadBalancerID: core.StringPtr(loadBalancerID),
		PoolID:         core.StringPtr(poolID),
		Port:           core.Int64Ptr(port),
		Target:         target,
	}
}

// SetLoadBalancerID : Allow user to set LoadBalancerID
func (options *CreateLoadBalancerPoolMemberOptions) SetLoadBalancerID(loadBalancerID string) *CreateLoadBalancerPoolMemberOptions {
	options.LoadBalancerID = core.StringPtr(loadBalancerID)
	return options
}

// SetPoolID : Allow user to set PoolID
func (options *CreateLoadBalancerPoolMemberOptions) SetPoolID(poolID string) *CreateLoadBalancerPoolMemberOptions {
	options.PoolID = core.StringPtr(poolID)
	return options
}

// SetPort : Allow user to set Port
func (options *CreateLoadBalancerPoolMemberOptions) SetPort(port int64) *CreateLoadBalancerPoolMemberOptions {
	options.Port = core.Int64Ptr(port)
	return options
}

// SetTarget : Allow user to set Target
func (options *CreateLoadBalancerPoolMemberOptions) SetTarget(target LoadBalancerPoolMemberTargetPrototypeIntf) *CreateLoadBalancerPoolMemberOptions {
	options.Target = target
	return options
}

// SetWeight : Allow user to set Weight
func (options *CreateLoadBalancerPoolMemberOptions) SetWeight(weight int64) *CreateLoadBalancerPoolMemberOptions {
	options.Weight = core.Int64Ptr(weight)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateLoadBalancerPoolMemberOptions) SetHeaders(param map[string]string) *CreateLoadBalancerPoolMemberOptions {
	options.Headers = param
	return options
}

// CreateLoadBalancerPoolOptions : The CreateLoadBalancerPool options.
type CreateLoadBalancerPoolOptions struct {
	// The load balancer identifier.
	LoadBalancerID *string `validate:"required,ne="`

	// The load balancing algorithm.
	Algorithm *string `validate:"required"`

	// The health monitor of this pool.
	HealthMonitor *LoadBalancerPoolHealthMonitorPrototype `validate:"required"`

	// The protocol used for this load balancer pool. Load balancers in the `network` family support `tcp`. Load balancers
	// in the `application` family support `tcp`, `http`, and
	// `https`.
	Protocol *string `validate:"required"`

	// The members for this load balancer pool. For load balancers in the `network` family, the same `port` and `target`
	// tuple cannot be shared by a pool member of any other load balancer in the same VPC.
	Members []LoadBalancerPoolMemberPrototype

	// The user-defined name for this load balancer pool. If unspecified, the name will be a hyphenated list of
	// randomly-selected words.
	Name *string

	// The PROXY protocol setting for this pool:
	// - `v1`: Enabled with version 1 (human-readable header format)
	// - `v2`: Enabled with version 2 (binary header format)
	// - `disabled`: Disabled
	//
	// Supported by load balancers in the `application` family (otherwise always `disabled`).
	ProxyProtocol *string

	// The session persistence of this pool.
	SessionPersistence *LoadBalancerPoolSessionPersistencePrototype

	// Allows users to set headers on API requests
	Headers map[string]string
}

// Constants associated with the CreateLoadBalancerPoolOptions.Algorithm property.
// The load balancing algorithm.
const (
	CreateLoadBalancerPoolOptionsAlgorithmLeastConnectionsConst   = "least_connections"
	CreateLoadBalancerPoolOptionsAlgorithmRoundRobinConst         = "round_robin"
	CreateLoadBalancerPoolOptionsAlgorithmWeightedRoundRobinConst = "weighted_round_robin"
)

// Constants associated with the CreateLoadBalancerPoolOptions.Protocol property.
// The protocol used for this load balancer pool. Load balancers in the `network` family support `tcp`. Load balancers
// in the `application` family support `tcp`, `http`, and
// `https`.
const (
	CreateLoadBalancerPoolOptionsProtocolHTTPConst  = "http"
	CreateLoadBalancerPoolOptionsProtocolHTTPSConst = "https"
	CreateLoadBalancerPoolOptionsProtocolTCPConst   = "tcp"
)

// Constants associated with the CreateLoadBalancerPoolOptions.ProxyProtocol property.
// The PROXY protocol setting for this pool:
// - `v1`: Enabled with version 1 (human-readable header format)
// - `v2`: Enabled with version 2 (binary header format)
// - `disabled`: Disabled
//
// Supported by load balancers in the `application` family (otherwise always `disabled`).
const (
	CreateLoadBalancerPoolOptionsProxyProtocolDisabledConst = "disabled"
	CreateLoadBalancerPoolOptionsProxyProtocolV1Const       = "v1"
	CreateLoadBalancerPoolOptionsProxyProtocolV2Const       = "v2"
)

// NewCreateLoadBalancerPoolOptions : Instantiate CreateLoadBalancerPoolOptions
func (*VpcV1) NewCreateLoadBalancerPoolOptions(loadBalancerID string, algorithm string, healthMonitor *LoadBalancerPoolHealthMonitorPrototype, protocol string) *CreateLoadBalancerPoolOptions {
	return &CreateLoadBalancerPoolOptions{
		LoadBalancerID: core.StringPtr(loadBalancerID),
		Algorithm:      core.StringPtr(algorithm),
		HealthMonitor:  healthMonitor,
		Protocol:       core.StringPtr(protocol),
	}
}

// SetLoadBalancerID : Allow user to set LoadBalancerID
func (options *CreateLoadBalancerPoolOptions) SetLoadBalancerID(loadBalancerID string) *CreateLoadBalancerPoolOptions {
	options.LoadBalancerID = core.StringPtr(loadBalancerID)
	return options
}

// SetAlgorithm : Allow user to set Algorithm
func (options *CreateLoadBalancerPoolOptions) SetAlgorithm(algorithm string) *CreateLoadBalancerPoolOptions {
	options.Algorithm = core.StringPtr(algorithm)
	return options
}

// SetHealthMonitor : Allow user to set HealthMonitor
func (options *CreateLoadBalancerPoolOptions) SetHealthMonitor(healthMonitor *LoadBalancerPoolHealthMonitorPrototype) *CreateLoadBalancerPoolOptions {
	options.HealthMonitor = healthMonitor
	return options
}

// SetProtocol : Allow user to set Protocol
func (options *CreateLoadBalancerPoolOptions) SetProtocol(protocol string) *CreateLoadBalancerPoolOptions {
	options.Protocol = core.StringPtr(protocol)
	return options
}

// SetMembers : Allow user to set Members
func (options *CreateLoadBalancerPoolOptions) SetMembers(members []LoadBalancerPoolMemberPrototype) *CreateLoadBalancerPoolOptions {
	options.Members = members
	return options
}

// SetName : Allow user to set Name
func (options *CreateLoadBalancerPoolOptions) SetName(name string) *CreateLoadBalancerPoolOptions {
	options.Name = core.StringPtr(name)
	return options
}

// SetProxyProtocol : Allow user to set ProxyProtocol
func (options *CreateLoadBalancerPoolOptions) SetProxyProtocol(proxyProtocol string) *CreateLoadBalancerPoolOptions {
	options.ProxyProtocol = core.StringPtr(proxyProtocol)
	return options
}

// SetSessionPersistence : Allow user to set SessionPersistence
func (options *CreateLoadBalancerPoolOptions) SetSessionPersistence(sessionPersistence *LoadBalancerPoolSessionPersistencePrototype) *CreateLoadBalancerPoolOptions {
	options.SessionPersistence = sessionPersistence
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateLoadBalancerPoolOptions) SetHeaders(param map[string]string) *CreateLoadBalancerPoolOptions {
	options.Headers = param
	return options
}

// CreateNetworkACLOptions : The CreateNetworkACL options.
type CreateNetworkACLOptions struct {
	// The network ACL prototype object.
	NetworkACLPrototype NetworkACLPrototypeIntf

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewCreateNetworkACLOptions : Instantiate CreateNetworkACLOptions
func (*VpcV1) NewCreateNetworkACLOptions() *CreateNetworkACLOptions {
	return &CreateNetworkACLOptions{}
}

// SetNetworkACLPrototype : Allow user to set NetworkACLPrototype
func (options *CreateNetworkACLOptions) SetNetworkACLPrototype(networkACLPrototype NetworkACLPrototypeIntf) *CreateNetworkACLOptions {
	options.NetworkACLPrototype = networkACLPrototype
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateNetworkACLOptions) SetHeaders(param map[string]string) *CreateNetworkACLOptions {
	options.Headers = param
	return options
}

// CreateNetworkACLRuleOptions : The CreateNetworkACLRule options.
type CreateNetworkACLRuleOptions struct {
	// The network ACL identifier.
	NetworkACLID *string `validate:"required,ne="`

	// The network ACL rule prototype object.
	NetworkACLRulePrototype NetworkACLRulePrototypeIntf `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewCreateNetworkACLRuleOptions : Instantiate CreateNetworkACLRuleOptions
func (*VpcV1) NewCreateNetworkACLRuleOptions(networkACLID string, networkACLRulePrototype NetworkACLRulePrototypeIntf) *CreateNetworkACLRuleOptions {
	return &CreateNetworkACLRuleOptions{
		NetworkACLID:            core.StringPtr(networkACLID),
		NetworkACLRulePrototype: networkACLRulePrototype,
	}
}

// SetNetworkACLID : Allow user to set NetworkACLID
func (options *CreateNetworkACLRuleOptions) SetNetworkACLID(networkACLID string) *CreateNetworkACLRuleOptions {
	options.NetworkACLID = core.StringPtr(networkACLID)
	return options
}

// SetNetworkACLRulePrototype : Allow user to set NetworkACLRulePrototype
func (options *CreateNetworkACLRuleOptions) SetNetworkACLRulePrototype(networkACLRulePrototype NetworkACLRulePrototypeIntf) *CreateNetworkACLRuleOptions {
	options.NetworkACLRulePrototype = networkACLRulePrototype
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateNetworkACLRuleOptions) SetHeaders(param map[string]string) *CreateNetworkACLRuleOptions {
	options.Headers = param
	return options
}

// CreatePublicGatewayOptions : The CreatePublicGateway options.
type CreatePublicGatewayOptions struct {
	// The VPC this public gateway will serve.
	VPC VPCIdentityIntf `validate:"required"`

	// The zone this public gateway will reside in.
	Zone ZoneIdentityIntf `validate:"required"`

	FloatingIP PublicGatewayFloatingIPPrototypeIntf

	// The user-defined name for this public gateway. Names must be unique within the VPC the public gateway resides in. If
	// unspecified, the name will be a hyphenated list of randomly-selected words.
	Name *string

	// The resource group to use. If unspecified, the account's [default resource
	// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
	ResourceGroup ResourceGroupIdentityIntf

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewCreatePublicGatewayOptions : Instantiate CreatePublicGatewayOptions
func (*VpcV1) NewCreatePublicGatewayOptions(vpc VPCIdentityIntf, zone ZoneIdentityIntf) *CreatePublicGatewayOptions {
	return &CreatePublicGatewayOptions{
		VPC:  vpc,
		Zone: zone,
	}
}

// SetVPC : Allow user to set VPC
func (options *CreatePublicGatewayOptions) SetVPC(vpc VPCIdentityIntf) *CreatePublicGatewayOptions {
	options.VPC = vpc
	return options
}

// SetZone : Allow user to set Zone
func (options *CreatePublicGatewayOptions) SetZone(zone ZoneIdentityIntf) *CreatePublicGatewayOptions {
	options.Zone = zone
	return options
}

// SetFloatingIP : Allow user to set FloatingIP
func (options *CreatePublicGatewayOptions) SetFloatingIP(floatingIP PublicGatewayFloatingIPPrototypeIntf) *CreatePublicGatewayOptions {
	options.FloatingIP = floatingIP
	return options
}

// SetName : Allow user to set Name
func (options *CreatePublicGatewayOptions) SetName(name string) *CreatePublicGatewayOptions {
	options.Name = core.StringPtr(name)
	return options
}

// SetResourceGroup : Allow user to set ResourceGroup
func (options *CreatePublicGatewayOptions) SetResourceGroup(resourceGroup ResourceGroupIdentityIntf) *CreatePublicGatewayOptions {
	options.ResourceGroup = resourceGroup
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreatePublicGatewayOptions) SetHeaders(param map[string]string) *CreatePublicGatewayOptions {
	options.Headers = param
	return options
}

// CreateSecurityGroupOptions : The CreateSecurityGroup options.
type CreateSecurityGroupOptions struct {
	// The VPC this security group is to be a part of.
	VPC VPCIdentityIntf `validate:"required"`

	// The user-defined name for this security group. If unspecified, the name will be a hyphenated list of
	// randomly-selected words. Names must be unique within the VPC the security group resides in.
	Name *string

	// The resource group to use. If unspecified, the account's [default resource
	// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
	ResourceGroup ResourceGroupIdentityIntf

	// Array of rule prototype objects for rules to be created for this security group. If unspecified, no rules will be
	// created, resulting in all traffic being denied.
	Rules []SecurityGroupRulePrototypeIntf

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewCreateSecurityGroupOptions : Instantiate CreateSecurityGroupOptions
func (*VpcV1) NewCreateSecurityGroupOptions(vpc VPCIdentityIntf) *CreateSecurityGroupOptions {
	return &CreateSecurityGroupOptions{
		VPC: vpc,
	}
}

// SetVPC : Allow user to set VPC
func (options *CreateSecurityGroupOptions) SetVPC(vpc VPCIdentityIntf) *CreateSecurityGroupOptions {
	options.VPC = vpc
	return options
}

// SetName : Allow user to set Name
func (options *CreateSecurityGroupOptions) SetName(name string) *CreateSecurityGroupOptions {
	options.Name = core.StringPtr(name)
	return options
}

// SetResourceGroup : Allow user to set ResourceGroup
func (options *CreateSecurityGroupOptions) SetResourceGroup(resourceGroup ResourceGroupIdentityIntf) *CreateSecurityGroupOptions {
	options.ResourceGroup = resourceGroup
	return options
}

// SetRules : Allow user to set Rules
func (options *CreateSecurityGroupOptions) SetRules(rules []SecurityGroupRulePrototypeIntf) *CreateSecurityGroupOptions {
	options.Rules = rules
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateSecurityGroupOptions) SetHeaders(param map[string]string) *CreateSecurityGroupOptions {
	options.Headers = param
	return options
}

// CreateSecurityGroupRuleOptions : The CreateSecurityGroupRule options.
type CreateSecurityGroupRuleOptions struct {
	// The security group identifier.
	SecurityGroupID *string `validate:"required,ne="`

	// The properties of the security group rule to be created.
	SecurityGroupRulePrototype SecurityGroupRulePrototypeIntf `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewCreateSecurityGroupRuleOptions : Instantiate CreateSecurityGroupRuleOptions
func (*VpcV1) NewCreateSecurityGroupRuleOptions(securityGroupID string, securityGroupRulePrototype SecurityGroupRulePrototypeIntf) *CreateSecurityGroupRuleOptions {
	return &CreateSecurityGroupRuleOptions{
		SecurityGroupID:            core.StringPtr(securityGroupID),
		SecurityGroupRulePrototype: securityGroupRulePrototype,
	}
}

// SetSecurityGroupID : Allow user to set SecurityGroupID
func (options *CreateSecurityGroupRuleOptions) SetSecurityGroupID(securityGroupID string) *CreateSecurityGroupRuleOptions {
	options.SecurityGroupID = core.StringPtr(securityGroupID)
	return options
}

// SetSecurityGroupRulePrototype : Allow user to set SecurityGroupRulePrototype
func (options *CreateSecurityGroupRuleOptions) SetSecurityGroupRulePrototype(securityGroupRulePrototype SecurityGroupRulePrototypeIntf) *CreateSecurityGroupRuleOptions {
	options.SecurityGroupRulePrototype = securityGroupRulePrototype
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateSecurityGroupRuleOptions) SetHeaders(param map[string]string) *CreateSecurityGroupRuleOptions {
	options.Headers = param
	return options
}

// CreateSecurityGroupTargetBindingOptions : The CreateSecurityGroupTargetBinding options.
type CreateSecurityGroupTargetBindingOptions struct {
	// The security group identifier.
	SecurityGroupID *string `validate:"required,ne="`

	// The security group target identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewCreateSecurityGroupTargetBindingOptions : Instantiate CreateSecurityGroupTargetBindingOptions
func (*VpcV1) NewCreateSecurityGroupTargetBindingOptions(securityGroupID string, id string) *CreateSecurityGroupTargetBindingOptions {
	return &CreateSecurityGroupTargetBindingOptions{
		SecurityGroupID: core.StringPtr(securityGroupID),
		ID:              core.StringPtr(id),
	}
}

// SetSecurityGroupID : Allow user to set SecurityGroupID
func (options *CreateSecurityGroupTargetBindingOptions) SetSecurityGroupID(securityGroupID string) *CreateSecurityGroupTargetBindingOptions {
	options.SecurityGroupID = core.StringPtr(securityGroupID)
	return options
}

// SetID : Allow user to set ID
func (options *CreateSecurityGroupTargetBindingOptions) SetID(id string) *CreateSecurityGroupTargetBindingOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateSecurityGroupTargetBindingOptions) SetHeaders(param map[string]string) *CreateSecurityGroupTargetBindingOptions {
	options.Headers = param
	return options
}

// CreateSubnetOptions : The CreateSubnet options.
type CreateSubnetOptions struct {
	// The subnet prototype object.
	SubnetPrototype SubnetPrototypeIntf `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewCreateSubnetOptions : Instantiate CreateSubnetOptions
func (*VpcV1) NewCreateSubnetOptions(subnetPrototype SubnetPrototypeIntf) *CreateSubnetOptions {
	return &CreateSubnetOptions{
		SubnetPrototype: subnetPrototype,
	}
}

// SetSubnetPrototype : Allow user to set SubnetPrototype
func (options *CreateSubnetOptions) SetSubnetPrototype(subnetPrototype SubnetPrototypeIntf) *CreateSubnetOptions {
	options.SubnetPrototype = subnetPrototype
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateSubnetOptions) SetHeaders(param map[string]string) *CreateSubnetOptions {
	options.Headers = param
	return options
}

// CreateSubnetReservedIPOptions : The CreateSubnetReservedIP options.
type CreateSubnetReservedIPOptions struct {
	// The subnet identifier.
	SubnetID *string `validate:"required,ne="`

	// If set to `true`, this reserved IP will be automatically deleted when the target is deleted or when the reserved IP
	// is unbound. The value cannot be set to `true` if the reserved IP is unbound.
	AutoDelete *bool

	// The user-defined name for this reserved IP. If not specified, the name will be a hyphenated list of
	// randomly-selected words. Names must be unique within the subnet the reserved IP resides in. Names beginning with
	// `ibm-` are reserved for provider-owned resources.
	Name *string

	// The target this reserved IP is to be bound to.
	Target ReservedIPTargetPrototypeIntf

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewCreateSubnetReservedIPOptions : Instantiate CreateSubnetReservedIPOptions
func (*VpcV1) NewCreateSubnetReservedIPOptions(subnetID string) *CreateSubnetReservedIPOptions {
	return &CreateSubnetReservedIPOptions{
		SubnetID: core.StringPtr(subnetID),
	}
}

// SetSubnetID : Allow user to set SubnetID
func (options *CreateSubnetReservedIPOptions) SetSubnetID(subnetID string) *CreateSubnetReservedIPOptions {
	options.SubnetID = core.StringPtr(subnetID)
	return options
}

// SetAutoDelete : Allow user to set AutoDelete
func (options *CreateSubnetReservedIPOptions) SetAutoDelete(autoDelete bool) *CreateSubnetReservedIPOptions {
	options.AutoDelete = core.BoolPtr(autoDelete)
	return options
}

// SetName : Allow user to set Name
func (options *CreateSubnetReservedIPOptions) SetName(name string) *CreateSubnetReservedIPOptions {
	options.Name = core.StringPtr(name)
	return options
}

// SetTarget : Allow user to set Target
func (options *CreateSubnetReservedIPOptions) SetTarget(target ReservedIPTargetPrototypeIntf) *CreateSubnetReservedIPOptions {
	options.Target = target
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateSubnetReservedIPOptions) SetHeaders(param map[string]string) *CreateSubnetReservedIPOptions {
	options.Headers = param
	return options
}

// CreateVolumeOptions : The CreateVolume options.
type CreateVolumeOptions struct {
	// The volume prototype object.
	VolumePrototype VolumePrototypeIntf `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewCreateVolumeOptions : Instantiate CreateVolumeOptions
func (*VpcV1) NewCreateVolumeOptions(volumePrototype VolumePrototypeIntf) *CreateVolumeOptions {
	return &CreateVolumeOptions{
		VolumePrototype: volumePrototype,
	}
}

// SetVolumePrototype : Allow user to set VolumePrototype
func (options *CreateVolumeOptions) SetVolumePrototype(volumePrototype VolumePrototypeIntf) *CreateVolumeOptions {
	options.VolumePrototype = volumePrototype
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateVolumeOptions) SetHeaders(param map[string]string) *CreateVolumeOptions {
	options.Headers = param
	return options
}

// CreateVPCAddressPrefixOptions : The CreateVPCAddressPrefix options.
type CreateVPCAddressPrefixOptions struct {
	// The VPC identifier.
	VPCID *string `validate:"required,ne="`

	// The IPv4 range of the address prefix, expressed in CIDR format. The request must not overlap with any existing
	// address prefixes in the VPC or any of the following reserved address ranges:
	//   - `127.0.0.0/8` (IPv4 loopback addresses)
	//   - `161.26.0.0/16` (IBM services)
	//   - `166.8.0.0/14` (Cloud Service Endpoints)
	//   - `169.254.0.0/16` (IPv4 link-local addresses)
	//   - `224.0.0.0/4` (IPv4 multicast addresses)
	//
	// The prefix length of the address prefix's CIDR must be between `/9` (8,388,608 addresses) and `/29` (8 addresses).
	CIDR *string `validate:"required"`

	// The zone this address prefix will reside in.
	Zone ZoneIdentityIntf `validate:"required"`

	// Indicates whether this is the default prefix for this zone in this VPC. If true, this prefix will become the default
	// prefix for this zone in this VPC. This fails if the VPC currently has a default address prefix for this zone.
	IsDefault *bool

	// The user-defined name for this address prefix. Names must be unique within the VPC the address prefix resides in. If
	// unspecified, the name will be a hyphenated list of randomly-selected words.
	Name *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewCreateVPCAddressPrefixOptions : Instantiate CreateVPCAddressPrefixOptions
func (*VpcV1) NewCreateVPCAddressPrefixOptions(vpcID string, cidr string, zone ZoneIdentityIntf) *CreateVPCAddressPrefixOptions {
	return &CreateVPCAddressPrefixOptions{
		VPCID: core.StringPtr(vpcID),
		CIDR:  core.StringPtr(cidr),
		Zone:  zone,
	}
}

// SetVPCID : Allow user to set VPCID
func (options *CreateVPCAddressPrefixOptions) SetVPCID(vpcID string) *CreateVPCAddressPrefixOptions {
	options.VPCID = core.StringPtr(vpcID)
	return options
}

// SetCIDR : Allow user to set CIDR
func (options *CreateVPCAddressPrefixOptions) SetCIDR(cidr string) *CreateVPCAddressPrefixOptions {
	options.CIDR = core.StringPtr(cidr)
	return options
}

// SetZone : Allow user to set Zone
func (options *CreateVPCAddressPrefixOptions) SetZone(zone ZoneIdentityIntf) *CreateVPCAddressPrefixOptions {
	options.Zone = zone
	return options
}

// SetIsDefault : Allow user to set IsDefault
func (options *CreateVPCAddressPrefixOptions) SetIsDefault(isDefault bool) *CreateVPCAddressPrefixOptions {
	options.IsDefault = core.BoolPtr(isDefault)
	return options
}

// SetName : Allow user to set Name
func (options *CreateVPCAddressPrefixOptions) SetName(name string) *CreateVPCAddressPrefixOptions {
	options.Name = core.StringPtr(name)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateVPCAddressPrefixOptions) SetHeaders(param map[string]string) *CreateVPCAddressPrefixOptions {
	options.Headers = param
	return options
}

// CreateVPCOptions : The CreateVPC options.
type CreateVPCOptions struct {
	// Indicates whether a default address prefix should be automatically created for each zone in this VPC. If `manual`,
	// this VPC will be created with no default address prefixes.
	AddressPrefixManagement *string

	// Indicates whether this VPC should be connected to Classic Infrastructure. If true, this VPC's resources will have
	// private network connectivity to the account's Classic Infrastructure resources. Only one VPC, per region, may be
	// connected in this way. This value is set at creation and subsequently immutable.
	ClassicAccess *bool

	// The unique user-defined name for this VPC. If unspecified, the name will be a hyphenated list of randomly-selected
	// words.
	Name *string

	// The resource group to use. If unspecified, the account's [default resource
	// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
	ResourceGroup ResourceGroupIdentityIntf

	// Allows users to set headers on API requests
	Headers map[string]string
}

// Constants associated with the CreateVPCOptions.AddressPrefixManagement property.
// Indicates whether a default address prefix should be automatically created for each zone in this VPC. If `manual`,
// this VPC will be created with no default address prefixes.
const (
	CreateVPCOptionsAddressPrefixManagementAutoConst   = "auto"
	CreateVPCOptionsAddressPrefixManagementManualConst = "manual"
)

// NewCreateVPCOptions : Instantiate CreateVPCOptions
func (*VpcV1) NewCreateVPCOptions() *CreateVPCOptions {
	return &CreateVPCOptions{}
}

// SetAddressPrefixManagement : Allow user to set AddressPrefixManagement
func (options *CreateVPCOptions) SetAddressPrefixManagement(addressPrefixManagement string) *CreateVPCOptions {
	options.AddressPrefixManagement = core.StringPtr(addressPrefixManagement)
	return options
}

// SetClassicAccess : Allow user to set ClassicAccess
func (options *CreateVPCOptions) SetClassicAccess(classicAccess bool) *CreateVPCOptions {
	options.ClassicAccess = core.BoolPtr(classicAccess)
	return options
}

// SetName : Allow user to set Name
func (options *CreateVPCOptions) SetName(name string) *CreateVPCOptions {
	options.Name = core.StringPtr(name)
	return options
}

// SetResourceGroup : Allow user to set ResourceGroup
func (options *CreateVPCOptions) SetResourceGroup(resourceGroup ResourceGroupIdentityIntf) *CreateVPCOptions {
	options.ResourceGroup = resourceGroup
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateVPCOptions) SetHeaders(param map[string]string) *CreateVPCOptions {
	options.Headers = param
	return options
}

// CreateVPCRouteOptions : The CreateVPCRoute options.
type CreateVPCRouteOptions struct {
	// The VPC identifier.
	VPCID *string `validate:"required,ne="`

	// The destination of the route. At most two routes per `zone` in a table can have the same destination, and only if
	// both routes have an `action` of `deliver` and the
	// `next_hop` is an IP address.
	Destination *string `validate:"required"`

	// The zone to apply the route to. (Traffic from subnets in this zone will be
	// subject to this route.).
	Zone ZoneIdentityIntf `validate:"required"`

	// The action to perform with a packet matching the route:
	// - `delegate`: delegate to the system's built-in routes
	// - `delegate_vpc`: delegate to the system's built-in routes, ignoring Internet-bound
	//   routes
	// - `deliver`: deliver the packet to the specified `next_hop`
	// - `drop`: drop the packet.
	Action *string

	// The user-defined name for this route. If unspecified, the name will be a hyphenated list of randomly-selected words.
	// Names must be unique within the VPC routing table the route resides in.
	Name *string

	// If `action` is `deliver`, the next hop that packets will be delivered to.  For
	// other `action` values, it must be omitted or specified as `0.0.0.0`.
	NextHop RouteNextHopPrototypeIntf

	// Allows users to set headers on API requests
	Headers map[string]string
}

// Constants associated with the CreateVPCRouteOptions.Action property.
// The action to perform with a packet matching the route:
// - `delegate`: delegate to the system's built-in routes
// - `delegate_vpc`: delegate to the system's built-in routes, ignoring Internet-bound
//   routes
// - `deliver`: deliver the packet to the specified `next_hop`
// - `drop`: drop the packet.
const (
	CreateVPCRouteOptionsActionDelegateConst    = "delegate"
	CreateVPCRouteOptionsActionDelegateVPCConst = "delegate_vpc"
	CreateVPCRouteOptionsActionDeliverConst     = "deliver"
	CreateVPCRouteOptionsActionDropConst        = "drop"
)

// NewCreateVPCRouteOptions : Instantiate CreateVPCRouteOptions
func (*VpcV1) NewCreateVPCRouteOptions(vpcID string, destination string, zone ZoneIdentityIntf) *CreateVPCRouteOptions {
	return &CreateVPCRouteOptions{
		VPCID:       core.StringPtr(vpcID),
		Destination: core.StringPtr(destination),
		Zone:        zone,
	}
}

// SetVPCID : Allow user to set VPCID
func (options *CreateVPCRouteOptions) SetVPCID(vpcID string) *CreateVPCRouteOptions {
	options.VPCID = core.StringPtr(vpcID)
	return options
}

// SetDestination : Allow user to set Destination
func (options *CreateVPCRouteOptions) SetDestination(destination string) *CreateVPCRouteOptions {
	options.Destination = core.StringPtr(destination)
	return options
}

// SetZone : Allow user to set Zone
func (options *CreateVPCRouteOptions) SetZone(zone ZoneIdentityIntf) *CreateVPCRouteOptions {
	options.Zone = zone
	return options
}

// SetAction : Allow user to set Action
func (options *CreateVPCRouteOptions) SetAction(action string) *CreateVPCRouteOptions {
	options.Action = core.StringPtr(action)
	return options
}

// SetName : Allow user to set Name
func (options *CreateVPCRouteOptions) SetName(name string) *CreateVPCRouteOptions {
	options.Name = core.StringPtr(name)
	return options
}

// SetNextHop : Allow user to set NextHop
func (options *CreateVPCRouteOptions) SetNextHop(nextHop RouteNextHopPrototypeIntf) *CreateVPCRouteOptions {
	options.NextHop = nextHop
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateVPCRouteOptions) SetHeaders(param map[string]string) *CreateVPCRouteOptions {
	options.Headers = param
	return options
}

// CreateVPCRoutingTableOptions : The CreateVPCRoutingTable options.
type CreateVPCRoutingTableOptions struct {
	// The VPC identifier.
	VPCID *string `validate:"required,ne="`

	// The user-defined name for this routing table. Names must be unique within the VPC the routing table resides in. If
	// unspecified, the name will be a hyphenated list of randomly-selected words.
	Name *string

	// If set to `true`, this routing table will be used to route traffic that originates from [Direct
	// Link](https://cloud.ibm.com/docs/dl/) to this VPC. For this to succeed, the VPC must not already have a routing
	// table with this property set to `true`.
	//
	// Incoming traffic will be routed according to the routing table with one exception: routes with an `action` of
	// `deliver` are treated as `drop` unless the `next_hop` is an IP address within the VPC's address prefix ranges.
	// Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP address or a VPN gateway
	// connection, the packet will be dropped.
	RouteDirectLinkIngress *bool

	// If set to `true`, this routing table will be used to route traffic that originates from [Transit
	// Gateway](https://cloud.ibm.com/cloud/transit-gateway/) to this VPC. For this to succeed, the VPC must not already
	// have a routing table with this property set to `true`.
	//
	// Incoming traffic will be routed according to the routing table with one exception: routes with an `action` of
	// `deliver` are treated as `drop` unless the `next_hop` is an IP address within the VPC's address prefix ranges.
	// Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP address or a VPN gateway
	// connection, the packet will be dropped.
	//
	// If [Classic Access](https://cloud.ibm.com/docs/vpc?topic=vpc-setting-up-access-to-classic-infrastructure) is enabled
	// for this VPC, and this property is set to `true`, its incoming traffic will also be routed according to this routing
	// table.
	RouteTransitGatewayIngress *bool

	// If set to `true`, this routing table will be used to route traffic that originates from subnets in other zones in
	// this VPC. For this to succeed, the VPC must not already have a routing table with this property set to `true`.
	//
	// Incoming traffic will be routed according to the routing table with one exception: routes with an `action` of
	// `deliver` are treated as `drop` unless the `next_hop` is an IP address within the VPC's address prefix ranges.
	// Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP address or a VPN gateway
	// connection, the packet will be dropped.
	RouteVPCZoneIngress *bool

	// Array of route prototype objects for routes to create for this routing table. If unspecified, the routing table will
	// be created with no routes.
	Routes []RoutePrototype

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewCreateVPCRoutingTableOptions : Instantiate CreateVPCRoutingTableOptions
func (*VpcV1) NewCreateVPCRoutingTableOptions(vpcID string) *CreateVPCRoutingTableOptions {
	return &CreateVPCRoutingTableOptions{
		VPCID: core.StringPtr(vpcID),
	}
}

// SetVPCID : Allow user to set VPCID
func (options *CreateVPCRoutingTableOptions) SetVPCID(vpcID string) *CreateVPCRoutingTableOptions {
	options.VPCID = core.StringPtr(vpcID)
	return options
}

// SetName : Allow user to set Name
func (options *CreateVPCRoutingTableOptions) SetName(name string) *CreateVPCRoutingTableOptions {
	options.Name = core.StringPtr(name)
	return options
}

// SetRouteDirectLinkIngress : Allow user to set RouteDirectLinkIngress
func (options *CreateVPCRoutingTableOptions) SetRouteDirectLinkIngress(routeDirectLinkIngress bool) *CreateVPCRoutingTableOptions {
	options.RouteDirectLinkIngress = core.BoolPtr(routeDirectLinkIngress)
	return options
}

// SetRouteTransitGatewayIngress : Allow user to set RouteTransitGatewayIngress
func (options *CreateVPCRoutingTableOptions) SetRouteTransitGatewayIngress(routeTransitGatewayIngress bool) *CreateVPCRoutingTableOptions {
	options.RouteTransitGatewayIngress = core.BoolPtr(routeTransitGatewayIngress)
	return options
}

// SetRouteVPCZoneIngress : Allow user to set RouteVPCZoneIngress
func (options *CreateVPCRoutingTableOptions) SetRouteVPCZoneIngress(routeVPCZoneIngress bool) *CreateVPCRoutingTableOptions {
	options.RouteVPCZoneIngress = core.BoolPtr(routeVPCZoneIngress)
	return options
}

// SetRoutes : Allow user to set Routes
func (options *CreateVPCRoutingTableOptions) SetRoutes(routes []RoutePrototype) *CreateVPCRoutingTableOptions {
	options.Routes = routes
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateVPCRoutingTableOptions) SetHeaders(param map[string]string) *CreateVPCRoutingTableOptions {
	options.Headers = param
	return options
}

// CreateVPCRoutingTableRouteOptions : The CreateVPCRoutingTableRoute options.
type CreateVPCRoutingTableRouteOptions struct {
	// The VPC identifier.
	VPCID *string `validate:"required,ne="`

	// The routing table identifier.
	RoutingTableID *string `validate:"required,ne="`

	// The destination of the route. At most two routes per `zone` in a table can have the same destination, and only if
	// both routes have an `action` of `deliver` and the
	// `next_hop` is an IP address.
	Destination *string `validate:"required"`

	// The zone to apply the route to. (Traffic from subnets in this zone will be
	// subject to this route.).
	Zone ZoneIdentityIntf `validate:"required"`

	// The action to perform with a packet matching the route:
	// - `delegate`: delegate to the system's built-in routes
	// - `delegate_vpc`: delegate to the system's built-in routes, ignoring Internet-bound
	//   routes
	// - `deliver`: deliver the packet to the specified `next_hop`
	// - `drop`: drop the packet.
	Action *string

	// The user-defined name for this route. If unspecified, the name will be a hyphenated list of randomly-selected words.
	// Names must be unique within the VPC routing table the route resides in.
	Name *string

	// If `action` is `deliver`, the next hop that packets will be delivered to.  For
	// other `action` values, it must be omitted or specified as `0.0.0.0`.
	NextHop RouteNextHopPrototypeIntf

	// Allows users to set headers on API requests
	Headers map[string]string
}

// Constants associated with the CreateVPCRoutingTableRouteOptions.Action property.
// The action to perform with a packet matching the route:
// - `delegate`: delegate to the system's built-in routes
// - `delegate_vpc`: delegate to the system's built-in routes, ignoring Internet-bound
//   routes
// - `deliver`: deliver the packet to the specified `next_hop`
// - `drop`: drop the packet.
const (
	CreateVPCRoutingTableRouteOptionsActionDelegateConst    = "delegate"
	CreateVPCRoutingTableRouteOptionsActionDelegateVPCConst = "delegate_vpc"
	CreateVPCRoutingTableRouteOptionsActionDeliverConst     = "deliver"
	CreateVPCRoutingTableRouteOptionsActionDropConst        = "drop"
)

// NewCreateVPCRoutingTableRouteOptions : Instantiate CreateVPCRoutingTableRouteOptions
func (*VpcV1) NewCreateVPCRoutingTableRouteOptions(vpcID string, routingTableID string, destination string, zone ZoneIdentityIntf) *CreateVPCRoutingTableRouteOptions {
	return &CreateVPCRoutingTableRouteOptions{
		VPCID:          core.StringPtr(vpcID),
		RoutingTableID: core.StringPtr(routingTableID),
		Destination:    core.StringPtr(destination),
		Zone:           zone,
	}
}

// SetVPCID : Allow user to set VPCID
func (options *CreateVPCRoutingTableRouteOptions) SetVPCID(vpcID string) *CreateVPCRoutingTableRouteOptions {
	options.VPCID = core.StringPtr(vpcID)
	return options
}

// SetRoutingTableID : Allow user to set RoutingTableID
func (options *CreateVPCRoutingTableRouteOptions) SetRoutingTableID(routingTableID string) *CreateVPCRoutingTableRouteOptions {
	options.RoutingTableID = core.StringPtr(routingTableID)
	return options
}

// SetDestination : Allow user to set Destination
func (options *CreateVPCRoutingTableRouteOptions) SetDestination(destination string) *CreateVPCRoutingTableRouteOptions {
	options.Destination = core.StringPtr(destination)
	return options
}

// SetZone : Allow user to set Zone
func (options *CreateVPCRoutingTableRouteOptions) SetZone(zone ZoneIdentityIntf) *CreateVPCRoutingTableRouteOptions {
	options.Zone = zone
	return options
}

// SetAction : Allow user to set Action
func (options *CreateVPCRoutingTableRouteOptions) SetAction(action string) *CreateVPCRoutingTableRouteOptions {
	options.Action = core.StringPtr(action)
	return options
}

// SetName : Allow user to set Name
func (options *CreateVPCRoutingTableRouteOptions) SetName(name string) *CreateVPCRoutingTableRouteOptions {
	options.Name = core.StringPtr(name)
	return options
}

// SetNextHop : Allow user to set NextHop
func (options *CreateVPCRoutingTableRouteOptions) SetNextHop(nextHop RouteNextHopPrototypeIntf) *CreateVPCRoutingTableRouteOptions {
	options.NextHop = nextHop
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateVPCRoutingTableRouteOptions) SetHeaders(param map[string]string) *CreateVPCRoutingTableRouteOptions {
	options.Headers = param
	return options
}

// CreateVPNGatewayConnectionOptions : The CreateVPNGatewayConnection options.
type CreateVPNGatewayConnectionOptions struct {
	// The VPN gateway identifier.
	VPNGatewayID *string `validate:"required,ne="`

	// The VPN gateway connection prototype object.
	VPNGatewayConnectionPrototype VPNGatewayConnectionPrototypeIntf `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewCreateVPNGatewayConnectionOptions : Instantiate CreateVPNGatewayConnectionOptions
func (*VpcV1) NewCreateVPNGatewayConnectionOptions(vpnGatewayID string, vpnGatewayConnectionPrototype VPNGatewayConnectionPrototypeIntf) *CreateVPNGatewayConnectionOptions {
	return &CreateVPNGatewayConnectionOptions{
		VPNGatewayID:                  core.StringPtr(vpnGatewayID),
		VPNGatewayConnectionPrototype: vpnGatewayConnectionPrototype,
	}
}

// SetVPNGatewayID : Allow user to set VPNGatewayID
func (options *CreateVPNGatewayConnectionOptions) SetVPNGatewayID(vpnGatewayID string) *CreateVPNGatewayConnectionOptions {
	options.VPNGatewayID = core.StringPtr(vpnGatewayID)
	return options
}

// SetVPNGatewayConnectionPrototype : Allow user to set VPNGatewayConnectionPrototype
func (options *CreateVPNGatewayConnectionOptions) SetVPNGatewayConnectionPrototype(vpnGatewayConnectionPrototype VPNGatewayConnectionPrototypeIntf) *CreateVPNGatewayConnectionOptions {
	options.VPNGatewayConnectionPrototype = vpnGatewayConnectionPrototype
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateVPNGatewayConnectionOptions) SetHeaders(param map[string]string) *CreateVPNGatewayConnectionOptions {
	options.Headers = param
	return options
}

// CreateVPNGatewayOptions : The CreateVPNGateway options.
type CreateVPNGatewayOptions struct {
	// The VPN gateway prototype object.
	VPNGatewayPrototype VPNGatewayPrototypeIntf `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewCreateVPNGatewayOptions : Instantiate CreateVPNGatewayOptions
func (*VpcV1) NewCreateVPNGatewayOptions(vpnGatewayPrototype VPNGatewayPrototypeIntf) *CreateVPNGatewayOptions {
	return &CreateVPNGatewayOptions{
		VPNGatewayPrototype: vpnGatewayPrototype,
	}
}

// SetVPNGatewayPrototype : Allow user to set VPNGatewayPrototype
func (options *CreateVPNGatewayOptions) SetVPNGatewayPrototype(vpnGatewayPrototype VPNGatewayPrototypeIntf) *CreateVPNGatewayOptions {
	options.VPNGatewayPrototype = vpnGatewayPrototype
	return options
}

// SetHeaders : Allow user to set Headers
func (options *CreateVPNGatewayOptions) SetHeaders(param map[string]string) *CreateVPNGatewayOptions {
	options.Headers = param
	return options
}

// DedicatedHost : DedicatedHost struct
type DedicatedHost struct {
	// The amount of memory in gibibytes that is currently available for instances.
	AvailableMemory *int64 `json:"available_memory" validate:"required"`

	// The available VCPU for the dedicated host.
	AvailableVcpu *Vcpu `json:"available_vcpu" validate:"required"`

	// The date and time that the dedicated host was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The CRN for this dedicated host.
	CRN *string `json:"crn" validate:"required"`

	// Collection of the dedicated host's disks.
	Disks []DedicatedHostDisk `json:"disks" validate:"required"`

	// The dedicated host group this dedicated host is in.
	Group *DedicatedHostGroupReference `json:"group" validate:"required"`

	// The URL for this dedicated host.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this dedicated host.
	ID *string `json:"id" validate:"required"`

	// If set to true, instances can be placed on this dedicated host.
	InstancePlacementEnabled *bool `json:"instance_placement_enabled" validate:"required"`

	// Array of instances that are allocated to this dedicated host.
	Instances []InstanceReference `json:"instances" validate:"required"`

	// The lifecycle state of the dedicated host resource.
	LifecycleState *string `json:"lifecycle_state" validate:"required"`

	// The total amount of memory in gibibytes for this host.
	Memory *int64 `json:"memory" validate:"required"`

	// The unique user-defined name for this dedicated host. If unspecified, the name will be a hyphenated list of
	// randomly-selected words.
	Name *string `json:"name" validate:"required"`

	// The profile this dedicated host uses.
	Profile *DedicatedHostProfileReference `json:"profile" validate:"required"`

	// Indicates whether this dedicated host is available for instance creation.
	Provisionable *bool `json:"provisionable" validate:"required"`

	// The resource group for this dedicated host.
	ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`

	// The type of resource referenced.
	ResourceType *string `json:"resource_type" validate:"required"`

	// The total number of sockets for this host.
	SocketCount *int64 `json:"socket_count" validate:"required"`

	// The administrative state of the dedicated host.
	//
	// The enumerated values for this property are expected to expand in the future. When processing this property, check
	// for and log unknown values. Optionally halt processing and surface the error, or bypass the dedicated host on which
	// the unexpected property value was encountered.
	State *string `json:"state" validate:"required"`

	// Array of instance profiles that can be used by instances placed on this dedicated host.
	SupportedInstanceProfiles []InstanceProfileReference `json:"supported_instance_profiles" validate:"required"`

	// The total VCPU of the dedicated host.
	Vcpu *Vcpu `json:"vcpu" validate:"required"`

	// The zone this dedicated host resides in.
	Zone *ZoneReference `json:"zone" validate:"required"`
}

// Constants associated with the DedicatedHost.LifecycleState property.
// The lifecycle state of the dedicated host resource.
const (
	DedicatedHostLifecycleStateDeletedConst   = "deleted"
	DedicatedHostLifecycleStateDeletingConst  = "deleting"
	DedicatedHostLifecycleStateFailedConst    = "failed"
	DedicatedHostLifecycleStatePendingConst   = "pending"
	DedicatedHostLifecycleStateStableConst    = "stable"
	DedicatedHostLifecycleStateSuspendedConst = "suspended"
	DedicatedHostLifecycleStateUpdatingConst  = "updating"
	DedicatedHostLifecycleStateWaitingConst   = "waiting"
)

// Constants associated with the DedicatedHost.ResourceType property.
// The type of resource referenced.
const (
	DedicatedHostResourceTypeDedicatedHostConst = "dedicated_host"
)

// Constants associated with the DedicatedHost.State property.
// The administrative state of the dedicated host.
//
// The enumerated values for this property are expected to expand in the future. When processing this property, check
// for and log unknown values. Optionally halt processing and surface the error, or bypass the dedicated host on which
// the unexpected property value was encountered.
const (
	DedicatedHostStateAvailableConst   = "available"
	DedicatedHostStateDegradedConst    = "degraded"
	DedicatedHostStateMigratingConst   = "migrating"
	DedicatedHostStateUnavailableConst = "unavailable"
)

// UnmarshalDedicatedHost unmarshals an instance of DedicatedHost from the specified map of raw messages.
func UnmarshalDedicatedHost(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHost)
	err = core.UnmarshalPrimitive(m, "available_memory", &obj.AvailableMemory)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "available_vcpu", &obj.AvailableVcpu, UnmarshalVcpu)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "disks", &obj.Disks, UnmarshalDedicatedHostDisk)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalDedicatedHostGroupReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "instance_placement_enabled", &obj.InstancePlacementEnabled)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "instances", &obj.Instances, UnmarshalInstanceReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "memory", &obj.Memory)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalDedicatedHostProfileReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "provisionable", &obj.Provisionable)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "socket_count", &obj.SocketCount)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "state", &obj.State)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "supported_instance_profiles", &obj.SupportedInstanceProfiles, UnmarshalInstanceProfileReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "vcpu", &obj.Vcpu, UnmarshalVcpu)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneReference)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostCollection : DedicatedHostCollection struct
type DedicatedHostCollection struct {
	// Collection of dedicated hosts.
	DedicatedHosts []DedicatedHost `json:"dedicated_hosts" validate:"required"`

	// A link to the first page of resources.
	First *DedicatedHostCollectionFirst `json:"first" validate:"required"`

	// The maximum number of resources that can be returned by the request.
	Limit *int64 `json:"limit" validate:"required"`

	// A link to the next page of resources. This property is present for all pages
	// except the last page.
	Next *DedicatedHostCollectionNext `json:"next,omitempty"`

	// The total number of resources across all pages.
	TotalCount *int64 `json:"total_count" validate:"required"`
}

// UnmarshalDedicatedHostCollection unmarshals an instance of DedicatedHostCollection from the specified map of raw messages.
func UnmarshalDedicatedHostCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostCollection)
	err = core.UnmarshalModel(m, "dedicated_hosts", &obj.DedicatedHosts, UnmarshalDedicatedHost)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalDedicatedHostCollectionFirst)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalDedicatedHostCollectionNext)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostCollectionFirst : A link to the first page of resources.
type DedicatedHostCollectionFirst struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalDedicatedHostCollectionFirst unmarshals an instance of DedicatedHostCollectionFirst from the specified map of raw messages.
func UnmarshalDedicatedHostCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostCollectionFirst)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
type DedicatedHostCollectionNext struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalDedicatedHostCollectionNext unmarshals an instance of DedicatedHostCollectionNext from the specified map of raw messages.
func UnmarshalDedicatedHostCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostCollectionNext)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostDisk : DedicatedHostDisk struct
type DedicatedHostDisk struct {
	// The remaining space left for instance placement in GB (gigabytes).
	Available *int64 `json:"available" validate:"required"`

	// The date and time that the disk was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The URL for this disk.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this disk.
	ID *string `json:"id" validate:"required"`

	// Instance disks that are on this dedicated host disk.
	InstanceDisks []InstanceDiskReference `json:"instance_disks" validate:"required"`

	// The disk interface used for attaching the disk
	//
	// The enumerated values for this property are expected to expand in the future. When processing this property, check
	// for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the
	// unexpected property value was encountered.
	InterfaceType *string `json:"interface_type" validate:"required"`

	// The lifecycle state of this dedicated host disk.
	LifecycleState *string `json:"lifecycle_state,omitempty"`

	// The user-defined or system-provided name for this disk.
	Name *string `json:"name" validate:"required"`

	// Indicates whether this dedicated host disk is available for instance disk creation.
	Provisionable *bool `json:"provisionable" validate:"required"`

	// The type of resource referenced.
	ResourceType *string `json:"resource_type" validate:"required"`

	// The size of the disk in GB (gigabytes).
	Size *int64 `json:"size" validate:"required"`

	// The instance disk interfaces supported for this dedicated host disk.
	SupportedInstanceInterfaceTypes []string `json:"supported_instance_interface_types" validate:"required"`
}

// Constants associated with the DedicatedHostDisk.InterfaceType property.
// The disk interface used for attaching the disk
//
// The enumerated values for this property are expected to expand in the future. When processing this property, check
// for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the
// unexpected property value was encountered.
const (
	DedicatedHostDiskInterfaceTypeNvmeConst = "nvme"
)

// Constants associated with the DedicatedHostDisk.LifecycleState property.
// The lifecycle state of this dedicated host disk.
const (
	DedicatedHostDiskLifecycleStateDeletedConst   = "deleted"
	DedicatedHostDiskLifecycleStateDeletingConst  = "deleting"
	DedicatedHostDiskLifecycleStateFailedConst    = "failed"
	DedicatedHostDiskLifecycleStatePendingConst   = "pending"
	DedicatedHostDiskLifecycleStateStableConst    = "stable"
	DedicatedHostDiskLifecycleStateSuspendedConst = "suspended"
	DedicatedHostDiskLifecycleStateUpdatingConst  = "updating"
	DedicatedHostDiskLifecycleStateWaitingConst   = "waiting"
)

// Constants associated with the DedicatedHostDisk.ResourceType property.
// The type of resource referenced.
const (
	DedicatedHostDiskResourceTypeDedicatedHostDiskConst = "dedicated_host_disk"
)

// Constants associated with the DedicatedHostDisk.SupportedInstanceInterfaceTypes property.
// The disk interface used for attaching the disk.
//
// The enumerated values for this property are expected to expand in the future. When processing this property, check
// for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the
// unexpected property value was encountered.
const (
	DedicatedHostDiskSupportedInstanceInterfaceTypesNvmeConst      = "nvme"
	DedicatedHostDiskSupportedInstanceInterfaceTypesVirtioBlkConst = "virtio_blk"
)

// UnmarshalDedicatedHostDisk unmarshals an instance of DedicatedHostDisk from the specified map of raw messages.
func UnmarshalDedicatedHostDisk(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostDisk)
	err = core.UnmarshalPrimitive(m, "available", &obj.Available)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "instance_disks", &obj.InstanceDisks, UnmarshalInstanceDiskReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "interface_type", &obj.InterfaceType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "provisionable", &obj.Provisionable)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "size", &obj.Size)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "supported_instance_interface_types", &obj.SupportedInstanceInterfaceTypes)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostDiskCollection : DedicatedHostDiskCollection struct
type DedicatedHostDiskCollection struct {
	// Collection of the dedicated host's disks.
	Disks []DedicatedHostDisk `json:"disks" validate:"required"`
}

// UnmarshalDedicatedHostDiskCollection unmarshals an instance of DedicatedHostDiskCollection from the specified map of raw messages.
func UnmarshalDedicatedHostDiskCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostDiskCollection)
	err = core.UnmarshalModel(m, "disks", &obj.Disks, UnmarshalDedicatedHostDisk)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostDiskPatch : DedicatedHostDiskPatch struct
type DedicatedHostDiskPatch struct {
	// The user-defined name for this disk.
	Name *string `json:"name,omitempty"`
}

// UnmarshalDedicatedHostDiskPatch unmarshals an instance of DedicatedHostDiskPatch from the specified map of raw messages.
func UnmarshalDedicatedHostDiskPatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostDiskPatch)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the DedicatedHostDiskPatch
func (dedicatedHostDiskPatch *DedicatedHostDiskPatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(dedicatedHostDiskPatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// DedicatedHostGroup : DedicatedHostGroup struct
type DedicatedHostGroup struct {
	// The dedicated host profile class for hosts in this group.
	Class *string `json:"class" validate:"required"`

	// The date and time that the dedicated host group was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The CRN for this dedicated host group.
	CRN *string `json:"crn" validate:"required"`

	// The dedicated hosts that are in this dedicated host group.
	DedicatedHosts []DedicatedHostReference `json:"dedicated_hosts" validate:"required"`

	// The dedicated host profile family for hosts in this group.
	Family *string `json:"family" validate:"required"`

	// The URL for this dedicated host group.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this dedicated host group.
	ID *string `json:"id" validate:"required"`

	// The unique user-defined name for this dedicated host group. If unspecified, the name will be a hyphenated list of
	// randomly-selected words.
	Name *string `json:"name" validate:"required"`

	// The resource group for this dedicated host group.
	ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`

	// The type of resource referenced.
	ResourceType *string `json:"resource_type" validate:"required"`

	// Array of instance profiles that can be used by instances placed on this dedicated host group.
	SupportedInstanceProfiles []InstanceProfileReference `json:"supported_instance_profiles" validate:"required"`

	// The zone this dedicated host group resides in.
	Zone *ZoneReference `json:"zone" validate:"required"`
}

// Constants associated with the DedicatedHostGroup.Family property.
// The dedicated host profile family for hosts in this group.
const (
	DedicatedHostGroupFamilyBalancedConst = "balanced"
	DedicatedHostGroupFamilyComputeConst  = "compute"
	DedicatedHostGroupFamilyMemoryConst   = "memory"
)

// Constants associated with the DedicatedHostGroup.ResourceType property.
// The type of resource referenced.
const (
	DedicatedHostGroupResourceTypeDedicatedHostGroupConst = "dedicated_host_group"
)

// UnmarshalDedicatedHostGroup unmarshals an instance of DedicatedHostGroup from the specified map of raw messages.
func UnmarshalDedicatedHostGroup(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostGroup)
	err = core.UnmarshalPrimitive(m, "class", &obj.Class)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "dedicated_hosts", &obj.DedicatedHosts, UnmarshalDedicatedHostReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "family", &obj.Family)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "supported_instance_profiles", &obj.SupportedInstanceProfiles, UnmarshalInstanceProfileReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneReference)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostGroupCollection : DedicatedHostGroupCollection struct
type DedicatedHostGroupCollection struct {
	// A link to the first page of resources.
	First *DedicatedHostGroupCollectionFirst `json:"first" validate:"required"`

	// Collection of dedicated host groups.
	Groups []DedicatedHostGroup `json:"groups" validate:"required"`

	// The maximum number of resources that can be returned by the request.
	Limit *int64 `json:"limit" validate:"required"`

	// A link to the next page of resources. This property is present for all pages
	// except the last page.
	Next *DedicatedHostGroupCollectionNext `json:"next,omitempty"`

	// The total number of resources across all pages.
	TotalCount *int64 `json:"total_count" validate:"required"`
}

// UnmarshalDedicatedHostGroupCollection unmarshals an instance of DedicatedHostGroupCollection from the specified map of raw messages.
func UnmarshalDedicatedHostGroupCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostGroupCollection)
	err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalDedicatedHostGroupCollectionFirst)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "groups", &obj.Groups, UnmarshalDedicatedHostGroup)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalDedicatedHostGroupCollectionNext)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostGroupCollectionFirst : A link to the first page of resources.
type DedicatedHostGroupCollectionFirst struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalDedicatedHostGroupCollectionFirst unmarshals an instance of DedicatedHostGroupCollectionFirst from the specified map of raw messages.
func UnmarshalDedicatedHostGroupCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostGroupCollectionFirst)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostGroupCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
type DedicatedHostGroupCollectionNext struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalDedicatedHostGroupCollectionNext unmarshals an instance of DedicatedHostGroupCollectionNext from the specified map of raw messages.
func UnmarshalDedicatedHostGroupCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostGroupCollectionNext)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostGroupIdentity : Identifies a dedicated host group by a unique property.
// Models which "extend" this model:
// - DedicatedHostGroupIdentityByID
// - DedicatedHostGroupIdentityByCRN
// - DedicatedHostGroupIdentityByHref
type DedicatedHostGroupIdentity struct {
	// The unique identifier for this dedicated host group.
	ID *string `json:"id,omitempty"`

	// The CRN for this dedicated host group.
	CRN *string `json:"crn,omitempty"`

	// The URL for this dedicated host group.
	Href *string `json:"href,omitempty"`
}

func (*DedicatedHostGroupIdentity) isaDedicatedHostGroupIdentity() bool {
	return true
}

type DedicatedHostGroupIdentityIntf interface {
	isaDedicatedHostGroupIdentity() bool
}

// UnmarshalDedicatedHostGroupIdentity unmarshals an instance of DedicatedHostGroupIdentity from the specified map of raw messages.
func UnmarshalDedicatedHostGroupIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostGroupIdentity)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostGroupPatch : DedicatedHostGroupPatch struct
type DedicatedHostGroupPatch struct {
	// The unique user-defined name for this dedicated host group. If unspecified, the name will be a hyphenated list of
	// randomly-selected words.
	Name *string `json:"name,omitempty"`
}

// UnmarshalDedicatedHostGroupPatch unmarshals an instance of DedicatedHostGroupPatch from the specified map of raw messages.
func UnmarshalDedicatedHostGroupPatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostGroupPatch)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the DedicatedHostGroupPatch
func (dedicatedHostGroupPatch *DedicatedHostGroupPatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(dedicatedHostGroupPatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// DedicatedHostGroupPrototypeDedicatedHostByZoneContext : DedicatedHostGroupPrototypeDedicatedHostByZoneContext struct
type DedicatedHostGroupPrototypeDedicatedHostByZoneContext struct {
	// The unique user-defined name for this dedicated host group. If unspecified, the name will be a hyphenated list of
	// randomly-selected words.
	Name *string `json:"name,omitempty"`

	// The resource group to use. If unspecified, the host's resource group is used.
	ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`
}

// UnmarshalDedicatedHostGroupPrototypeDedicatedHostByZoneContext unmarshals an instance of DedicatedHostGroupPrototypeDedicatedHostByZoneContext from the specified map of raw messages.
func UnmarshalDedicatedHostGroupPrototypeDedicatedHostByZoneContext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostGroupPrototypeDedicatedHostByZoneContext)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostGroupReference : DedicatedHostGroupReference struct
type DedicatedHostGroupReference struct {
	// The CRN for this dedicated host group.
	CRN *string `json:"crn" validate:"required"`

	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *DedicatedHostGroupReferenceDeleted `json:"deleted,omitempty"`

	// The URL for this dedicated host group.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this dedicated host group.
	ID *string `json:"id" validate:"required"`

	// The unique user-defined name for this dedicated host group. If unspecified, the name will be a hyphenated list of
	// randomly-selected words.
	Name *string `json:"name" validate:"required"`

	// The type of resource referenced.
	ResourceType *string `json:"resource_type" validate:"required"`
}

// Constants associated with the DedicatedHostGroupReference.ResourceType property.
// The type of resource referenced.
const (
	DedicatedHostGroupReferenceResourceTypeDedicatedHostGroupConst = "dedicated_host_group"
)

// UnmarshalDedicatedHostGroupReference unmarshals an instance of DedicatedHostGroupReference from the specified map of raw messages.
func UnmarshalDedicatedHostGroupReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostGroupReference)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalDedicatedHostGroupReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostGroupReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type DedicatedHostGroupReferenceDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalDedicatedHostGroupReferenceDeleted unmarshals an instance of DedicatedHostGroupReferenceDeleted from the specified map of raw messages.
func UnmarshalDedicatedHostGroupReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostGroupReferenceDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostPatch : DedicatedHostPatch struct
type DedicatedHostPatch struct {
	// If set to true, instances can be placed on this dedicated host.
	InstancePlacementEnabled *bool `json:"instance_placement_enabled,omitempty"`

	// The unique user-defined name for this dedicated host. If unspecified, the name will be a hyphenated list of
	// randomly-selected words.
	Name *string `json:"name,omitempty"`
}

// UnmarshalDedicatedHostPatch unmarshals an instance of DedicatedHostPatch from the specified map of raw messages.
func UnmarshalDedicatedHostPatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostPatch)
	err = core.UnmarshalPrimitive(m, "instance_placement_enabled", &obj.InstancePlacementEnabled)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the DedicatedHostPatch
func (dedicatedHostPatch *DedicatedHostPatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(dedicatedHostPatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// DedicatedHostProfile : DedicatedHostProfile struct
type DedicatedHostProfile struct {
	// The product class this dedicated host profile belongs to.
	Class *string `json:"class" validate:"required"`

	// Collection of the dedicated host profile's disks.
	Disks []DedicatedHostProfileDisk `json:"disks" validate:"required"`

	// The product family this dedicated host profile belongs to
	//
	// The enumerated values for this property are expected to expand in the future. When processing this property, check
	// for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the
	// unexpected property value was encountered.
	Family *string `json:"family" validate:"required"`

	// The URL for this dedicated host.
	Href *string `json:"href" validate:"required"`

	Memory DedicatedHostProfileMemoryIntf `json:"memory" validate:"required"`

	// The globally unique name for this dedicated host profile.
	Name *string `json:"name" validate:"required"`

	SocketCount DedicatedHostProfileSocketIntf `json:"socket_count" validate:"required"`

	// Array of instance profiles that can be used by instances placed on dedicated hosts with this profile.
	SupportedInstanceProfiles []InstanceProfileReference `json:"supported_instance_profiles" validate:"required"`

	VcpuArchitecture *DedicatedHostProfileVcpuArchitecture `json:"vcpu_architecture" validate:"required"`

	VcpuCount DedicatedHostProfileVcpuIntf `json:"vcpu_count" validate:"required"`
}

// Constants associated with the DedicatedHostProfile.Family property.
// The product family this dedicated host profile belongs to
//
// The enumerated values for this property are expected to expand in the future. When processing this property, check
// for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the
// unexpected property value was encountered.
const (
	DedicatedHostProfileFamilyBalancedConst = "balanced"
	DedicatedHostProfileFamilyComputeConst  = "compute"
	DedicatedHostProfileFamilyMemoryConst   = "memory"
)

// UnmarshalDedicatedHostProfile unmarshals an instance of DedicatedHostProfile from the specified map of raw messages.
func UnmarshalDedicatedHostProfile(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostProfile)
	err = core.UnmarshalPrimitive(m, "class", &obj.Class)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "disks", &obj.Disks, UnmarshalDedicatedHostProfileDisk)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "family", &obj.Family)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "memory", &obj.Memory, UnmarshalDedicatedHostProfileMemory)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "socket_count", &obj.SocketCount, UnmarshalDedicatedHostProfileSocket)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "supported_instance_profiles", &obj.SupportedInstanceProfiles, UnmarshalInstanceProfileReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "vcpu_architecture", &obj.VcpuArchitecture, UnmarshalDedicatedHostProfileVcpuArchitecture)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "vcpu_count", &obj.VcpuCount, UnmarshalDedicatedHostProfileVcpu)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostProfileCollection : DedicatedHostProfileCollection struct
type DedicatedHostProfileCollection struct {
	// A link to the first page of resources.
	First *DedicatedHostProfileCollectionFirst `json:"first" validate:"required"`

	// The maximum number of resources that can be returned by the request.
	Limit *int64 `json:"limit" validate:"required"`

	// A link to the next page of resources. This property is present for all pages
	// except the last page.
	Next *DedicatedHostProfileCollectionNext `json:"next,omitempty"`

	// Collection of dedicated host profiles.
	Profiles []DedicatedHostProfile `json:"profiles" validate:"required"`

	// The total number of resources across all pages.
	TotalCount *int64 `json:"total_count" validate:"required"`
}

// UnmarshalDedicatedHostProfileCollection unmarshals an instance of DedicatedHostProfileCollection from the specified map of raw messages.
func UnmarshalDedicatedHostProfileCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostProfileCollection)
	err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalDedicatedHostProfileCollectionFirst)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalDedicatedHostProfileCollectionNext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "profiles", &obj.Profiles, UnmarshalDedicatedHostProfile)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostProfileCollectionFirst : A link to the first page of resources.
type DedicatedHostProfileCollectionFirst struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalDedicatedHostProfileCollectionFirst unmarshals an instance of DedicatedHostProfileCollectionFirst from the specified map of raw messages.
func UnmarshalDedicatedHostProfileCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostProfileCollectionFirst)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostProfileCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
type DedicatedHostProfileCollectionNext struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalDedicatedHostProfileCollectionNext unmarshals an instance of DedicatedHostProfileCollectionNext from the specified map of raw messages.
func UnmarshalDedicatedHostProfileCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostProfileCollectionNext)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostProfileDisk : Disks provided by this profile.
type DedicatedHostProfileDisk struct {
	InterfaceType *DedicatedHostProfileDiskInterface `json:"interface_type" validate:"required"`

	// The number of disks of this type for a dedicated host with this profile.
	Quantity *DedicatedHostProfileDiskQuantity `json:"quantity" validate:"required"`

	// The size of the disk in GB (gigabytes).
	Size *DedicatedHostProfileDiskSize `json:"size" validate:"required"`

	SupportedInstanceInterfaceTypes *DedicatedHostProfileDiskSupportedInterfaces `json:"supported_instance_interface_types" validate:"required"`
}

// UnmarshalDedicatedHostProfileDisk unmarshals an instance of DedicatedHostProfileDisk from the specified map of raw messages.
func UnmarshalDedicatedHostProfileDisk(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostProfileDisk)
	err = core.UnmarshalModel(m, "interface_type", &obj.InterfaceType, UnmarshalDedicatedHostProfileDiskInterface)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "quantity", &obj.Quantity, UnmarshalDedicatedHostProfileDiskQuantity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "size", &obj.Size, UnmarshalDedicatedHostProfileDiskSize)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "supported_instance_interface_types", &obj.SupportedInstanceInterfaceTypes, UnmarshalDedicatedHostProfileDiskSupportedInterfaces)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostProfileDiskInterface : DedicatedHostProfileDiskInterface struct
type DedicatedHostProfileDiskInterface struct {
	// The type for this profile field.
	Type *string `json:"type" validate:"required"`

	// The interface of the disk for a dedicated host with this profile
	//
	// The enumerated values for this property are expected to expand in the future. When processing this property, check
	// for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the
	// unexpected property value was encountered.
	Value *string `json:"value" validate:"required"`
}

// Constants associated with the DedicatedHostProfileDiskInterface.Type property.
// The type for this profile field.
const (
	DedicatedHostProfileDiskInterfaceTypeFixedConst = "fixed"
)

// Constants associated with the DedicatedHostProfileDiskInterface.Value property.
// The interface of the disk for a dedicated host with this profile
//
// The enumerated values for this property are expected to expand in the future. When processing this property, check
// for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the
// unexpected property value was encountered.
const (
	DedicatedHostProfileDiskInterfaceValueNvmeConst = "nvme"
)

// UnmarshalDedicatedHostProfileDiskInterface unmarshals an instance of DedicatedHostProfileDiskInterface from the specified map of raw messages.
func UnmarshalDedicatedHostProfileDiskInterface(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostProfileDiskInterface)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "value", &obj.Value)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostProfileDiskQuantity : The number of disks of this type for a dedicated host with this profile.
type DedicatedHostProfileDiskQuantity struct {
	// The type for this profile field.
	Type *string `json:"type" validate:"required"`

	// The value for this profile field.
	Value *int64 `json:"value" validate:"required"`
}

// Constants associated with the DedicatedHostProfileDiskQuantity.Type property.
// The type for this profile field.
const (
	DedicatedHostProfileDiskQuantityTypeFixedConst = "fixed"
)

// UnmarshalDedicatedHostProfileDiskQuantity unmarshals an instance of DedicatedHostProfileDiskQuantity from the specified map of raw messages.
func UnmarshalDedicatedHostProfileDiskQuantity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostProfileDiskQuantity)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "value", &obj.Value)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostProfileDiskSize : The size of the disk in GB (gigabytes).
type DedicatedHostProfileDiskSize struct {
	// The type for this profile field.
	Type *string `json:"type" validate:"required"`

	// The size of the disk in GB (gigabytes).
	Value *int64 `json:"value" validate:"required"`
}

// Constants associated with the DedicatedHostProfileDiskSize.Type property.
// The type for this profile field.
const (
	DedicatedHostProfileDiskSizeTypeFixedConst = "fixed"
)

// UnmarshalDedicatedHostProfileDiskSize unmarshals an instance of DedicatedHostProfileDiskSize from the specified map of raw messages.
func UnmarshalDedicatedHostProfileDiskSize(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostProfileDiskSize)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "value", &obj.Value)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostProfileDiskSupportedInterfaces : DedicatedHostProfileDiskSupportedInterfaces struct
type DedicatedHostProfileDiskSupportedInterfaces struct {
	// The type for this profile field.
	Type *string `json:"type" validate:"required"`

	// The instance disk interfaces supported for a dedicated host with this profile.
	Value []string `json:"value" validate:"required"`
}

// Constants associated with the DedicatedHostProfileDiskSupportedInterfaces.Type property.
// The type for this profile field.
const (
	DedicatedHostProfileDiskSupportedInterfacesTypeFixedConst = "fixed"
)

// Constants associated with the DedicatedHostProfileDiskSupportedInterfaces.Value property.
// The disk interface used for attaching the disk.
//
// The enumerated values for this property are expected to expand in the future. When processing this property, check
// for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the
// unexpected property value was encountered.
const (
	DedicatedHostProfileDiskSupportedInterfacesValueNvmeConst      = "nvme"
	DedicatedHostProfileDiskSupportedInterfacesValueVirtioBlkConst = "virtio_blk"
)

// UnmarshalDedicatedHostProfileDiskSupportedInterfaces unmarshals an instance of DedicatedHostProfileDiskSupportedInterfaces from the specified map of raw messages.
func UnmarshalDedicatedHostProfileDiskSupportedInterfaces(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostProfileDiskSupportedInterfaces)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "value", &obj.Value)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostProfileIdentity : Identifies a dedicated host profile by a unique property.
// Models which "extend" this model:
// - DedicatedHostProfileIdentityByName
// - DedicatedHostProfileIdentityByHref
type DedicatedHostProfileIdentity struct {
	// The globally unique name for this dedicated host profile.
	Name *string `json:"name,omitempty"`

	// The URL for this dedicated host profile.
	Href *string `json:"href,omitempty"`
}

func (*DedicatedHostProfileIdentity) isaDedicatedHostProfileIdentity() bool {
	return true
}

type DedicatedHostProfileIdentityIntf interface {
	isaDedicatedHostProfileIdentity() bool
}

// UnmarshalDedicatedHostProfileIdentity unmarshals an instance of DedicatedHostProfileIdentity from the specified map of raw messages.
func UnmarshalDedicatedHostProfileIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostProfileIdentity)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostProfileMemory : DedicatedHostProfileMemory struct
// Models which "extend" this model:
// - DedicatedHostProfileMemoryFixed
// - DedicatedHostProfileMemoryRange
// - DedicatedHostProfileMemoryEnum
// - DedicatedHostProfileMemoryDependent
type DedicatedHostProfileMemory struct {
	// The type for this profile field.
	Type *string `json:"type,omitempty"`

	// The value for this profile field.
	Value *int64 `json:"value,omitempty"`

	// The default value for this profile field.
	Default *int64 `json:"default,omitempty"`

	// The maximum value for this profile field.
	Max *int64 `json:"max,omitempty"`

	// The minimum value for this profile field.
	Min *int64 `json:"min,omitempty"`

	// The increment step value for this profile field.
	Step *int64 `json:"step,omitempty"`

	// The permitted values for this profile field.
	Values []int64 `json:"values,omitempty"`
}

// Constants associated with the DedicatedHostProfileMemory.Type property.
// The type for this profile field.
const (
	DedicatedHostProfileMemoryTypeFixedConst = "fixed"
)

func (*DedicatedHostProfileMemory) isaDedicatedHostProfileMemory() bool {
	return true
}

type DedicatedHostProfileMemoryIntf interface {
	isaDedicatedHostProfileMemory() bool
}

// UnmarshalDedicatedHostProfileMemory unmarshals an instance of DedicatedHostProfileMemory from the specified map of raw messages.
func UnmarshalDedicatedHostProfileMemory(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostProfileMemory)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "value", &obj.Value)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "default", &obj.Default)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "max", &obj.Max)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "min", &obj.Min)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "step", &obj.Step)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "values", &obj.Values)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostProfileReference : DedicatedHostProfileReference struct
type DedicatedHostProfileReference struct {
	// The URL for this dedicated host.
	Href *string `json:"href" validate:"required"`

	// The globally unique name for this dedicated host profile.
	Name *string `json:"name" validate:"required"`
}

// UnmarshalDedicatedHostProfileReference unmarshals an instance of DedicatedHostProfileReference from the specified map of raw messages.
func UnmarshalDedicatedHostProfileReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostProfileReference)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostProfileSocket : DedicatedHostProfileSocket struct
// Models which "extend" this model:
// - DedicatedHostProfileSocketFixed
// - DedicatedHostProfileSocketRange
// - DedicatedHostProfileSocketEnum
// - DedicatedHostProfileSocketDependent
type DedicatedHostProfileSocket struct {
	// The type for this profile field.
	Type *string `json:"type,omitempty"`

	// The value for this profile field.
	Value *int64 `json:"value,omitempty"`

	// The default value for this profile field.
	Default *int64 `json:"default,omitempty"`

	// The maximum value for this profile field.
	Max *int64 `json:"max,omitempty"`

	// The minimum value for this profile field.
	Min *int64 `json:"min,omitempty"`

	// The increment step value for this profile field.
	Step *int64 `json:"step,omitempty"`

	// The permitted values for this profile field.
	Values []int64 `json:"values,omitempty"`
}

// Constants associated with the DedicatedHostProfileSocket.Type property.
// The type for this profile field.
const (
	DedicatedHostProfileSocketTypeFixedConst = "fixed"
)

func (*DedicatedHostProfileSocket) isaDedicatedHostProfileSocket() bool {
	return true
}

type DedicatedHostProfileSocketIntf interface {
	isaDedicatedHostProfileSocket() bool
}

// UnmarshalDedicatedHostProfileSocket unmarshals an instance of DedicatedHostProfileSocket from the specified map of raw messages.
func UnmarshalDedicatedHostProfileSocket(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostProfileSocket)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "value", &obj.Value)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "default", &obj.Default)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "max", &obj.Max)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "min", &obj.Min)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "step", &obj.Step)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "values", &obj.Values)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostProfileVcpu : DedicatedHostProfileVcpu struct
// Models which "extend" this model:
// - DedicatedHostProfileVcpuFixed
// - DedicatedHostProfileVcpuRange
// - DedicatedHostProfileVcpuEnum
// - DedicatedHostProfileVcpuDependent
type DedicatedHostProfileVcpu struct {
	// The type for this profile field.
	Type *string `json:"type,omitempty"`

	// The value for this profile field.
	Value *int64 `json:"value,omitempty"`

	// The default value for this profile field.
	Default *int64 `json:"default,omitempty"`

	// The maximum value for this profile field.
	Max *int64 `json:"max,omitempty"`

	// The minimum value for this profile field.
	Min *int64 `json:"min,omitempty"`

	// The increment step value for this profile field.
	Step *int64 `json:"step,omitempty"`

	// The permitted values for this profile field.
	Values []int64 `json:"values,omitempty"`
}

// Constants associated with the DedicatedHostProfileVcpu.Type property.
// The type for this profile field.
const (
	DedicatedHostProfileVcpuTypeFixedConst = "fixed"
)

func (*DedicatedHostProfileVcpu) isaDedicatedHostProfileVcpu() bool {
	return true
}

type DedicatedHostProfileVcpuIntf interface {
	isaDedicatedHostProfileVcpu() bool
}

// UnmarshalDedicatedHostProfileVcpu unmarshals an instance of DedicatedHostProfileVcpu from the specified map of raw messages.
func UnmarshalDedicatedHostProfileVcpu(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostProfileVcpu)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "value", &obj.Value)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "default", &obj.Default)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "max", &obj.Max)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "min", &obj.Min)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "step", &obj.Step)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "values", &obj.Values)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostProfileVcpuArchitecture : DedicatedHostProfileVcpuArchitecture struct
type DedicatedHostProfileVcpuArchitecture struct {
	// The type for this profile field.
	Type *string `json:"type" validate:"required"`

	// The VCPU architecture for a dedicated host with this profile.
	Value *string `json:"value" validate:"required"`
}

// Constants associated with the DedicatedHostProfileVcpuArchitecture.Type property.
// The type for this profile field.
const (
	DedicatedHostProfileVcpuArchitectureTypeFixedConst = "fixed"
)

// UnmarshalDedicatedHostProfileVcpuArchitecture unmarshals an instance of DedicatedHostProfileVcpuArchitecture from the specified map of raw messages.
func UnmarshalDedicatedHostProfileVcpuArchitecture(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostProfileVcpuArchitecture)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "value", &obj.Value)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostPrototype : DedicatedHostPrototype struct
// Models which "extend" this model:
// - DedicatedHostPrototypeDedicatedHostByGroup
// - DedicatedHostPrototypeDedicatedHostByZone
type DedicatedHostPrototype struct {
	// If set to true, instances can be placed on this dedicated host.
	InstancePlacementEnabled *bool `json:"instance_placement_enabled,omitempty"`

	// The unique user-defined name for this dedicated host. If unspecified, the name will be a hyphenated list of
	// randomly-selected words.
	Name *string `json:"name,omitempty"`

	// The profile to use for this dedicated host.
	Profile DedicatedHostProfileIdentityIntf `json:"profile" validate:"required"`

	// The resource group to use. If unspecified, the account's [default resource
	// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
	ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`

	// The dedicated host group for this dedicated host.
	Group DedicatedHostGroupIdentityIntf `json:"group,omitempty"`

	// The zone this dedicated host will reside in.
	Zone ZoneIdentityIntf `json:"zone,omitempty"`
}

func (*DedicatedHostPrototype) isaDedicatedHostPrototype() bool {
	return true
}

type DedicatedHostPrototypeIntf interface {
	isaDedicatedHostPrototype() bool
}

// UnmarshalDedicatedHostPrototype unmarshals an instance of DedicatedHostPrototype from the specified map of raw messages.
func UnmarshalDedicatedHostPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostPrototype)
	err = core.UnmarshalPrimitive(m, "instance_placement_enabled", &obj.InstancePlacementEnabled)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalDedicatedHostProfileIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalDedicatedHostGroupIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostReference : DedicatedHostReference struct
type DedicatedHostReference struct {
	// The CRN for this dedicated host.
	CRN *string `json:"crn" validate:"required"`

	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *DedicatedHostReferenceDeleted `json:"deleted,omitempty"`

	// The URL for this dedicated host.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this dedicated host.
	ID *string `json:"id" validate:"required"`

	// The unique user-defined name for this dedicated host. If unspecified, the name will be a hyphenated list of
	// randomly-selected words.
	Name *string `json:"name" validate:"required"`

	// The type of resource referenced.
	ResourceType *string `json:"resource_type" validate:"required"`
}

// Constants associated with the DedicatedHostReference.ResourceType property.
// The type of resource referenced.
const (
	DedicatedHostReferenceResourceTypeDedicatedHostConst = "dedicated_host"
)

// UnmarshalDedicatedHostReference unmarshals an instance of DedicatedHostReference from the specified map of raw messages.
func UnmarshalDedicatedHostReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostReference)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalDedicatedHostReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type DedicatedHostReferenceDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalDedicatedHostReferenceDeleted unmarshals an instance of DedicatedHostReferenceDeleted from the specified map of raw messages.
func UnmarshalDedicatedHostReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostReferenceDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DefaultNetworkACL : DefaultNetworkACL struct
type DefaultNetworkACL struct {
	// The date and time that the network ACL was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The CRN for this network ACL.
	CRN *string `json:"crn" validate:"required"`

	// The URL for this network ACL.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this network ACL.
	ID *string `json:"id" validate:"required"`

	// The name of the default network ACL created for a VPC. The name will be a hyphenated list of randomly-selected words
	// at creation, but may be user-specified with a subsequent request.
	Name *string `json:"name" validate:"required"`

	// The resource group for the default network ACL for a VPC. Set to the VPC's
	// resource group at creation.
	ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`

	// The ordered rules for the default network ACL for a VPC.  Defaults to two rules which allow all inbound and outbound
	// traffic, respectively.  Rules for the default network ACL may be changed, added, or removed.
	Rules []NetworkACLRuleItemIntf `json:"rules" validate:"required"`

	// The subnets to which this network ACL is attached.
	Subnets []SubnetReference `json:"subnets" validate:"required"`

	// The VPC this network ACL is a part of.
	VPC *VPCReference `json:"vpc" validate:"required"`
}

// UnmarshalDefaultNetworkACL unmarshals an instance of DefaultNetworkACL from the specified map of raw messages.
func UnmarshalDefaultNetworkACL(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DefaultNetworkACL)
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "rules", &obj.Rules, UnmarshalNetworkACLRuleItem)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "subnets", &obj.Subnets, UnmarshalSubnetReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DefaultRoutingTable : DefaultRoutingTable struct
type DefaultRoutingTable struct {
	// The date and time that this routing table was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The URL for this routing table.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this routing table.
	ID *string `json:"id" validate:"required"`

	// Indicates whether this is the default routing table for this VPC.
	IsDefault *bool `json:"is_default" validate:"required"`

	// The lifecycle state of the routing table.
	LifecycleState *string `json:"lifecycle_state" validate:"required"`

	// The name of the default routing table created for this VPC. The name will be a hyphenated list of randomly-selected
	// words at creation, but may be user-specified with a subsequent request.
	Name *string `json:"name" validate:"required"`

	// The resource type.
	ResourceType *string `json:"resource_type" validate:"required"`

	// Indicates whether this routing table is used to route traffic that originates from
	// [Direct Link](https://cloud.ibm.com/docs/dl/) to this VPC.
	//
	// Incoming traffic will be routed according to the routing table with one exception: routes with an `action` of
	// `deliver` are treated as `drop` unless the `next_hop` is an IP address within the VPC's address prefix ranges.
	// Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP address or a VPN gateway
	// connection, the packet will be dropped.
	RouteDirectLinkIngress *bool `json:"route_direct_link_ingress" validate:"required"`

	// Indicates whether this routing table is used to route traffic that originates from from [Transit
	// Gateway](https://cloud.ibm.com/cloud/transit-gateway/) to this VPC.
	//
	// Incoming traffic will be routed according to the routing table with one exception: routes with an `action` of
	// `deliver` are treated as `drop` unless the `next_hop` is an IP address within the VPC's address prefix ranges.
	// Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP address or a VPN gateway
	// connection, the packet will be dropped.
	RouteTransitGatewayIngress *bool `json:"route_transit_gateway_ingress" validate:"required"`

	// Indicates whether this routing table is used to route traffic that originates from subnets in other zones in this
	// VPC.
	//
	// Incoming traffic will be routed according to the routing table with one exception: routes with an `action` of
	// `deliver` are treated as `drop` unless the `next_hop` is an IP address within the VPC's address prefix ranges.
	// Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP address or a VPN gateway
	// connection, the packet will be dropped.
	RouteVPCZoneIngress *bool `json:"route_vpc_zone_ingress" validate:"required"`

	// The routes for the default routing table for this VPC. The table is created with no routes, but routes may be added,
	// changed, or removed with a subsequent request.
	Routes []RouteReference `json:"routes" validate:"required"`

	// The subnets to which this routing table is attached.
	Subnets []SubnetReference `json:"subnets" validate:"required"`
}

// Constants associated with the DefaultRoutingTable.LifecycleState property.
// The lifecycle state of the routing table.
const (
	DefaultRoutingTableLifecycleStateDeletedConst   = "deleted"
	DefaultRoutingTableLifecycleStateDeletingConst  = "deleting"
	DefaultRoutingTableLifecycleStateFailedConst    = "failed"
	DefaultRoutingTableLifecycleStatePendingConst   = "pending"
	DefaultRoutingTableLifecycleStateStableConst    = "stable"
	DefaultRoutingTableLifecycleStateSuspendedConst = "suspended"
	DefaultRoutingTableLifecycleStateUpdatingConst  = "updating"
	DefaultRoutingTableLifecycleStateWaitingConst   = "waiting"
)

// Constants associated with the DefaultRoutingTable.ResourceType property.
// The resource type.
const (
	DefaultRoutingTableResourceTypeRoutingTableConst = "routing_table"
)

// UnmarshalDefaultRoutingTable unmarshals an instance of DefaultRoutingTable from the specified map of raw messages.
func UnmarshalDefaultRoutingTable(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DefaultRoutingTable)
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "is_default", &obj.IsDefault)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "route_direct_link_ingress", &obj.RouteDirectLinkIngress)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "route_transit_gateway_ingress", &obj.RouteTransitGatewayIngress)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "route_vpc_zone_ingress", &obj.RouteVPCZoneIngress)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "routes", &obj.Routes, UnmarshalRouteReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "subnets", &obj.Subnets, UnmarshalSubnetReference)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DefaultSecurityGroup : DefaultSecurityGroup struct
type DefaultSecurityGroup struct {
	// The date and time that this security group was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The security group's CRN.
	CRN *string `json:"crn" validate:"required"`

	// The security group's canonical URL.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this security group.
	ID *string `json:"id" validate:"required"`

	// The name of the default security group created for a VPC. The name will be a hyphenated list of randomly-selected
	// words at creation, but may be user-specified with a subsequent request.
	Name *string `json:"name" validate:"required"`

	// The resource group for this security group.
	ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`

	// Array of rules for the default security group for a VPC. Defaults to allowing all outbound traffic, and allowing all
	// inbound traffic from other interfaces in the VPC's default security group. Rules in the default security group may
	// be changed, added or removed.
	Rules []SecurityGroupRuleIntf `json:"rules" validate:"required"`

	// The VPC this security group is a part of.
	VPC *VPCReference `json:"vpc" validate:"required"`
}

// UnmarshalDefaultSecurityGroup unmarshals an instance of DefaultSecurityGroup from the specified map of raw messages.
func UnmarshalDefaultSecurityGroup(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DefaultSecurityGroup)
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "rules", &obj.Rules, UnmarshalSecurityGroupRule)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DeleteDedicatedHostGroupOptions : The DeleteDedicatedHostGroup options.
type DeleteDedicatedHostGroupOptions struct {
	// The dedicated host group identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteDedicatedHostGroupOptions : Instantiate DeleteDedicatedHostGroupOptions
func (*VpcV1) NewDeleteDedicatedHostGroupOptions(id string) *DeleteDedicatedHostGroupOptions {
	return &DeleteDedicatedHostGroupOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *DeleteDedicatedHostGroupOptions) SetID(id string) *DeleteDedicatedHostGroupOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteDedicatedHostGroupOptions) SetHeaders(param map[string]string) *DeleteDedicatedHostGroupOptions {
	options.Headers = param
	return options
}

// DeleteDedicatedHostOptions : The DeleteDedicatedHost options.
type DeleteDedicatedHostOptions struct {
	// The dedicated host identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteDedicatedHostOptions : Instantiate DeleteDedicatedHostOptions
func (*VpcV1) NewDeleteDedicatedHostOptions(id string) *DeleteDedicatedHostOptions {
	return &DeleteDedicatedHostOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *DeleteDedicatedHostOptions) SetID(id string) *DeleteDedicatedHostOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteDedicatedHostOptions) SetHeaders(param map[string]string) *DeleteDedicatedHostOptions {
	options.Headers = param
	return options
}

// DeleteEndpointGatewayOptions : The DeleteEndpointGateway options.
type DeleteEndpointGatewayOptions struct {
	// The endpoint gateway identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteEndpointGatewayOptions : Instantiate DeleteEndpointGatewayOptions
func (*VpcV1) NewDeleteEndpointGatewayOptions(id string) *DeleteEndpointGatewayOptions {
	return &DeleteEndpointGatewayOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *DeleteEndpointGatewayOptions) SetID(id string) *DeleteEndpointGatewayOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteEndpointGatewayOptions) SetHeaders(param map[string]string) *DeleteEndpointGatewayOptions {
	options.Headers = param
	return options
}

// DeleteFloatingIPOptions : The DeleteFloatingIP options.
type DeleteFloatingIPOptions struct {
	// The floating IP identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteFloatingIPOptions : Instantiate DeleteFloatingIPOptions
func (*VpcV1) NewDeleteFloatingIPOptions(id string) *DeleteFloatingIPOptions {
	return &DeleteFloatingIPOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *DeleteFloatingIPOptions) SetID(id string) *DeleteFloatingIPOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteFloatingIPOptions) SetHeaders(param map[string]string) *DeleteFloatingIPOptions {
	options.Headers = param
	return options
}

// DeleteFlowLogCollectorOptions : The DeleteFlowLogCollector options.
type DeleteFlowLogCollectorOptions struct {
	// The flow log collector identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteFlowLogCollectorOptions : Instantiate DeleteFlowLogCollectorOptions
func (*VpcV1) NewDeleteFlowLogCollectorOptions(id string) *DeleteFlowLogCollectorOptions {
	return &DeleteFlowLogCollectorOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *DeleteFlowLogCollectorOptions) SetID(id string) *DeleteFlowLogCollectorOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteFlowLogCollectorOptions) SetHeaders(param map[string]string) *DeleteFlowLogCollectorOptions {
	options.Headers = param
	return options
}

// DeleteIkePolicyOptions : The DeleteIkePolicy options.
type DeleteIkePolicyOptions struct {
	// The IKE policy identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteIkePolicyOptions : Instantiate DeleteIkePolicyOptions
func (*VpcV1) NewDeleteIkePolicyOptions(id string) *DeleteIkePolicyOptions {
	return &DeleteIkePolicyOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *DeleteIkePolicyOptions) SetID(id string) *DeleteIkePolicyOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteIkePolicyOptions) SetHeaders(param map[string]string) *DeleteIkePolicyOptions {
	options.Headers = param
	return options
}

// DeleteImageOptions : The DeleteImage options.
type DeleteImageOptions struct {
	// The image identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteImageOptions : Instantiate DeleteImageOptions
func (*VpcV1) NewDeleteImageOptions(id string) *DeleteImageOptions {
	return &DeleteImageOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *DeleteImageOptions) SetID(id string) *DeleteImageOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteImageOptions) SetHeaders(param map[string]string) *DeleteImageOptions {
	options.Headers = param
	return options
}

// DeleteInstanceGroupLoadBalancerOptions : The DeleteInstanceGroupLoadBalancer options.
type DeleteInstanceGroupLoadBalancerOptions struct {
	// The instance group identifier.
	InstanceGroupID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteInstanceGroupLoadBalancerOptions : Instantiate DeleteInstanceGroupLoadBalancerOptions
func (*VpcV1) NewDeleteInstanceGroupLoadBalancerOptions(instanceGroupID string) *DeleteInstanceGroupLoadBalancerOptions {
	return &DeleteInstanceGroupLoadBalancerOptions{
		InstanceGroupID: core.StringPtr(instanceGroupID),
	}
}

// SetInstanceGroupID : Allow user to set InstanceGroupID
func (options *DeleteInstanceGroupLoadBalancerOptions) SetInstanceGroupID(instanceGroupID string) *DeleteInstanceGroupLoadBalancerOptions {
	options.InstanceGroupID = core.StringPtr(instanceGroupID)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteInstanceGroupLoadBalancerOptions) SetHeaders(param map[string]string) *DeleteInstanceGroupLoadBalancerOptions {
	options.Headers = param
	return options
}

// DeleteInstanceGroupManagerActionOptions : The DeleteInstanceGroupManagerAction options.
type DeleteInstanceGroupManagerActionOptions struct {
	// The instance group identifier.
	InstanceGroupID *string `validate:"required,ne="`

	// The instance group manager identifier.
	InstanceGroupManagerID *string `validate:"required,ne="`

	// The instance group manager action identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteInstanceGroupManagerActionOptions : Instantiate DeleteInstanceGroupManagerActionOptions
func (*VpcV1) NewDeleteInstanceGroupManagerActionOptions(instanceGroupID string, instanceGroupManagerID string, id string) *DeleteInstanceGroupManagerActionOptions {
	return &DeleteInstanceGroupManagerActionOptions{
		InstanceGroupID:        core.StringPtr(instanceGroupID),
		InstanceGroupManagerID: core.StringPtr(instanceGroupManagerID),
		ID:                     core.StringPtr(id),
	}
}

// SetInstanceGroupID : Allow user to set InstanceGroupID
func (options *DeleteInstanceGroupManagerActionOptions) SetInstanceGroupID(instanceGroupID string) *DeleteInstanceGroupManagerActionOptions {
	options.InstanceGroupID = core.StringPtr(instanceGroupID)
	return options
}

// SetInstanceGroupManagerID : Allow user to set InstanceGroupManagerID
func (options *DeleteInstanceGroupManagerActionOptions) SetInstanceGroupManagerID(instanceGroupManagerID string) *DeleteInstanceGroupManagerActionOptions {
	options.InstanceGroupManagerID = core.StringPtr(instanceGroupManagerID)
	return options
}

// SetID : Allow user to set ID
func (options *DeleteInstanceGroupManagerActionOptions) SetID(id string) *DeleteInstanceGroupManagerActionOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteInstanceGroupManagerActionOptions) SetHeaders(param map[string]string) *DeleteInstanceGroupManagerActionOptions {
	options.Headers = param
	return options
}

// DeleteInstanceGroupManagerOptions : The DeleteInstanceGroupManager options.
type DeleteInstanceGroupManagerOptions struct {
	// The instance group identifier.
	InstanceGroupID *string `validate:"required,ne="`

	// The instance group manager identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteInstanceGroupManagerOptions : Instantiate DeleteInstanceGroupManagerOptions
func (*VpcV1) NewDeleteInstanceGroupManagerOptions(instanceGroupID string, id string) *DeleteInstanceGroupManagerOptions {
	return &DeleteInstanceGroupManagerOptions{
		InstanceGroupID: core.StringPtr(instanceGroupID),
		ID:              core.StringPtr(id),
	}
}

// SetInstanceGroupID : Allow user to set InstanceGroupID
func (options *DeleteInstanceGroupManagerOptions) SetInstanceGroupID(instanceGroupID string) *DeleteInstanceGroupManagerOptions {
	options.InstanceGroupID = core.StringPtr(instanceGroupID)
	return options
}

// SetID : Allow user to set ID
func (options *DeleteInstanceGroupManagerOptions) SetID(id string) *DeleteInstanceGroupManagerOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteInstanceGroupManagerOptions) SetHeaders(param map[string]string) *DeleteInstanceGroupManagerOptions {
	options.Headers = param
	return options
}

// DeleteInstanceGroupManagerPolicyOptions : The DeleteInstanceGroupManagerPolicy options.
type DeleteInstanceGroupManagerPolicyOptions struct {
	// The instance group identifier.
	InstanceGroupID *string `validate:"required,ne="`

	// The instance group manager identifier.
	InstanceGroupManagerID *string `validate:"required,ne="`

	// The instance group manager policy identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteInstanceGroupManagerPolicyOptions : Instantiate DeleteInstanceGroupManagerPolicyOptions
func (*VpcV1) NewDeleteInstanceGroupManagerPolicyOptions(instanceGroupID string, instanceGroupManagerID string, id string) *DeleteInstanceGroupManagerPolicyOptions {
	return &DeleteInstanceGroupManagerPolicyOptions{
		InstanceGroupID:        core.StringPtr(instanceGroupID),
		InstanceGroupManagerID: core.StringPtr(instanceGroupManagerID),
		ID:                     core.StringPtr(id),
	}
}

// SetInstanceGroupID : Allow user to set InstanceGroupID
func (options *DeleteInstanceGroupManagerPolicyOptions) SetInstanceGroupID(instanceGroupID string) *DeleteInstanceGroupManagerPolicyOptions {
	options.InstanceGroupID = core.StringPtr(instanceGroupID)
	return options
}

// SetInstanceGroupManagerID : Allow user to set InstanceGroupManagerID
func (options *DeleteInstanceGroupManagerPolicyOptions) SetInstanceGroupManagerID(instanceGroupManagerID string) *DeleteInstanceGroupManagerPolicyOptions {
	options.InstanceGroupManagerID = core.StringPtr(instanceGroupManagerID)
	return options
}

// SetID : Allow user to set ID
func (options *DeleteInstanceGroupManagerPolicyOptions) SetID(id string) *DeleteInstanceGroupManagerPolicyOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteInstanceGroupManagerPolicyOptions) SetHeaders(param map[string]string) *DeleteInstanceGroupManagerPolicyOptions {
	options.Headers = param
	return options
}

// DeleteInstanceGroupMembershipOptions : The DeleteInstanceGroupMembership options.
type DeleteInstanceGroupMembershipOptions struct {
	// The instance group identifier.
	InstanceGroupID *string `validate:"required,ne="`

	// The instance group membership identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteInstanceGroupMembershipOptions : Instantiate DeleteInstanceGroupMembershipOptions
func (*VpcV1) NewDeleteInstanceGroupMembershipOptions(instanceGroupID string, id string) *DeleteInstanceGroupMembershipOptions {
	return &DeleteInstanceGroupMembershipOptions{
		InstanceGroupID: core.StringPtr(instanceGroupID),
		ID:              core.StringPtr(id),
	}
}

// SetInstanceGroupID : Allow user to set InstanceGroupID
func (options *DeleteInstanceGroupMembershipOptions) SetInstanceGroupID(instanceGroupID string) *DeleteInstanceGroupMembershipOptions {
	options.InstanceGroupID = core.StringPtr(instanceGroupID)
	return options
}

// SetID : Allow user to set ID
func (options *DeleteInstanceGroupMembershipOptions) SetID(id string) *DeleteInstanceGroupMembershipOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteInstanceGroupMembershipOptions) SetHeaders(param map[string]string) *DeleteInstanceGroupMembershipOptions {
	options.Headers = param
	return options
}

// DeleteInstanceGroupMembershipsOptions : The DeleteInstanceGroupMemberships options.
type DeleteInstanceGroupMembershipsOptions struct {
	// The instance group identifier.
	InstanceGroupID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteInstanceGroupMembershipsOptions : Instantiate DeleteInstanceGroupMembershipsOptions
func (*VpcV1) NewDeleteInstanceGroupMembershipsOptions(instanceGroupID string) *DeleteInstanceGroupMembershipsOptions {
	return &DeleteInstanceGroupMembershipsOptions{
		InstanceGroupID: core.StringPtr(instanceGroupID),
	}
}

// SetInstanceGroupID : Allow user to set InstanceGroupID
func (options *DeleteInstanceGroupMembershipsOptions) SetInstanceGroupID(instanceGroupID string) *DeleteInstanceGroupMembershipsOptions {
	options.InstanceGroupID = core.StringPtr(instanceGroupID)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteInstanceGroupMembershipsOptions) SetHeaders(param map[string]string) *DeleteInstanceGroupMembershipsOptions {
	options.Headers = param
	return options
}

// DeleteInstanceGroupOptions : The DeleteInstanceGroup options.
type DeleteInstanceGroupOptions struct {
	// The instance group identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteInstanceGroupOptions : Instantiate DeleteInstanceGroupOptions
func (*VpcV1) NewDeleteInstanceGroupOptions(id string) *DeleteInstanceGroupOptions {
	return &DeleteInstanceGroupOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *DeleteInstanceGroupOptions) SetID(id string) *DeleteInstanceGroupOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteInstanceGroupOptions) SetHeaders(param map[string]string) *DeleteInstanceGroupOptions {
	options.Headers = param
	return options
}

// DeleteInstanceNetworkInterfaceOptions : The DeleteInstanceNetworkInterface options.
type DeleteInstanceNetworkInterfaceOptions struct {
	// The instance identifier.
	InstanceID *string `validate:"required,ne="`

	// The network interface identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteInstanceNetworkInterfaceOptions : Instantiate DeleteInstanceNetworkInterfaceOptions
func (*VpcV1) NewDeleteInstanceNetworkInterfaceOptions(instanceID string, id string) *DeleteInstanceNetworkInterfaceOptions {
	return &DeleteInstanceNetworkInterfaceOptions{
		InstanceID: core.StringPtr(instanceID),
		ID:         core.StringPtr(id),
	}
}

// SetInstanceID : Allow user to set InstanceID
func (options *DeleteInstanceNetworkInterfaceOptions) SetInstanceID(instanceID string) *DeleteInstanceNetworkInterfaceOptions {
	options.InstanceID = core.StringPtr(instanceID)
	return options
}

// SetID : Allow user to set ID
func (options *DeleteInstanceNetworkInterfaceOptions) SetID(id string) *DeleteInstanceNetworkInterfaceOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteInstanceNetworkInterfaceOptions) SetHeaders(param map[string]string) *DeleteInstanceNetworkInterfaceOptions {
	options.Headers = param
	return options
}

// DeleteInstanceOptions : The DeleteInstance options.
type DeleteInstanceOptions struct {
	// The instance identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteInstanceOptions : Instantiate DeleteInstanceOptions
func (*VpcV1) NewDeleteInstanceOptions(id string) *DeleteInstanceOptions {
	return &DeleteInstanceOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *DeleteInstanceOptions) SetID(id string) *DeleteInstanceOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteInstanceOptions) SetHeaders(param map[string]string) *DeleteInstanceOptions {
	options.Headers = param
	return options
}

// DeleteInstanceTemplateOptions : The DeleteInstanceTemplate options.
type DeleteInstanceTemplateOptions struct {
	// The instance template identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteInstanceTemplateOptions : Instantiate DeleteInstanceTemplateOptions
func (*VpcV1) NewDeleteInstanceTemplateOptions(id string) *DeleteInstanceTemplateOptions {
	return &DeleteInstanceTemplateOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *DeleteInstanceTemplateOptions) SetID(id string) *DeleteInstanceTemplateOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteInstanceTemplateOptions) SetHeaders(param map[string]string) *DeleteInstanceTemplateOptions {
	options.Headers = param
	return options
}

// DeleteInstanceVolumeAttachmentOptions : The DeleteInstanceVolumeAttachment options.
type DeleteInstanceVolumeAttachmentOptions struct {
	// The instance identifier.
	InstanceID *string `validate:"required,ne="`

	// The volume attachment identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteInstanceVolumeAttachmentOptions : Instantiate DeleteInstanceVolumeAttachmentOptions
func (*VpcV1) NewDeleteInstanceVolumeAttachmentOptions(instanceID string, id string) *DeleteInstanceVolumeAttachmentOptions {
	return &DeleteInstanceVolumeAttachmentOptions{
		InstanceID: core.StringPtr(instanceID),
		ID:         core.StringPtr(id),
	}
}

// SetInstanceID : Allow user to set InstanceID
func (options *DeleteInstanceVolumeAttachmentOptions) SetInstanceID(instanceID string) *DeleteInstanceVolumeAttachmentOptions {
	options.InstanceID = core.StringPtr(instanceID)
	return options
}

// SetID : Allow user to set ID
func (options *DeleteInstanceVolumeAttachmentOptions) SetID(id string) *DeleteInstanceVolumeAttachmentOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteInstanceVolumeAttachmentOptions) SetHeaders(param map[string]string) *DeleteInstanceVolumeAttachmentOptions {
	options.Headers = param
	return options
}

// DeleteIpsecPolicyOptions : The DeleteIpsecPolicy options.
type DeleteIpsecPolicyOptions struct {
	// The IPsec policy identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteIpsecPolicyOptions : Instantiate DeleteIpsecPolicyOptions
func (*VpcV1) NewDeleteIpsecPolicyOptions(id string) *DeleteIpsecPolicyOptions {
	return &DeleteIpsecPolicyOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *DeleteIpsecPolicyOptions) SetID(id string) *DeleteIpsecPolicyOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteIpsecPolicyOptions) SetHeaders(param map[string]string) *DeleteIpsecPolicyOptions {
	options.Headers = param
	return options
}

// DeleteKeyOptions : The DeleteKey options.
type DeleteKeyOptions struct {
	// The key identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteKeyOptions : Instantiate DeleteKeyOptions
func (*VpcV1) NewDeleteKeyOptions(id string) *DeleteKeyOptions {
	return &DeleteKeyOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *DeleteKeyOptions) SetID(id string) *DeleteKeyOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteKeyOptions) SetHeaders(param map[string]string) *DeleteKeyOptions {
	options.Headers = param
	return options
}

// DeleteLoadBalancerListenerOptions : The DeleteLoadBalancerListener options.
type DeleteLoadBalancerListenerOptions struct {
	// The load balancer identifier.
	LoadBalancerID *string `validate:"required,ne="`

	// The listener identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteLoadBalancerListenerOptions : Instantiate DeleteLoadBalancerListenerOptions
func (*VpcV1) NewDeleteLoadBalancerListenerOptions(loadBalancerID string, id string) *DeleteLoadBalancerListenerOptions {
	return &DeleteLoadBalancerListenerOptions{
		LoadBalancerID: core.StringPtr(loadBalancerID),
		ID:             core.StringPtr(id),
	}
}

// SetLoadBalancerID : Allow user to set LoadBalancerID
func (options *DeleteLoadBalancerListenerOptions) SetLoadBalancerID(loadBalancerID string) *DeleteLoadBalancerListenerOptions {
	options.LoadBalancerID = core.StringPtr(loadBalancerID)
	return options
}

// SetID : Allow user to set ID
func (options *DeleteLoadBalancerListenerOptions) SetID(id string) *DeleteLoadBalancerListenerOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteLoadBalancerListenerOptions) SetHeaders(param map[string]string) *DeleteLoadBalancerListenerOptions {
	options.Headers = param
	return options
}

// DeleteLoadBalancerListenerPolicyOptions : The DeleteLoadBalancerListenerPolicy options.
type DeleteLoadBalancerListenerPolicyOptions struct {
	// The load balancer identifier.
	LoadBalancerID *string `validate:"required,ne="`

	// The listener identifier.
	ListenerID *string `validate:"required,ne="`

	// The policy identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteLoadBalancerListenerPolicyOptions : Instantiate DeleteLoadBalancerListenerPolicyOptions
func (*VpcV1) NewDeleteLoadBalancerListenerPolicyOptions(loadBalancerID string, listenerID string, id string) *DeleteLoadBalancerListenerPolicyOptions {
	return &DeleteLoadBalancerListenerPolicyOptions{
		LoadBalancerID: core.StringPtr(loadBalancerID),
		ListenerID:     core.StringPtr(listenerID),
		ID:             core.StringPtr(id),
	}
}

// SetLoadBalancerID : Allow user to set LoadBalancerID
func (options *DeleteLoadBalancerListenerPolicyOptions) SetLoadBalancerID(loadBalancerID string) *DeleteLoadBalancerListenerPolicyOptions {
	options.LoadBalancerID = core.StringPtr(loadBalancerID)
	return options
}

// SetListenerID : Allow user to set ListenerID
func (options *DeleteLoadBalancerListenerPolicyOptions) SetListenerID(listenerID string) *DeleteLoadBalancerListenerPolicyOptions {
	options.ListenerID = core.StringPtr(listenerID)
	return options
}

// SetID : Allow user to set ID
func (options *DeleteLoadBalancerListenerPolicyOptions) SetID(id string) *DeleteLoadBalancerListenerPolicyOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteLoadBalancerListenerPolicyOptions) SetHeaders(param map[string]string) *DeleteLoadBalancerListenerPolicyOptions {
	options.Headers = param
	return options
}

// DeleteLoadBalancerListenerPolicyRuleOptions : The DeleteLoadBalancerListenerPolicyRule options.
type DeleteLoadBalancerListenerPolicyRuleOptions struct {
	// The load balancer identifier.
	LoadBalancerID *string `validate:"required,ne="`

	// The listener identifier.
	ListenerID *string `validate:"required,ne="`

	// The policy identifier.
	PolicyID *string `validate:"required,ne="`

	// The rule identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteLoadBalancerListenerPolicyRuleOptions : Instantiate DeleteLoadBalancerListenerPolicyRuleOptions
func (*VpcV1) NewDeleteLoadBalancerListenerPolicyRuleOptions(loadBalancerID string, listenerID string, policyID string, id string) *DeleteLoadBalancerListenerPolicyRuleOptions {
	return &DeleteLoadBalancerListenerPolicyRuleOptions{
		LoadBalancerID: core.StringPtr(loadBalancerID),
		ListenerID:     core.StringPtr(listenerID),
		PolicyID:       core.StringPtr(policyID),
		ID:             core.StringPtr(id),
	}
}

// SetLoadBalancerID : Allow user to set LoadBalancerID
func (options *DeleteLoadBalancerListenerPolicyRuleOptions) SetLoadBalancerID(loadBalancerID string) *DeleteLoadBalancerListenerPolicyRuleOptions {
	options.LoadBalancerID = core.StringPtr(loadBalancerID)
	return options
}

// SetListenerID : Allow user to set ListenerID
func (options *DeleteLoadBalancerListenerPolicyRuleOptions) SetListenerID(listenerID string) *DeleteLoadBalancerListenerPolicyRuleOptions {
	options.ListenerID = core.StringPtr(listenerID)
	return options
}

// SetPolicyID : Allow user to set PolicyID
func (options *DeleteLoadBalancerListenerPolicyRuleOptions) SetPolicyID(policyID string) *DeleteLoadBalancerListenerPolicyRuleOptions {
	options.PolicyID = core.StringPtr(policyID)
	return options
}

// SetID : Allow user to set ID
func (options *DeleteLoadBalancerListenerPolicyRuleOptions) SetID(id string) *DeleteLoadBalancerListenerPolicyRuleOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteLoadBalancerListenerPolicyRuleOptions) SetHeaders(param map[string]string) *DeleteLoadBalancerListenerPolicyRuleOptions {
	options.Headers = param
	return options
}

// DeleteLoadBalancerOptions : The DeleteLoadBalancer options.
type DeleteLoadBalancerOptions struct {
	// The load balancer identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteLoadBalancerOptions : Instantiate DeleteLoadBalancerOptions
func (*VpcV1) NewDeleteLoadBalancerOptions(id string) *DeleteLoadBalancerOptions {
	return &DeleteLoadBalancerOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *DeleteLoadBalancerOptions) SetID(id string) *DeleteLoadBalancerOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteLoadBalancerOptions) SetHeaders(param map[string]string) *DeleteLoadBalancerOptions {
	options.Headers = param
	return options
}

// DeleteLoadBalancerPoolMemberOptions : The DeleteLoadBalancerPoolMember options.
type DeleteLoadBalancerPoolMemberOptions struct {
	// The load balancer identifier.
	LoadBalancerID *string `validate:"required,ne="`

	// The pool identifier.
	PoolID *string `validate:"required,ne="`

	// The member identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteLoadBalancerPoolMemberOptions : Instantiate DeleteLoadBalancerPoolMemberOptions
func (*VpcV1) NewDeleteLoadBalancerPoolMemberOptions(loadBalancerID string, poolID string, id string) *DeleteLoadBalancerPoolMemberOptions {
	return &DeleteLoadBalancerPoolMemberOptions{
		LoadBalancerID: core.StringPtr(loadBalancerID),
		PoolID:         core.StringPtr(poolID),
		ID:             core.StringPtr(id),
	}
}

// SetLoadBalancerID : Allow user to set LoadBalancerID
func (options *DeleteLoadBalancerPoolMemberOptions) SetLoadBalancerID(loadBalancerID string) *DeleteLoadBalancerPoolMemberOptions {
	options.LoadBalancerID = core.StringPtr(loadBalancerID)
	return options
}

// SetPoolID : Allow user to set PoolID
func (options *DeleteLoadBalancerPoolMemberOptions) SetPoolID(poolID string) *DeleteLoadBalancerPoolMemberOptions {
	options.PoolID = core.StringPtr(poolID)
	return options
}

// SetID : Allow user to set ID
func (options *DeleteLoadBalancerPoolMemberOptions) SetID(id string) *DeleteLoadBalancerPoolMemberOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteLoadBalancerPoolMemberOptions) SetHeaders(param map[string]string) *DeleteLoadBalancerPoolMemberOptions {
	options.Headers = param
	return options
}

// DeleteLoadBalancerPoolOptions : The DeleteLoadBalancerPool options.
type DeleteLoadBalancerPoolOptions struct {
	// The load balancer identifier.
	LoadBalancerID *string `validate:"required,ne="`

	// The pool identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteLoadBalancerPoolOptions : Instantiate DeleteLoadBalancerPoolOptions
func (*VpcV1) NewDeleteLoadBalancerPoolOptions(loadBalancerID string, id string) *DeleteLoadBalancerPoolOptions {
	return &DeleteLoadBalancerPoolOptions{
		LoadBalancerID: core.StringPtr(loadBalancerID),
		ID:             core.StringPtr(id),
	}
}

// SetLoadBalancerID : Allow user to set LoadBalancerID
func (options *DeleteLoadBalancerPoolOptions) SetLoadBalancerID(loadBalancerID string) *DeleteLoadBalancerPoolOptions {
	options.LoadBalancerID = core.StringPtr(loadBalancerID)
	return options
}

// SetID : Allow user to set ID
func (options *DeleteLoadBalancerPoolOptions) SetID(id string) *DeleteLoadBalancerPoolOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteLoadBalancerPoolOptions) SetHeaders(param map[string]string) *DeleteLoadBalancerPoolOptions {
	options.Headers = param
	return options
}

// DeleteNetworkACLOptions : The DeleteNetworkACL options.
type DeleteNetworkACLOptions struct {
	// The network ACL identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteNetworkACLOptions : Instantiate DeleteNetworkACLOptions
func (*VpcV1) NewDeleteNetworkACLOptions(id string) *DeleteNetworkACLOptions {
	return &DeleteNetworkACLOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *DeleteNetworkACLOptions) SetID(id string) *DeleteNetworkACLOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteNetworkACLOptions) SetHeaders(param map[string]string) *DeleteNetworkACLOptions {
	options.Headers = param
	return options
}

// DeleteNetworkACLRuleOptions : The DeleteNetworkACLRule options.
type DeleteNetworkACLRuleOptions struct {
	// The network ACL identifier.
	NetworkACLID *string `validate:"required,ne="`

	// The rule identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteNetworkACLRuleOptions : Instantiate DeleteNetworkACLRuleOptions
func (*VpcV1) NewDeleteNetworkACLRuleOptions(networkACLID string, id string) *DeleteNetworkACLRuleOptions {
	return &DeleteNetworkACLRuleOptions{
		NetworkACLID: core.StringPtr(networkACLID),
		ID:           core.StringPtr(id),
	}
}

// SetNetworkACLID : Allow user to set NetworkACLID
func (options *DeleteNetworkACLRuleOptions) SetNetworkACLID(networkACLID string) *DeleteNetworkACLRuleOptions {
	options.NetworkACLID = core.StringPtr(networkACLID)
	return options
}

// SetID : Allow user to set ID
func (options *DeleteNetworkACLRuleOptions) SetID(id string) *DeleteNetworkACLRuleOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteNetworkACLRuleOptions) SetHeaders(param map[string]string) *DeleteNetworkACLRuleOptions {
	options.Headers = param
	return options
}

// DeletePublicGatewayOptions : The DeletePublicGateway options.
type DeletePublicGatewayOptions struct {
	// The public gateway identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeletePublicGatewayOptions : Instantiate DeletePublicGatewayOptions
func (*VpcV1) NewDeletePublicGatewayOptions(id string) *DeletePublicGatewayOptions {
	return &DeletePublicGatewayOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *DeletePublicGatewayOptions) SetID(id string) *DeletePublicGatewayOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeletePublicGatewayOptions) SetHeaders(param map[string]string) *DeletePublicGatewayOptions {
	options.Headers = param
	return options
}

// DeleteSecurityGroupOptions : The DeleteSecurityGroup options.
type DeleteSecurityGroupOptions struct {
	// The security group identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteSecurityGroupOptions : Instantiate DeleteSecurityGroupOptions
func (*VpcV1) NewDeleteSecurityGroupOptions(id string) *DeleteSecurityGroupOptions {
	return &DeleteSecurityGroupOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *DeleteSecurityGroupOptions) SetID(id string) *DeleteSecurityGroupOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteSecurityGroupOptions) SetHeaders(param map[string]string) *DeleteSecurityGroupOptions {
	options.Headers = param
	return options
}

// DeleteSecurityGroupRuleOptions : The DeleteSecurityGroupRule options.
type DeleteSecurityGroupRuleOptions struct {
	// The security group identifier.
	SecurityGroupID *string `validate:"required,ne="`

	// The rule identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteSecurityGroupRuleOptions : Instantiate DeleteSecurityGroupRuleOptions
func (*VpcV1) NewDeleteSecurityGroupRuleOptions(securityGroupID string, id string) *DeleteSecurityGroupRuleOptions {
	return &DeleteSecurityGroupRuleOptions{
		SecurityGroupID: core.StringPtr(securityGroupID),
		ID:              core.StringPtr(id),
	}
}

// SetSecurityGroupID : Allow user to set SecurityGroupID
func (options *DeleteSecurityGroupRuleOptions) SetSecurityGroupID(securityGroupID string) *DeleteSecurityGroupRuleOptions {
	options.SecurityGroupID = core.StringPtr(securityGroupID)
	return options
}

// SetID : Allow user to set ID
func (options *DeleteSecurityGroupRuleOptions) SetID(id string) *DeleteSecurityGroupRuleOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteSecurityGroupRuleOptions) SetHeaders(param map[string]string) *DeleteSecurityGroupRuleOptions {
	options.Headers = param
	return options
}

// DeleteSecurityGroupTargetBindingOptions : The DeleteSecurityGroupTargetBinding options.
type DeleteSecurityGroupTargetBindingOptions struct {
	// The security group identifier.
	SecurityGroupID *string `validate:"required,ne="`

	// The security group target identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteSecurityGroupTargetBindingOptions : Instantiate DeleteSecurityGroupTargetBindingOptions
func (*VpcV1) NewDeleteSecurityGroupTargetBindingOptions(securityGroupID string, id string) *DeleteSecurityGroupTargetBindingOptions {
	return &DeleteSecurityGroupTargetBindingOptions{
		SecurityGroupID: core.StringPtr(securityGroupID),
		ID:              core.StringPtr(id),
	}
}

// SetSecurityGroupID : Allow user to set SecurityGroupID
func (options *DeleteSecurityGroupTargetBindingOptions) SetSecurityGroupID(securityGroupID string) *DeleteSecurityGroupTargetBindingOptions {
	options.SecurityGroupID = core.StringPtr(securityGroupID)
	return options
}

// SetID : Allow user to set ID
func (options *DeleteSecurityGroupTargetBindingOptions) SetID(id string) *DeleteSecurityGroupTargetBindingOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteSecurityGroupTargetBindingOptions) SetHeaders(param map[string]string) *DeleteSecurityGroupTargetBindingOptions {
	options.Headers = param
	return options
}

// DeleteSubnetOptions : The DeleteSubnet options.
type DeleteSubnetOptions struct {
	// The subnet identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteSubnetOptions : Instantiate DeleteSubnetOptions
func (*VpcV1) NewDeleteSubnetOptions(id string) *DeleteSubnetOptions {
	return &DeleteSubnetOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *DeleteSubnetOptions) SetID(id string) *DeleteSubnetOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteSubnetOptions) SetHeaders(param map[string]string) *DeleteSubnetOptions {
	options.Headers = param
	return options
}

// DeleteSubnetReservedIPOptions : The DeleteSubnetReservedIP options.
type DeleteSubnetReservedIPOptions struct {
	// The subnet identifier.
	SubnetID *string `validate:"required,ne="`

	// The reserved IP identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteSubnetReservedIPOptions : Instantiate DeleteSubnetReservedIPOptions
func (*VpcV1) NewDeleteSubnetReservedIPOptions(subnetID string, id string) *DeleteSubnetReservedIPOptions {
	return &DeleteSubnetReservedIPOptions{
		SubnetID: core.StringPtr(subnetID),
		ID:       core.StringPtr(id),
	}
}

// SetSubnetID : Allow user to set SubnetID
func (options *DeleteSubnetReservedIPOptions) SetSubnetID(subnetID string) *DeleteSubnetReservedIPOptions {
	options.SubnetID = core.StringPtr(subnetID)
	return options
}

// SetID : Allow user to set ID
func (options *DeleteSubnetReservedIPOptions) SetID(id string) *DeleteSubnetReservedIPOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteSubnetReservedIPOptions) SetHeaders(param map[string]string) *DeleteSubnetReservedIPOptions {
	options.Headers = param
	return options
}

// DeleteVolumeOptions : The DeleteVolume options.
type DeleteVolumeOptions struct {
	// The volume identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteVolumeOptions : Instantiate DeleteVolumeOptions
func (*VpcV1) NewDeleteVolumeOptions(id string) *DeleteVolumeOptions {
	return &DeleteVolumeOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *DeleteVolumeOptions) SetID(id string) *DeleteVolumeOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteVolumeOptions) SetHeaders(param map[string]string) *DeleteVolumeOptions {
	options.Headers = param
	return options
}

// DeleteVPCAddressPrefixOptions : The DeleteVPCAddressPrefix options.
type DeleteVPCAddressPrefixOptions struct {
	// The VPC identifier.
	VPCID *string `validate:"required,ne="`

	// The prefix identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteVPCAddressPrefixOptions : Instantiate DeleteVPCAddressPrefixOptions
func (*VpcV1) NewDeleteVPCAddressPrefixOptions(vpcID string, id string) *DeleteVPCAddressPrefixOptions {
	return &DeleteVPCAddressPrefixOptions{
		VPCID: core.StringPtr(vpcID),
		ID:    core.StringPtr(id),
	}
}

// SetVPCID : Allow user to set VPCID
func (options *DeleteVPCAddressPrefixOptions) SetVPCID(vpcID string) *DeleteVPCAddressPrefixOptions {
	options.VPCID = core.StringPtr(vpcID)
	return options
}

// SetID : Allow user to set ID
func (options *DeleteVPCAddressPrefixOptions) SetID(id string) *DeleteVPCAddressPrefixOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteVPCAddressPrefixOptions) SetHeaders(param map[string]string) *DeleteVPCAddressPrefixOptions {
	options.Headers = param
	return options
}

// DeleteVPCOptions : The DeleteVPC options.
type DeleteVPCOptions struct {
	// The VPC identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteVPCOptions : Instantiate DeleteVPCOptions
func (*VpcV1) NewDeleteVPCOptions(id string) *DeleteVPCOptions {
	return &DeleteVPCOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *DeleteVPCOptions) SetID(id string) *DeleteVPCOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteVPCOptions) SetHeaders(param map[string]string) *DeleteVPCOptions {
	options.Headers = param
	return options
}

// DeleteVPCRouteOptions : The DeleteVPCRoute options.
type DeleteVPCRouteOptions struct {
	// The VPC identifier.
	VPCID *string `validate:"required,ne="`

	// The route identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteVPCRouteOptions : Instantiate DeleteVPCRouteOptions
func (*VpcV1) NewDeleteVPCRouteOptions(vpcID string, id string) *DeleteVPCRouteOptions {
	return &DeleteVPCRouteOptions{
		VPCID: core.StringPtr(vpcID),
		ID:    core.StringPtr(id),
	}
}

// SetVPCID : Allow user to set VPCID
func (options *DeleteVPCRouteOptions) SetVPCID(vpcID string) *DeleteVPCRouteOptions {
	options.VPCID = core.StringPtr(vpcID)
	return options
}

// SetID : Allow user to set ID
func (options *DeleteVPCRouteOptions) SetID(id string) *DeleteVPCRouteOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteVPCRouteOptions) SetHeaders(param map[string]string) *DeleteVPCRouteOptions {
	options.Headers = param
	return options
}

// DeleteVPCRoutingTableOptions : The DeleteVPCRoutingTable options.
type DeleteVPCRoutingTableOptions struct {
	// The VPC identifier.
	VPCID *string `validate:"required,ne="`

	// The routing table identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteVPCRoutingTableOptions : Instantiate DeleteVPCRoutingTableOptions
func (*VpcV1) NewDeleteVPCRoutingTableOptions(vpcID string, id string) *DeleteVPCRoutingTableOptions {
	return &DeleteVPCRoutingTableOptions{
		VPCID: core.StringPtr(vpcID),
		ID:    core.StringPtr(id),
	}
}

// SetVPCID : Allow user to set VPCID
func (options *DeleteVPCRoutingTableOptions) SetVPCID(vpcID string) *DeleteVPCRoutingTableOptions {
	options.VPCID = core.StringPtr(vpcID)
	return options
}

// SetID : Allow user to set ID
func (options *DeleteVPCRoutingTableOptions) SetID(id string) *DeleteVPCRoutingTableOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteVPCRoutingTableOptions) SetHeaders(param map[string]string) *DeleteVPCRoutingTableOptions {
	options.Headers = param
	return options
}

// DeleteVPCRoutingTableRouteOptions : The DeleteVPCRoutingTableRoute options.
type DeleteVPCRoutingTableRouteOptions struct {
	// The VPC identifier.
	VPCID *string `validate:"required,ne="`

	// The routing table identifier.
	RoutingTableID *string `validate:"required,ne="`

	// The VPC routing table route identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteVPCRoutingTableRouteOptions : Instantiate DeleteVPCRoutingTableRouteOptions
func (*VpcV1) NewDeleteVPCRoutingTableRouteOptions(vpcID string, routingTableID string, id string) *DeleteVPCRoutingTableRouteOptions {
	return &DeleteVPCRoutingTableRouteOptions{
		VPCID:          core.StringPtr(vpcID),
		RoutingTableID: core.StringPtr(routingTableID),
		ID:             core.StringPtr(id),
	}
}

// SetVPCID : Allow user to set VPCID
func (options *DeleteVPCRoutingTableRouteOptions) SetVPCID(vpcID string) *DeleteVPCRoutingTableRouteOptions {
	options.VPCID = core.StringPtr(vpcID)
	return options
}

// SetRoutingTableID : Allow user to set RoutingTableID
func (options *DeleteVPCRoutingTableRouteOptions) SetRoutingTableID(routingTableID string) *DeleteVPCRoutingTableRouteOptions {
	options.RoutingTableID = core.StringPtr(routingTableID)
	return options
}

// SetID : Allow user to set ID
func (options *DeleteVPCRoutingTableRouteOptions) SetID(id string) *DeleteVPCRoutingTableRouteOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteVPCRoutingTableRouteOptions) SetHeaders(param map[string]string) *DeleteVPCRoutingTableRouteOptions {
	options.Headers = param
	return options
}

// DeleteVPNGatewayConnectionOptions : The DeleteVPNGatewayConnection options.
type DeleteVPNGatewayConnectionOptions struct {
	// The VPN gateway identifier.
	VPNGatewayID *string `validate:"required,ne="`

	// The VPN gateway connection identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteVPNGatewayConnectionOptions : Instantiate DeleteVPNGatewayConnectionOptions
func (*VpcV1) NewDeleteVPNGatewayConnectionOptions(vpnGatewayID string, id string) *DeleteVPNGatewayConnectionOptions {
	return &DeleteVPNGatewayConnectionOptions{
		VPNGatewayID: core.StringPtr(vpnGatewayID),
		ID:           core.StringPtr(id),
	}
}

// SetVPNGatewayID : Allow user to set VPNGatewayID
func (options *DeleteVPNGatewayConnectionOptions) SetVPNGatewayID(vpnGatewayID string) *DeleteVPNGatewayConnectionOptions {
	options.VPNGatewayID = core.StringPtr(vpnGatewayID)
	return options
}

// SetID : Allow user to set ID
func (options *DeleteVPNGatewayConnectionOptions) SetID(id string) *DeleteVPNGatewayConnectionOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteVPNGatewayConnectionOptions) SetHeaders(param map[string]string) *DeleteVPNGatewayConnectionOptions {
	options.Headers = param
	return options
}

// DeleteVPNGatewayOptions : The DeleteVPNGateway options.
type DeleteVPNGatewayOptions struct {
	// The VPN gateway identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewDeleteVPNGatewayOptions : Instantiate DeleteVPNGatewayOptions
func (*VpcV1) NewDeleteVPNGatewayOptions(id string) *DeleteVPNGatewayOptions {
	return &DeleteVPNGatewayOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *DeleteVPNGatewayOptions) SetID(id string) *DeleteVPNGatewayOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *DeleteVPNGatewayOptions) SetHeaders(param map[string]string) *DeleteVPNGatewayOptions {
	options.Headers = param
	return options
}

// EncryptionKeyIdentity : Identifies an encryption key by a unique property.
// Models which "extend" this model:
// - EncryptionKeyIdentityByCRN
type EncryptionKeyIdentity struct {
	// The CRN of the [Key Protect Root
	// Key](https://cloud.ibm.com/docs/key-protect?topic=key-protect-getting-started-tutorial) or [Hyper Protect Crypto
	// Service Root Key](https://cloud.ibm.com/docs/hs-crypto?topic=hs-crypto-get-started) for this resource.
	CRN *string `json:"crn,omitempty"`
}

func (*EncryptionKeyIdentity) isaEncryptionKeyIdentity() bool {
	return true
}

type EncryptionKeyIdentityIntf interface {
	isaEncryptionKeyIdentity() bool
}

// UnmarshalEncryptionKeyIdentity unmarshals an instance of EncryptionKeyIdentity from the specified map of raw messages.
func UnmarshalEncryptionKeyIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(EncryptionKeyIdentity)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// EncryptionKeyReference : EncryptionKeyReference struct
type EncryptionKeyReference struct {
	// The CRN of the [Key Protect Root
	// Key](https://cloud.ibm.com/docs/key-protect?topic=key-protect-getting-started-tutorial) or [Hyper Protect Crypto
	// Service Root Key](https://cloud.ibm.com/docs/hs-crypto?topic=hs-crypto-get-started) for this resource.
	CRN *string `json:"crn" validate:"required"`
}

// UnmarshalEncryptionKeyReference unmarshals an instance of EncryptionKeyReference from the specified map of raw messages.
func UnmarshalEncryptionKeyReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(EncryptionKeyReference)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// EndpointGateway : EndpointGateway struct
type EndpointGateway struct {
	// The date and time that the endpoint gateway was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The CRN for this endpoint gateway.
	CRN *string `json:"crn" validate:"required"`

	// The health of this resource.
	// - `ok`: Healthy
	// - `degraded`: Suffering from compromised performance, capacity, or connectivity
	// - `faulted`: Completely unreachable, inoperative, or otherwise entirely incapacitated
	// - `inapplicable`: The health state does not apply because of the current lifecycle state. A resource with a
	// lifecycle state of `failed` or `deleting` will have a health state of `inapplicable`. A `pending` resource may also
	// have this state.
	HealthState *string `json:"health_state" validate:"required"`

	// The URL for this endpoint gateway.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this endpoint gateway.
	ID *string `json:"id" validate:"required"`

	// Collection of reserved IPs bound to an endpoint gateway.
	Ips []ReservedIPReference `json:"ips" validate:"required"`

	// The lifecycle state of the endpoint gateway.
	LifecycleState *string `json:"lifecycle_state" validate:"required"`

	// The unique user-defined name for this endpoint gateway.
	Name *string `json:"name" validate:"required"`

	// The resource group for this endpoint gateway.
	ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`

	// The type of resource referenced.
	ResourceType *string `json:"resource_type" validate:"required"`

	// The fully qualified domain name for the target service.
	ServiceEndpoint *string `json:"service_endpoint,omitempty"`

	// Collection of fully qualified domain names for the target service.
	ServiceEndpoints []string `json:"service_endpoints" validate:"required"`

	// The target for this endpoint gateway.
	Target EndpointGatewayTargetIntf `json:"target" validate:"required"`

	// The VPC this endpoint gateway is serving.
	VPC *VPCReference `json:"vpc" validate:"required"`
}

// Constants associated with the EndpointGateway.HealthState property.
// The health of this resource.
// - `ok`: Healthy
// - `degraded`: Suffering from compromised performance, capacity, or connectivity
// - `faulted`: Completely unreachable, inoperative, or otherwise entirely incapacitated
// - `inapplicable`: The health state does not apply because of the current lifecycle state. A resource with a lifecycle
// state of `failed` or `deleting` will have a health state of `inapplicable`. A `pending` resource may also have this
// state.
const (
	EndpointGatewayHealthStateDegradedConst     = "degraded"
	EndpointGatewayHealthStateFaultedConst      = "faulted"
	EndpointGatewayHealthStateInapplicableConst = "inapplicable"
	EndpointGatewayHealthStateOkConst           = "ok"
)

// Constants associated with the EndpointGateway.LifecycleState property.
// The lifecycle state of the endpoint gateway.
const (
	EndpointGatewayLifecycleStateDeletedConst   = "deleted"
	EndpointGatewayLifecycleStateDeletingConst  = "deleting"
	EndpointGatewayLifecycleStateFailedConst    = "failed"
	EndpointGatewayLifecycleStatePendingConst   = "pending"
	EndpointGatewayLifecycleStateStableConst    = "stable"
	EndpointGatewayLifecycleStateSuspendedConst = "suspended"
	EndpointGatewayLifecycleStateUpdatingConst  = "updating"
	EndpointGatewayLifecycleStateWaitingConst   = "waiting"
)

// Constants associated with the EndpointGateway.ResourceType property.
// The type of resource referenced.
const (
	EndpointGatewayResourceTypeEndpointGatewayConst = "endpoint_gateway"
)

// UnmarshalEndpointGateway unmarshals an instance of EndpointGateway from the specified map of raw messages.
func UnmarshalEndpointGateway(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(EndpointGateway)
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "health_state", &obj.HealthState)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "ips", &obj.Ips, UnmarshalReservedIPReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "service_endpoint", &obj.ServiceEndpoint)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "service_endpoints", &obj.ServiceEndpoints)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalEndpointGatewayTarget)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// EndpointGatewayCollection : EndpointGatewayCollection struct
type EndpointGatewayCollection struct {
	// Collection of endpoint gateways.
	EndpointGateways []EndpointGateway `json:"endpoint_gateways" validate:"required"`

	// A link to the first page of resources.
	First *EndpointGatewayCollectionFirst `json:"first" validate:"required"`

	// The maximum number of resources that can be returned by the request.
	Limit *int64 `json:"limit" validate:"required"`

	// A link to the next page of resources. This property is present for all pages
	// except the last page.
	Next *EndpointGatewayCollectionNext `json:"next,omitempty"`

	// The total number of resources across all pages.
	TotalCount *int64 `json:"total_count" validate:"required"`
}

// UnmarshalEndpointGatewayCollection unmarshals an instance of EndpointGatewayCollection from the specified map of raw messages.
func UnmarshalEndpointGatewayCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(EndpointGatewayCollection)
	err = core.UnmarshalModel(m, "endpoint_gateways", &obj.EndpointGateways, UnmarshalEndpointGateway)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalEndpointGatewayCollectionFirst)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalEndpointGatewayCollectionNext)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// EndpointGatewayCollectionFirst : A link to the first page of resources.
type EndpointGatewayCollectionFirst struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalEndpointGatewayCollectionFirst unmarshals an instance of EndpointGatewayCollectionFirst from the specified map of raw messages.
func UnmarshalEndpointGatewayCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(EndpointGatewayCollectionFirst)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// EndpointGatewayCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
type EndpointGatewayCollectionNext struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalEndpointGatewayCollectionNext unmarshals an instance of EndpointGatewayCollectionNext from the specified map of raw messages.
func UnmarshalEndpointGatewayCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(EndpointGatewayCollectionNext)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// EndpointGatewayPatch : EndpointGatewayPatch struct
type EndpointGatewayPatch struct {
	// The user-defined name for this endpoint gateway. Names must be unique within the VPC this endpoint gateway is
	// serving.
	Name *string `json:"name,omitempty"`
}

// UnmarshalEndpointGatewayPatch unmarshals an instance of EndpointGatewayPatch from the specified map of raw messages.
func UnmarshalEndpointGatewayPatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(EndpointGatewayPatch)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the EndpointGatewayPatch
func (endpointGatewayPatch *EndpointGatewayPatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(endpointGatewayPatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// EndpointGatewayReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type EndpointGatewayReferenceDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalEndpointGatewayReferenceDeleted unmarshals an instance of EndpointGatewayReferenceDeleted from the specified map of raw messages.
func UnmarshalEndpointGatewayReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(EndpointGatewayReferenceDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// EndpointGatewayReservedIP : A reserved IP to bind to the endpoint gateway. This can be an existing reserved IP, or a prototype used to allocate a
// reserved IP. The reserved IP will be bound to the endpoint gateway to function as a virtual private endpoint for the
// service.
// Models which "extend" this model:
// - EndpointGatewayReservedIPReservedIPIdentity
// - EndpointGatewayReservedIPReservedIPPrototypeTargetContext
type EndpointGatewayReservedIP struct {
	// The unique identifier for this reserved IP.
	ID *string `json:"id,omitempty"`

	// The URL for this reserved IP.
	Href *string `json:"href,omitempty"`

	// If set to `true`, this reserved IP will be automatically deleted when the target is deleted or when the reserved IP
	// is unbound.
	AutoDelete *bool `json:"auto_delete,omitempty"`

	// The user-defined name for this reserved IP. If not specified, the name will be a hyphenated list of
	// randomly-selected words. Names must be unique within the subnet the reserved IP resides in. Names beginning with
	// `ibm-` are reserved for provider-owned resources.
	Name *string `json:"name,omitempty"`

	// The subnet in which to create this reserved IP.
	Subnet SubnetIdentityIntf `json:"subnet,omitempty"`
}

func (*EndpointGatewayReservedIP) isaEndpointGatewayReservedIP() bool {
	return true
}

type EndpointGatewayReservedIPIntf interface {
	isaEndpointGatewayReservedIP() bool
}

// UnmarshalEndpointGatewayReservedIP unmarshals an instance of EndpointGatewayReservedIP from the specified map of raw messages.
func UnmarshalEndpointGatewayReservedIP(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(EndpointGatewayReservedIP)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// EndpointGatewayTarget : The target for this endpoint gateway.
// Models which "extend" this model:
// - EndpointGatewayTargetProviderCloudServiceReference
// - EndpointGatewayTargetProviderInfrastructureServiceReference
type EndpointGatewayTarget struct {
	// The CRN for this provider cloud service, or the CRN for the user's instance of a provider cloud service.
	CRN *string `json:"crn,omitempty"`

	// The type of target.
	ResourceType *string `json:"resource_type,omitempty"`

	// The name of a provider infrastructure service. Must be:
	// - `ibm-ntp-server`: An NTP (Network Time Protocol) server provided by IBM.
	Name *string `json:"name,omitempty"`
}

// Constants associated with the EndpointGatewayTarget.ResourceType property.
// The type of target.
const (
	EndpointGatewayTargetResourceTypeProviderCloudServiceConst = "provider_cloud_service"
)

func (*EndpointGatewayTarget) isaEndpointGatewayTarget() bool {
	return true
}

type EndpointGatewayTargetIntf interface {
	isaEndpointGatewayTarget() bool
}

// UnmarshalEndpointGatewayTarget unmarshals an instance of EndpointGatewayTarget from the specified map of raw messages.
func UnmarshalEndpointGatewayTarget(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(EndpointGatewayTarget)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// EndpointGatewayTargetPrototype : The target for this endpoint gateway.
// Models which "extend" this model:
// - EndpointGatewayTargetPrototypeProviderCloudServiceIdentity
// - EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity
type EndpointGatewayTargetPrototype struct {
	// The type of target for this endpoint gateway.
	ResourceType *string `json:"resource_type" validate:"required"`

	// The CRN for this provider cloud service, or the CRN for the user's instance of a provider cloud service.
	CRN *string `json:"crn,omitempty"`

	// The name of a provider infrastructure service. Must be:
	// - `ibm-ntp-server`: An NTP (Network Time Protocol) server provided by IBM.
	Name *string `json:"name,omitempty"`
}

// Constants associated with the EndpointGatewayTargetPrototype.ResourceType property.
// The type of target for this endpoint gateway.
const (
	EndpointGatewayTargetPrototypeResourceTypeProviderCloudServiceConst          = "provider_cloud_service"
	EndpointGatewayTargetPrototypeResourceTypeProviderInfrastructureServiceConst = "provider_infrastructure_service"
)

func (*EndpointGatewayTargetPrototype) isaEndpointGatewayTargetPrototype() bool {
	return true
}

type EndpointGatewayTargetPrototypeIntf interface {
	isaEndpointGatewayTargetPrototype() bool
}

// UnmarshalEndpointGatewayTargetPrototype unmarshals an instance of EndpointGatewayTargetPrototype from the specified map of raw messages.
func UnmarshalEndpointGatewayTargetPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	// Retrieve discriminator value to determine correct "subclass".
	var discValue string
	err = core.UnmarshalPrimitive(m, "resource_type", &discValue)
	if err != nil {
		err = fmt.Errorf("error unmarshalling discriminator property 'resource_type': %s", err.Error())
		return
	}
	if discValue == "" {
		err = fmt.Errorf("required discriminator property 'resource_type' not found in JSON object")
		return
	}
	if discValue == "provider_cloud_service" {
		err = core.UnmarshalModel(m, "", result, UnmarshalEndpointGatewayTargetPrototypeProviderCloudServiceIdentity)
	} else if discValue == "provider_infrastructure_service" {
		err = core.UnmarshalModel(m, "", result, UnmarshalEndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity)
	} else {
		err = fmt.Errorf("unrecognized value for discriminator property 'resource_type': %s", discValue)
	}
	return
}

// FloatingIP : FloatingIP struct
type FloatingIP struct {
	// The globally unique IP address.
	Address *string `json:"address" validate:"required"`

	// The date and time that the floating IP was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The CRN for this floating IP.
	CRN *string `json:"crn" validate:"required"`

	// The URL for this floating IP.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this floating IP.
	ID *string `json:"id" validate:"required"`

	// The unique user-defined name for this floating IP.
	Name *string `json:"name" validate:"required"`

	// The resource group for this floating IP.
	ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`

	// The status of the floating IP.
	Status *string `json:"status" validate:"required"`

	// The target of this floating IP.
	Target FloatingIPTargetIntf `json:"target,omitempty"`

	// The zone this floating IP resides in.
	Zone *ZoneReference `json:"zone" validate:"required"`
}

// Constants associated with the FloatingIP.Status property.
// The status of the floating IP.
const (
	FloatingIPStatusAvailableConst = "available"
	FloatingIPStatusDeletingConst  = "deleting"
	FloatingIPStatusFailedConst    = "failed"
	FloatingIPStatusPendingConst   = "pending"
)

// UnmarshalFloatingIP unmarshals an instance of FloatingIP from the specified map of raw messages.
func UnmarshalFloatingIP(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FloatingIP)
	err = core.UnmarshalPrimitive(m, "address", &obj.Address)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "status", &obj.Status)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalFloatingIPTarget)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneReference)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FloatingIPByTargetNetworkInterfaceIdentity : The network interface this floating IP is to be bound to.
// Models which "extend" this model:
// - FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID
// - FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref
type FloatingIPByTargetNetworkInterfaceIdentity struct {
	// The unique identifier for this network interface.
	ID *string `json:"id,omitempty"`

	// The URL for this network interface.
	Href *string `json:"href,omitempty"`
}

func (*FloatingIPByTargetNetworkInterfaceIdentity) isaFloatingIPByTargetNetworkInterfaceIdentity() bool {
	return true
}

type FloatingIPByTargetNetworkInterfaceIdentityIntf interface {
	isaFloatingIPByTargetNetworkInterfaceIdentity() bool
}

// UnmarshalFloatingIPByTargetNetworkInterfaceIdentity unmarshals an instance of FloatingIPByTargetNetworkInterfaceIdentity from the specified map of raw messages.
func UnmarshalFloatingIPByTargetNetworkInterfaceIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FloatingIPByTargetNetworkInterfaceIdentity)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FloatingIPCollection : FloatingIPCollection struct
type FloatingIPCollection struct {
	// A link to the first page of resources.
	First *FloatingIPCollectionFirst `json:"first" validate:"required"`

	// Collection of floating IPs.
	FloatingIps []FloatingIP `json:"floating_ips" validate:"required"`

	// The maximum number of resources that can be returned by the request.
	Limit *int64 `json:"limit" validate:"required"`

	// A link to the next page of resources. This property is present for all pages
	// except the last page.
	Next *FloatingIPCollectionNext `json:"next,omitempty"`

	// The total number of resources across all pages.
	TotalCount *int64 `json:"total_count" validate:"required"`
}

// UnmarshalFloatingIPCollection unmarshals an instance of FloatingIPCollection from the specified map of raw messages.
func UnmarshalFloatingIPCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FloatingIPCollection)
	err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalFloatingIPCollectionFirst)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "floating_ips", &obj.FloatingIps, UnmarshalFloatingIP)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalFloatingIPCollectionNext)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FloatingIPCollectionFirst : A link to the first page of resources.
type FloatingIPCollectionFirst struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalFloatingIPCollectionFirst unmarshals an instance of FloatingIPCollectionFirst from the specified map of raw messages.
func UnmarshalFloatingIPCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FloatingIPCollectionFirst)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FloatingIPCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
type FloatingIPCollectionNext struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalFloatingIPCollectionNext unmarshals an instance of FloatingIPCollectionNext from the specified map of raw messages.
func UnmarshalFloatingIPCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FloatingIPCollectionNext)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FloatingIPPatch : FloatingIPPatch struct
type FloatingIPPatch struct {
	// The unique user-defined name for this floating IP.
	Name *string `json:"name,omitempty"`

	// A new network interface to bind this floating IP to, replacing any existing binding.
	// For this request to succeed, the existing floating IP must not be required by another
	// resource, such as a public gateway.
	Target FloatingIPPatchTargetNetworkInterfaceIdentityIntf `json:"target,omitempty"`
}

// UnmarshalFloatingIPPatch unmarshals an instance of FloatingIPPatch from the specified map of raw messages.
func UnmarshalFloatingIPPatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FloatingIPPatch)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalFloatingIPPatchTargetNetworkInterfaceIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the FloatingIPPatch
func (floatingIPPatch *FloatingIPPatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(floatingIPPatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// FloatingIPPatchTargetNetworkInterfaceIdentity : A new network interface to bind this floating IP to, replacing any existing binding. For this request to succeed, the
// existing floating IP must not be required by another resource, such as a public gateway.
// Models which "extend" this model:
// - FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID
// - FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref
type FloatingIPPatchTargetNetworkInterfaceIdentity struct {
	// The unique identifier for this network interface.
	ID *string `json:"id,omitempty"`

	// The URL for this network interface.
	Href *string `json:"href,omitempty"`
}

func (*FloatingIPPatchTargetNetworkInterfaceIdentity) isaFloatingIPPatchTargetNetworkInterfaceIdentity() bool {
	return true
}

type FloatingIPPatchTargetNetworkInterfaceIdentityIntf interface {
	isaFloatingIPPatchTargetNetworkInterfaceIdentity() bool
}

// UnmarshalFloatingIPPatchTargetNetworkInterfaceIdentity unmarshals an instance of FloatingIPPatchTargetNetworkInterfaceIdentity from the specified map of raw messages.
func UnmarshalFloatingIPPatchTargetNetworkInterfaceIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FloatingIPPatchTargetNetworkInterfaceIdentity)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FloatingIPPrototype : FloatingIPPrototype struct
// Models which "extend" this model:
// - FloatingIPPrototypeFloatingIPByZone
// - FloatingIPPrototypeFloatingIPByTarget
type FloatingIPPrototype struct {
	// The unique user-defined name for this floating IP. If unspecified, the name will be a hyphenated list of
	// randomly-selected words.
	Name *string `json:"name,omitempty"`

	// The resource group to use. If unspecified, the account's [default resource
	// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
	ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`

	// The zone this floating IP will reside in.
	Zone ZoneIdentityIntf `json:"zone,omitempty"`

	// The network interface this floating IP is to be bound to.
	Target FloatingIPByTargetNetworkInterfaceIdentityIntf `json:"target,omitempty"`
}

func (*FloatingIPPrototype) isaFloatingIPPrototype() bool {
	return true
}

type FloatingIPPrototypeIntf interface {
	isaFloatingIPPrototype() bool
}

// UnmarshalFloatingIPPrototype unmarshals an instance of FloatingIPPrototype from the specified map of raw messages.
func UnmarshalFloatingIPPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FloatingIPPrototype)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalFloatingIPByTargetNetworkInterfaceIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FloatingIPReference : FloatingIPReference struct
type FloatingIPReference struct {
	// The globally unique IP address.
	Address *string `json:"address" validate:"required"`

	// The CRN for this floating IP.
	CRN *string `json:"crn" validate:"required"`

	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *FloatingIPReferenceDeleted `json:"deleted,omitempty"`

	// The URL for this floating IP.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this floating IP.
	ID *string `json:"id" validate:"required"`

	// The unique user-defined name for this floating IP.
	Name *string `json:"name" validate:"required"`
}

// UnmarshalFloatingIPReference unmarshals an instance of FloatingIPReference from the specified map of raw messages.
func UnmarshalFloatingIPReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FloatingIPReference)
	err = core.UnmarshalPrimitive(m, "address", &obj.Address)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalFloatingIPReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FloatingIPReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type FloatingIPReferenceDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalFloatingIPReferenceDeleted unmarshals an instance of FloatingIPReferenceDeleted from the specified map of raw messages.
func UnmarshalFloatingIPReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FloatingIPReferenceDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FloatingIPTarget : The target of this floating IP.
// Models which "extend" this model:
// - FloatingIPTargetNetworkInterfaceReference
// - FloatingIPTargetPublicGatewayReference
type FloatingIPTarget struct {
	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *NetworkInterfaceReferenceDeleted `json:"deleted,omitempty"`

	// The URL for this network interface.
	Href *string `json:"href,omitempty"`

	// The unique identifier for this network interface.
	ID *string `json:"id,omitempty"`

	// The user-defined name for this network interface.
	Name *string `json:"name,omitempty"`

	// The primary IPv4 address.
	PrimaryIpv4Address *string `json:"primary_ipv4_address,omitempty"`

	// The resource type.
	ResourceType *string `json:"resource_type,omitempty"`

	// The CRN for this public gateway.
	CRN *string `json:"crn,omitempty"`
}

// Constants associated with the FloatingIPTarget.ResourceType property.
// The resource type.
const (
	FloatingIPTargetResourceTypeNetworkInterfaceConst = "network_interface"
)

func (*FloatingIPTarget) isaFloatingIPTarget() bool {
	return true
}

type FloatingIPTargetIntf interface {
	isaFloatingIPTarget() bool
}

// UnmarshalFloatingIPTarget unmarshals an instance of FloatingIPTarget from the specified map of raw messages.
func UnmarshalFloatingIPTarget(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FloatingIPTarget)
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalNetworkInterfaceReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "primary_ipv4_address", &obj.PrimaryIpv4Address)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FloatingIPUnpaginatedCollection : FloatingIPUnpaginatedCollection struct
type FloatingIPUnpaginatedCollection struct {
	// Collection of floating IPs.
	FloatingIps []FloatingIP `json:"floating_ips" validate:"required"`
}

// UnmarshalFloatingIPUnpaginatedCollection unmarshals an instance of FloatingIPUnpaginatedCollection from the specified map of raw messages.
func UnmarshalFloatingIPUnpaginatedCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FloatingIPUnpaginatedCollection)
	err = core.UnmarshalModel(m, "floating_ips", &obj.FloatingIps, UnmarshalFloatingIP)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FlowLogCollector : FlowLogCollector struct
type FlowLogCollector struct {
	// Indicates whether this collector is active.
	Active *bool `json:"active" validate:"required"`

	// If set to `true`, this flow log collector will be automatically deleted when the target is deleted.
	AutoDelete *bool `json:"auto_delete" validate:"required"`

	// The date and time that the flow log collector was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The CRN for this flow log collector.
	CRN *string `json:"crn" validate:"required"`

	// The URL for this flow log collector.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this flow log collector.
	ID *string `json:"id" validate:"required"`

	// The lifecycle state of the flow log collector.
	LifecycleState *string `json:"lifecycle_state" validate:"required"`

	// The unique user-defined name for this flow log collector.
	Name *string `json:"name" validate:"required"`

	// The resource group for this flow log collector.
	ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`

	// The Cloud Object Storage bucket where the collected flows are logged.
	StorageBucket *CloudObjectStorageBucketReference `json:"storage_bucket" validate:"required"`

	// The target this collector is collecting flow logs for. If the target is an instance,
	// subnet, or VPC, flow logs will not be collected for any network interfaces within the
	// target that are themselves the target of a more specific flow log collector.
	Target FlowLogCollectorTargetIntf `json:"target" validate:"required"`

	// The VPC this flow log collector is associated with.
	VPC *VPCReference `json:"vpc" validate:"required"`
}

// Constants associated with the FlowLogCollector.LifecycleState property.
// The lifecycle state of the flow log collector.
const (
	FlowLogCollectorLifecycleStateDeletedConst   = "deleted"
	FlowLogCollectorLifecycleStateDeletingConst  = "deleting"
	FlowLogCollectorLifecycleStateFailedConst    = "failed"
	FlowLogCollectorLifecycleStatePendingConst   = "pending"
	FlowLogCollectorLifecycleStateStableConst    = "stable"
	FlowLogCollectorLifecycleStateSuspendedConst = "suspended"
	FlowLogCollectorLifecycleStateUpdatingConst  = "updating"
	FlowLogCollectorLifecycleStateWaitingConst   = "waiting"
)

// UnmarshalFlowLogCollector unmarshals an instance of FlowLogCollector from the specified map of raw messages.
func UnmarshalFlowLogCollector(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FlowLogCollector)
	err = core.UnmarshalPrimitive(m, "active", &obj.Active)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "storage_bucket", &obj.StorageBucket, UnmarshalCloudObjectStorageBucketReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalFlowLogCollectorTarget)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FlowLogCollectorCollection : FlowLogCollectorCollection struct
type FlowLogCollectorCollection struct {
	// A link to the first page of resources.
	First *FlowLogCollectorCollectionFirst `json:"first" validate:"required"`

	// Collection of flow log collectors.
	FlowLogCollectors []FlowLogCollector `json:"flow_log_collectors" validate:"required"`

	// The maximum number of resources that can be returned by the request.
	Limit *int64 `json:"limit" validate:"required"`

	// A link to the next page of resources. This property is present for all pages
	// except the last page.
	Next *FlowLogCollectorCollectionNext `json:"next,omitempty"`

	// The total number of resources across all pages.
	TotalCount *int64 `json:"total_count" validate:"required"`
}

// UnmarshalFlowLogCollectorCollection unmarshals an instance of FlowLogCollectorCollection from the specified map of raw messages.
func UnmarshalFlowLogCollectorCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FlowLogCollectorCollection)
	err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalFlowLogCollectorCollectionFirst)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "flow_log_collectors", &obj.FlowLogCollectors, UnmarshalFlowLogCollector)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalFlowLogCollectorCollectionNext)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FlowLogCollectorCollectionFirst : A link to the first page of resources.
type FlowLogCollectorCollectionFirst struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalFlowLogCollectorCollectionFirst unmarshals an instance of FlowLogCollectorCollectionFirst from the specified map of raw messages.
func UnmarshalFlowLogCollectorCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FlowLogCollectorCollectionFirst)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FlowLogCollectorCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
type FlowLogCollectorCollectionNext struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalFlowLogCollectorCollectionNext unmarshals an instance of FlowLogCollectorCollectionNext from the specified map of raw messages.
func UnmarshalFlowLogCollectorCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FlowLogCollectorCollectionNext)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FlowLogCollectorPatch : FlowLogCollectorPatch struct
type FlowLogCollectorPatch struct {
	// Indicates whether this collector is active. Updating to false deactivates the collector and updating to true
	// activates the collector.
	Active *bool `json:"active,omitempty"`

	// The unique user-defined name for this flow log collector.
	Name *string `json:"name,omitempty"`
}

// UnmarshalFlowLogCollectorPatch unmarshals an instance of FlowLogCollectorPatch from the specified map of raw messages.
func UnmarshalFlowLogCollectorPatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FlowLogCollectorPatch)
	err = core.UnmarshalPrimitive(m, "active", &obj.Active)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the FlowLogCollectorPatch
func (flowLogCollectorPatch *FlowLogCollectorPatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(flowLogCollectorPatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// FlowLogCollectorTarget : The target this collector is collecting flow logs for. If the target is an instance, subnet, or VPC, flow logs will
// not be collected for any network interfaces within the target that are themselves the target of a more specific flow
// log collector.
// Models which "extend" this model:
// - FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext
// - FlowLogCollectorTargetInstanceReference
// - FlowLogCollectorTargetSubnetReference
// - FlowLogCollectorTargetVPCReference
type FlowLogCollectorTarget struct {
	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *NetworkInterfaceReferenceTargetContextDeleted `json:"deleted,omitempty"`

	// The URL for this network interface.
	Href *string `json:"href,omitempty"`

	// The unique identifier for this network interface.
	ID *string `json:"id,omitempty"`

	// The user-defined name for this network interface.
	Name *string `json:"name,omitempty"`

	// The resource type.
	ResourceType *string `json:"resource_type,omitempty"`

	// The CRN for this virtual server instance.
	CRN *string `json:"crn,omitempty"`
}

// Constants associated with the FlowLogCollectorTarget.ResourceType property.
// The resource type.
const (
	FlowLogCollectorTargetResourceTypeNetworkInterfaceConst = "network_interface"
)

func (*FlowLogCollectorTarget) isaFlowLogCollectorTarget() bool {
	return true
}

type FlowLogCollectorTargetIntf interface {
	isaFlowLogCollectorTarget() bool
}

// UnmarshalFlowLogCollectorTarget unmarshals an instance of FlowLogCollectorTarget from the specified map of raw messages.
func UnmarshalFlowLogCollectorTarget(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FlowLogCollectorTarget)
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalNetworkInterfaceReferenceTargetContextDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FlowLogCollectorTargetPrototype : The target this collector will collect flow logs for. If the target is an instance, subnet, or VPC, flow logs will
// not be collected for any network interfaces within the target that are themselves the target of a more specific flow
// log collector.
// Models which "extend" this model:
// - FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity
// - FlowLogCollectorTargetPrototypeInstanceIdentity
// - FlowLogCollectorTargetPrototypeSubnetIdentity
// - FlowLogCollectorTargetPrototypeVPCIdentity
type FlowLogCollectorTargetPrototype struct {
	// The unique identifier for this network interface.
	ID *string `json:"id,omitempty"`

	// The URL for this network interface.
	Href *string `json:"href,omitempty"`

	// The CRN for this virtual server instance.
	CRN *string `json:"crn,omitempty"`
}

func (*FlowLogCollectorTargetPrototype) isaFlowLogCollectorTargetPrototype() bool {
	return true
}

type FlowLogCollectorTargetPrototypeIntf interface {
	isaFlowLogCollectorTargetPrototype() bool
}

// UnmarshalFlowLogCollectorTargetPrototype unmarshals an instance of FlowLogCollectorTargetPrototype from the specified map of raw messages.
func UnmarshalFlowLogCollectorTargetPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FlowLogCollectorTargetPrototype)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// GetDedicatedHostDiskOptions : The GetDedicatedHostDisk options.
type GetDedicatedHostDiskOptions struct {
	// The dedicated host identifier.
	DedicatedHostID *string `validate:"required,ne="`

	// The dedicated host disk identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetDedicatedHostDiskOptions : Instantiate GetDedicatedHostDiskOptions
func (*VpcV1) NewGetDedicatedHostDiskOptions(dedicatedHostID string, id string) *GetDedicatedHostDiskOptions {
	return &GetDedicatedHostDiskOptions{
		DedicatedHostID: core.StringPtr(dedicatedHostID),
		ID:              core.StringPtr(id),
	}
}

// SetDedicatedHostID : Allow user to set DedicatedHostID
func (options *GetDedicatedHostDiskOptions) SetDedicatedHostID(dedicatedHostID string) *GetDedicatedHostDiskOptions {
	options.DedicatedHostID = core.StringPtr(dedicatedHostID)
	return options
}

// SetID : Allow user to set ID
func (options *GetDedicatedHostDiskOptions) SetID(id string) *GetDedicatedHostDiskOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetDedicatedHostDiskOptions) SetHeaders(param map[string]string) *GetDedicatedHostDiskOptions {
	options.Headers = param
	return options
}

// GetDedicatedHostGroupOptions : The GetDedicatedHostGroup options.
type GetDedicatedHostGroupOptions struct {
	// The dedicated host group identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetDedicatedHostGroupOptions : Instantiate GetDedicatedHostGroupOptions
func (*VpcV1) NewGetDedicatedHostGroupOptions(id string) *GetDedicatedHostGroupOptions {
	return &GetDedicatedHostGroupOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *GetDedicatedHostGroupOptions) SetID(id string) *GetDedicatedHostGroupOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetDedicatedHostGroupOptions) SetHeaders(param map[string]string) *GetDedicatedHostGroupOptions {
	options.Headers = param
	return options
}

// GetDedicatedHostOptions : The GetDedicatedHost options.
type GetDedicatedHostOptions struct {
	// The dedicated host identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetDedicatedHostOptions : Instantiate GetDedicatedHostOptions
func (*VpcV1) NewGetDedicatedHostOptions(id string) *GetDedicatedHostOptions {
	return &GetDedicatedHostOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *GetDedicatedHostOptions) SetID(id string) *GetDedicatedHostOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetDedicatedHostOptions) SetHeaders(param map[string]string) *GetDedicatedHostOptions {
	options.Headers = param
	return options
}

// GetDedicatedHostProfileOptions : The GetDedicatedHostProfile options.
type GetDedicatedHostProfileOptions struct {
	// The dedicated host profile name.
	Name *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetDedicatedHostProfileOptions : Instantiate GetDedicatedHostProfileOptions
func (*VpcV1) NewGetDedicatedHostProfileOptions(name string) *GetDedicatedHostProfileOptions {
	return &GetDedicatedHostProfileOptions{
		Name: core.StringPtr(name),
	}
}

// SetName : Allow user to set Name
func (options *GetDedicatedHostProfileOptions) SetName(name string) *GetDedicatedHostProfileOptions {
	options.Name = core.StringPtr(name)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetDedicatedHostProfileOptions) SetHeaders(param map[string]string) *GetDedicatedHostProfileOptions {
	options.Headers = param
	return options
}

// GetEndpointGatewayIPOptions : The GetEndpointGatewayIP options.
type GetEndpointGatewayIPOptions struct {
	// The endpoint gateway identifier.
	EndpointGatewayID *string `validate:"required,ne="`

	// The reserved IP identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetEndpointGatewayIPOptions : Instantiate GetEndpointGatewayIPOptions
func (*VpcV1) NewGetEndpointGatewayIPOptions(endpointGatewayID string, id string) *GetEndpointGatewayIPOptions {
	return &GetEndpointGatewayIPOptions{
		EndpointGatewayID: core.StringPtr(endpointGatewayID),
		ID:                core.StringPtr(id),
	}
}

// SetEndpointGatewayID : Allow user to set EndpointGatewayID
func (options *GetEndpointGatewayIPOptions) SetEndpointGatewayID(endpointGatewayID string) *GetEndpointGatewayIPOptions {
	options.EndpointGatewayID = core.StringPtr(endpointGatewayID)
	return options
}

// SetID : Allow user to set ID
func (options *GetEndpointGatewayIPOptions) SetID(id string) *GetEndpointGatewayIPOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetEndpointGatewayIPOptions) SetHeaders(param map[string]string) *GetEndpointGatewayIPOptions {
	options.Headers = param
	return options
}

// GetEndpointGatewayOptions : The GetEndpointGateway options.
type GetEndpointGatewayOptions struct {
	// The endpoint gateway identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetEndpointGatewayOptions : Instantiate GetEndpointGatewayOptions
func (*VpcV1) NewGetEndpointGatewayOptions(id string) *GetEndpointGatewayOptions {
	return &GetEndpointGatewayOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *GetEndpointGatewayOptions) SetID(id string) *GetEndpointGatewayOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetEndpointGatewayOptions) SetHeaders(param map[string]string) *GetEndpointGatewayOptions {
	options.Headers = param
	return options
}

// GetFloatingIPOptions : The GetFloatingIP options.
type GetFloatingIPOptions struct {
	// The floating IP identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetFloatingIPOptions : Instantiate GetFloatingIPOptions
func (*VpcV1) NewGetFloatingIPOptions(id string) *GetFloatingIPOptions {
	return &GetFloatingIPOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *GetFloatingIPOptions) SetID(id string) *GetFloatingIPOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetFloatingIPOptions) SetHeaders(param map[string]string) *GetFloatingIPOptions {
	options.Headers = param
	return options
}

// GetFlowLogCollectorOptions : The GetFlowLogCollector options.
type GetFlowLogCollectorOptions struct {
	// The flow log collector identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetFlowLogCollectorOptions : Instantiate GetFlowLogCollectorOptions
func (*VpcV1) NewGetFlowLogCollectorOptions(id string) *GetFlowLogCollectorOptions {
	return &GetFlowLogCollectorOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *GetFlowLogCollectorOptions) SetID(id string) *GetFlowLogCollectorOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetFlowLogCollectorOptions) SetHeaders(param map[string]string) *GetFlowLogCollectorOptions {
	options.Headers = param
	return options
}

// GetIkePolicyOptions : The GetIkePolicy options.
type GetIkePolicyOptions struct {
	// The IKE policy identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetIkePolicyOptions : Instantiate GetIkePolicyOptions
func (*VpcV1) NewGetIkePolicyOptions(id string) *GetIkePolicyOptions {
	return &GetIkePolicyOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *GetIkePolicyOptions) SetID(id string) *GetIkePolicyOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetIkePolicyOptions) SetHeaders(param map[string]string) *GetIkePolicyOptions {
	options.Headers = param
	return options
}

// GetImageOptions : The GetImage options.
type GetImageOptions struct {
	// The image identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetImageOptions : Instantiate GetImageOptions
func (*VpcV1) NewGetImageOptions(id string) *GetImageOptions {
	return &GetImageOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *GetImageOptions) SetID(id string) *GetImageOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetImageOptions) SetHeaders(param map[string]string) *GetImageOptions {
	options.Headers = param
	return options
}

// GetInstanceDiskOptions : The GetInstanceDisk options.
type GetInstanceDiskOptions struct {
	// The instance identifier.
	InstanceID *string `validate:"required,ne="`

	// The instance disk identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetInstanceDiskOptions : Instantiate GetInstanceDiskOptions
func (*VpcV1) NewGetInstanceDiskOptions(instanceID string, id string) *GetInstanceDiskOptions {
	return &GetInstanceDiskOptions{
		InstanceID: core.StringPtr(instanceID),
		ID:         core.StringPtr(id),
	}
}

// SetInstanceID : Allow user to set InstanceID
func (options *GetInstanceDiskOptions) SetInstanceID(instanceID string) *GetInstanceDiskOptions {
	options.InstanceID = core.StringPtr(instanceID)
	return options
}

// SetID : Allow user to set ID
func (options *GetInstanceDiskOptions) SetID(id string) *GetInstanceDiskOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetInstanceDiskOptions) SetHeaders(param map[string]string) *GetInstanceDiskOptions {
	options.Headers = param
	return options
}

// GetInstanceGroupManagerActionOptions : The GetInstanceGroupManagerAction options.
type GetInstanceGroupManagerActionOptions struct {
	// The instance group identifier.
	InstanceGroupID *string `validate:"required,ne="`

	// The instance group manager identifier.
	InstanceGroupManagerID *string `validate:"required,ne="`

	// The instance group manager action identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetInstanceGroupManagerActionOptions : Instantiate GetInstanceGroupManagerActionOptions
func (*VpcV1) NewGetInstanceGroupManagerActionOptions(instanceGroupID string, instanceGroupManagerID string, id string) *GetInstanceGroupManagerActionOptions {
	return &GetInstanceGroupManagerActionOptions{
		InstanceGroupID:        core.StringPtr(instanceGroupID),
		InstanceGroupManagerID: core.StringPtr(instanceGroupManagerID),
		ID:                     core.StringPtr(id),
	}
}

// SetInstanceGroupID : Allow user to set InstanceGroupID
func (options *GetInstanceGroupManagerActionOptions) SetInstanceGroupID(instanceGroupID string) *GetInstanceGroupManagerActionOptions {
	options.InstanceGroupID = core.StringPtr(instanceGroupID)
	return options
}

// SetInstanceGroupManagerID : Allow user to set InstanceGroupManagerID
func (options *GetInstanceGroupManagerActionOptions) SetInstanceGroupManagerID(instanceGroupManagerID string) *GetInstanceGroupManagerActionOptions {
	options.InstanceGroupManagerID = core.StringPtr(instanceGroupManagerID)
	return options
}

// SetID : Allow user to set ID
func (options *GetInstanceGroupManagerActionOptions) SetID(id string) *GetInstanceGroupManagerActionOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetInstanceGroupManagerActionOptions) SetHeaders(param map[string]string) *GetInstanceGroupManagerActionOptions {
	options.Headers = param
	return options
}

// GetInstanceGroupManagerOptions : The GetInstanceGroupManager options.
type GetInstanceGroupManagerOptions struct {
	// The instance group identifier.
	InstanceGroupID *string `validate:"required,ne="`

	// The instance group manager identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetInstanceGroupManagerOptions : Instantiate GetInstanceGroupManagerOptions
func (*VpcV1) NewGetInstanceGroupManagerOptions(instanceGroupID string, id string) *GetInstanceGroupManagerOptions {
	return &GetInstanceGroupManagerOptions{
		InstanceGroupID: core.StringPtr(instanceGroupID),
		ID:              core.StringPtr(id),
	}
}

// SetInstanceGroupID : Allow user to set InstanceGroupID
func (options *GetInstanceGroupManagerOptions) SetInstanceGroupID(instanceGroupID string) *GetInstanceGroupManagerOptions {
	options.InstanceGroupID = core.StringPtr(instanceGroupID)
	return options
}

// SetID : Allow user to set ID
func (options *GetInstanceGroupManagerOptions) SetID(id string) *GetInstanceGroupManagerOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetInstanceGroupManagerOptions) SetHeaders(param map[string]string) *GetInstanceGroupManagerOptions {
	options.Headers = param
	return options
}

// GetInstanceGroupManagerPolicyOptions : The GetInstanceGroupManagerPolicy options.
type GetInstanceGroupManagerPolicyOptions struct {
	// The instance group identifier.
	InstanceGroupID *string `validate:"required,ne="`

	// The instance group manager identifier.
	InstanceGroupManagerID *string `validate:"required,ne="`

	// The instance group manager policy identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetInstanceGroupManagerPolicyOptions : Instantiate GetInstanceGroupManagerPolicyOptions
func (*VpcV1) NewGetInstanceGroupManagerPolicyOptions(instanceGroupID string, instanceGroupManagerID string, id string) *GetInstanceGroupManagerPolicyOptions {
	return &GetInstanceGroupManagerPolicyOptions{
		InstanceGroupID:        core.StringPtr(instanceGroupID),
		InstanceGroupManagerID: core.StringPtr(instanceGroupManagerID),
		ID:                     core.StringPtr(id),
	}
}

// SetInstanceGroupID : Allow user to set InstanceGroupID
func (options *GetInstanceGroupManagerPolicyOptions) SetInstanceGroupID(instanceGroupID string) *GetInstanceGroupManagerPolicyOptions {
	options.InstanceGroupID = core.StringPtr(instanceGroupID)
	return options
}

// SetInstanceGroupManagerID : Allow user to set InstanceGroupManagerID
func (options *GetInstanceGroupManagerPolicyOptions) SetInstanceGroupManagerID(instanceGroupManagerID string) *GetInstanceGroupManagerPolicyOptions {
	options.InstanceGroupManagerID = core.StringPtr(instanceGroupManagerID)
	return options
}

// SetID : Allow user to set ID
func (options *GetInstanceGroupManagerPolicyOptions) SetID(id string) *GetInstanceGroupManagerPolicyOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetInstanceGroupManagerPolicyOptions) SetHeaders(param map[string]string) *GetInstanceGroupManagerPolicyOptions {
	options.Headers = param
	return options
}

// GetInstanceGroupMembershipOptions : The GetInstanceGroupMembership options.
type GetInstanceGroupMembershipOptions struct {
	// The instance group identifier.
	InstanceGroupID *string `validate:"required,ne="`

	// The instance group membership identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetInstanceGroupMembershipOptions : Instantiate GetInstanceGroupMembershipOptions
func (*VpcV1) NewGetInstanceGroupMembershipOptions(instanceGroupID string, id string) *GetInstanceGroupMembershipOptions {
	return &GetInstanceGroupMembershipOptions{
		InstanceGroupID: core.StringPtr(instanceGroupID),
		ID:              core.StringPtr(id),
	}
}

// SetInstanceGroupID : Allow user to set InstanceGroupID
func (options *GetInstanceGroupMembershipOptions) SetInstanceGroupID(instanceGroupID string) *GetInstanceGroupMembershipOptions {
	options.InstanceGroupID = core.StringPtr(instanceGroupID)
	return options
}

// SetID : Allow user to set ID
func (options *GetInstanceGroupMembershipOptions) SetID(id string) *GetInstanceGroupMembershipOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetInstanceGroupMembershipOptions) SetHeaders(param map[string]string) *GetInstanceGroupMembershipOptions {
	options.Headers = param
	return options
}

// GetInstanceGroupOptions : The GetInstanceGroup options.
type GetInstanceGroupOptions struct {
	// The instance group identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetInstanceGroupOptions : Instantiate GetInstanceGroupOptions
func (*VpcV1) NewGetInstanceGroupOptions(id string) *GetInstanceGroupOptions {
	return &GetInstanceGroupOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *GetInstanceGroupOptions) SetID(id string) *GetInstanceGroupOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetInstanceGroupOptions) SetHeaders(param map[string]string) *GetInstanceGroupOptions {
	options.Headers = param
	return options
}

// GetInstanceInitializationOptions : The GetInstanceInitialization options.
type GetInstanceInitializationOptions struct {
	// The instance identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetInstanceInitializationOptions : Instantiate GetInstanceInitializationOptions
func (*VpcV1) NewGetInstanceInitializationOptions(id string) *GetInstanceInitializationOptions {
	return &GetInstanceInitializationOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *GetInstanceInitializationOptions) SetID(id string) *GetInstanceInitializationOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetInstanceInitializationOptions) SetHeaders(param map[string]string) *GetInstanceInitializationOptions {
	options.Headers = param
	return options
}

// GetInstanceNetworkInterfaceFloatingIPOptions : The GetInstanceNetworkInterfaceFloatingIP options.
type GetInstanceNetworkInterfaceFloatingIPOptions struct {
	// The instance identifier.
	InstanceID *string `validate:"required,ne="`

	// The network interface identifier.
	NetworkInterfaceID *string `validate:"required,ne="`

	// The floating IP identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetInstanceNetworkInterfaceFloatingIPOptions : Instantiate GetInstanceNetworkInterfaceFloatingIPOptions
func (*VpcV1) NewGetInstanceNetworkInterfaceFloatingIPOptions(instanceID string, networkInterfaceID string, id string) *GetInstanceNetworkInterfaceFloatingIPOptions {
	return &GetInstanceNetworkInterfaceFloatingIPOptions{
		InstanceID:         core.StringPtr(instanceID),
		NetworkInterfaceID: core.StringPtr(networkInterfaceID),
		ID:                 core.StringPtr(id),
	}
}

// SetInstanceID : Allow user to set InstanceID
func (options *GetInstanceNetworkInterfaceFloatingIPOptions) SetInstanceID(instanceID string) *GetInstanceNetworkInterfaceFloatingIPOptions {
	options.InstanceID = core.StringPtr(instanceID)
	return options
}

// SetNetworkInterfaceID : Allow user to set NetworkInterfaceID
func (options *GetInstanceNetworkInterfaceFloatingIPOptions) SetNetworkInterfaceID(networkInterfaceID string) *GetInstanceNetworkInterfaceFloatingIPOptions {
	options.NetworkInterfaceID = core.StringPtr(networkInterfaceID)
	return options
}

// SetID : Allow user to set ID
func (options *GetInstanceNetworkInterfaceFloatingIPOptions) SetID(id string) *GetInstanceNetworkInterfaceFloatingIPOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetInstanceNetworkInterfaceFloatingIPOptions) SetHeaders(param map[string]string) *GetInstanceNetworkInterfaceFloatingIPOptions {
	options.Headers = param
	return options
}

// GetInstanceNetworkInterfaceOptions : The GetInstanceNetworkInterface options.
type GetInstanceNetworkInterfaceOptions struct {
	// The instance identifier.
	InstanceID *string `validate:"required,ne="`

	// The network interface identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetInstanceNetworkInterfaceOptions : Instantiate GetInstanceNetworkInterfaceOptions
func (*VpcV1) NewGetInstanceNetworkInterfaceOptions(instanceID string, id string) *GetInstanceNetworkInterfaceOptions {
	return &GetInstanceNetworkInterfaceOptions{
		InstanceID: core.StringPtr(instanceID),
		ID:         core.StringPtr(id),
	}
}

// SetInstanceID : Allow user to set InstanceID
func (options *GetInstanceNetworkInterfaceOptions) SetInstanceID(instanceID string) *GetInstanceNetworkInterfaceOptions {
	options.InstanceID = core.StringPtr(instanceID)
	return options
}

// SetID : Allow user to set ID
func (options *GetInstanceNetworkInterfaceOptions) SetID(id string) *GetInstanceNetworkInterfaceOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetInstanceNetworkInterfaceOptions) SetHeaders(param map[string]string) *GetInstanceNetworkInterfaceOptions {
	options.Headers = param
	return options
}

// GetInstanceOptions : The GetInstance options.
type GetInstanceOptions struct {
	// The instance identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetInstanceOptions : Instantiate GetInstanceOptions
func (*VpcV1) NewGetInstanceOptions(id string) *GetInstanceOptions {
	return &GetInstanceOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *GetInstanceOptions) SetID(id string) *GetInstanceOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetInstanceOptions) SetHeaders(param map[string]string) *GetInstanceOptions {
	options.Headers = param
	return options
}

// GetInstanceProfileOptions : The GetInstanceProfile options.
type GetInstanceProfileOptions struct {
	// The instance profile name.
	Name *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetInstanceProfileOptions : Instantiate GetInstanceProfileOptions
func (*VpcV1) NewGetInstanceProfileOptions(name string) *GetInstanceProfileOptions {
	return &GetInstanceProfileOptions{
		Name: core.StringPtr(name),
	}
}

// SetName : Allow user to set Name
func (options *GetInstanceProfileOptions) SetName(name string) *GetInstanceProfileOptions {
	options.Name = core.StringPtr(name)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetInstanceProfileOptions) SetHeaders(param map[string]string) *GetInstanceProfileOptions {
	options.Headers = param
	return options
}

// GetInstanceTemplateOptions : The GetInstanceTemplate options.
type GetInstanceTemplateOptions struct {
	// The instance template identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetInstanceTemplateOptions : Instantiate GetInstanceTemplateOptions
func (*VpcV1) NewGetInstanceTemplateOptions(id string) *GetInstanceTemplateOptions {
	return &GetInstanceTemplateOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *GetInstanceTemplateOptions) SetID(id string) *GetInstanceTemplateOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetInstanceTemplateOptions) SetHeaders(param map[string]string) *GetInstanceTemplateOptions {
	options.Headers = param
	return options
}

// GetInstanceVolumeAttachmentOptions : The GetInstanceVolumeAttachment options.
type GetInstanceVolumeAttachmentOptions struct {
	// The instance identifier.
	InstanceID *string `validate:"required,ne="`

	// The volume attachment identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetInstanceVolumeAttachmentOptions : Instantiate GetInstanceVolumeAttachmentOptions
func (*VpcV1) NewGetInstanceVolumeAttachmentOptions(instanceID string, id string) *GetInstanceVolumeAttachmentOptions {
	return &GetInstanceVolumeAttachmentOptions{
		InstanceID: core.StringPtr(instanceID),
		ID:         core.StringPtr(id),
	}
}

// SetInstanceID : Allow user to set InstanceID
func (options *GetInstanceVolumeAttachmentOptions) SetInstanceID(instanceID string) *GetInstanceVolumeAttachmentOptions {
	options.InstanceID = core.StringPtr(instanceID)
	return options
}

// SetID : Allow user to set ID
func (options *GetInstanceVolumeAttachmentOptions) SetID(id string) *GetInstanceVolumeAttachmentOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetInstanceVolumeAttachmentOptions) SetHeaders(param map[string]string) *GetInstanceVolumeAttachmentOptions {
	options.Headers = param
	return options
}

// GetIpsecPolicyOptions : The GetIpsecPolicy options.
type GetIpsecPolicyOptions struct {
	// The IPsec policy identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetIpsecPolicyOptions : Instantiate GetIpsecPolicyOptions
func (*VpcV1) NewGetIpsecPolicyOptions(id string) *GetIpsecPolicyOptions {
	return &GetIpsecPolicyOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *GetIpsecPolicyOptions) SetID(id string) *GetIpsecPolicyOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetIpsecPolicyOptions) SetHeaders(param map[string]string) *GetIpsecPolicyOptions {
	options.Headers = param
	return options
}

// GetKeyOptions : The GetKey options.
type GetKeyOptions struct {
	// The key identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetKeyOptions : Instantiate GetKeyOptions
func (*VpcV1) NewGetKeyOptions(id string) *GetKeyOptions {
	return &GetKeyOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *GetKeyOptions) SetID(id string) *GetKeyOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetKeyOptions) SetHeaders(param map[string]string) *GetKeyOptions {
	options.Headers = param
	return options
}

// GetLoadBalancerListenerOptions : The GetLoadBalancerListener options.
type GetLoadBalancerListenerOptions struct {
	// The load balancer identifier.
	LoadBalancerID *string `validate:"required,ne="`

	// The listener identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetLoadBalancerListenerOptions : Instantiate GetLoadBalancerListenerOptions
func (*VpcV1) NewGetLoadBalancerListenerOptions(loadBalancerID string, id string) *GetLoadBalancerListenerOptions {
	return &GetLoadBalancerListenerOptions{
		LoadBalancerID: core.StringPtr(loadBalancerID),
		ID:             core.StringPtr(id),
	}
}

// SetLoadBalancerID : Allow user to set LoadBalancerID
func (options *GetLoadBalancerListenerOptions) SetLoadBalancerID(loadBalancerID string) *GetLoadBalancerListenerOptions {
	options.LoadBalancerID = core.StringPtr(loadBalancerID)
	return options
}

// SetID : Allow user to set ID
func (options *GetLoadBalancerListenerOptions) SetID(id string) *GetLoadBalancerListenerOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetLoadBalancerListenerOptions) SetHeaders(param map[string]string) *GetLoadBalancerListenerOptions {
	options.Headers = param
	return options
}

// GetLoadBalancerListenerPolicyOptions : The GetLoadBalancerListenerPolicy options.
type GetLoadBalancerListenerPolicyOptions struct {
	// The load balancer identifier.
	LoadBalancerID *string `validate:"required,ne="`

	// The listener identifier.
	ListenerID *string `validate:"required,ne="`

	// The policy identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetLoadBalancerListenerPolicyOptions : Instantiate GetLoadBalancerListenerPolicyOptions
func (*VpcV1) NewGetLoadBalancerListenerPolicyOptions(loadBalancerID string, listenerID string, id string) *GetLoadBalancerListenerPolicyOptions {
	return &GetLoadBalancerListenerPolicyOptions{
		LoadBalancerID: core.StringPtr(loadBalancerID),
		ListenerID:     core.StringPtr(listenerID),
		ID:             core.StringPtr(id),
	}
}

// SetLoadBalancerID : Allow user to set LoadBalancerID
func (options *GetLoadBalancerListenerPolicyOptions) SetLoadBalancerID(loadBalancerID string) *GetLoadBalancerListenerPolicyOptions {
	options.LoadBalancerID = core.StringPtr(loadBalancerID)
	return options
}

// SetListenerID : Allow user to set ListenerID
func (options *GetLoadBalancerListenerPolicyOptions) SetListenerID(listenerID string) *GetLoadBalancerListenerPolicyOptions {
	options.ListenerID = core.StringPtr(listenerID)
	return options
}

// SetID : Allow user to set ID
func (options *GetLoadBalancerListenerPolicyOptions) SetID(id string) *GetLoadBalancerListenerPolicyOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetLoadBalancerListenerPolicyOptions) SetHeaders(param map[string]string) *GetLoadBalancerListenerPolicyOptions {
	options.Headers = param
	return options
}

// GetLoadBalancerListenerPolicyRuleOptions : The GetLoadBalancerListenerPolicyRule options.
type GetLoadBalancerListenerPolicyRuleOptions struct {
	// The load balancer identifier.
	LoadBalancerID *string `validate:"required,ne="`

	// The listener identifier.
	ListenerID *string `validate:"required,ne="`

	// The policy identifier.
	PolicyID *string `validate:"required,ne="`

	// The rule identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetLoadBalancerListenerPolicyRuleOptions : Instantiate GetLoadBalancerListenerPolicyRuleOptions
func (*VpcV1) NewGetLoadBalancerListenerPolicyRuleOptions(loadBalancerID string, listenerID string, policyID string, id string) *GetLoadBalancerListenerPolicyRuleOptions {
	return &GetLoadBalancerListenerPolicyRuleOptions{
		LoadBalancerID: core.StringPtr(loadBalancerID),
		ListenerID:     core.StringPtr(listenerID),
		PolicyID:       core.StringPtr(policyID),
		ID:             core.StringPtr(id),
	}
}

// SetLoadBalancerID : Allow user to set LoadBalancerID
func (options *GetLoadBalancerListenerPolicyRuleOptions) SetLoadBalancerID(loadBalancerID string) *GetLoadBalancerListenerPolicyRuleOptions {
	options.LoadBalancerID = core.StringPtr(loadBalancerID)
	return options
}

// SetListenerID : Allow user to set ListenerID
func (options *GetLoadBalancerListenerPolicyRuleOptions) SetListenerID(listenerID string) *GetLoadBalancerListenerPolicyRuleOptions {
	options.ListenerID = core.StringPtr(listenerID)
	return options
}

// SetPolicyID : Allow user to set PolicyID
func (options *GetLoadBalancerListenerPolicyRuleOptions) SetPolicyID(policyID string) *GetLoadBalancerListenerPolicyRuleOptions {
	options.PolicyID = core.StringPtr(policyID)
	return options
}

// SetID : Allow user to set ID
func (options *GetLoadBalancerListenerPolicyRuleOptions) SetID(id string) *GetLoadBalancerListenerPolicyRuleOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetLoadBalancerListenerPolicyRuleOptions) SetHeaders(param map[string]string) *GetLoadBalancerListenerPolicyRuleOptions {
	options.Headers = param
	return options
}

// GetLoadBalancerOptions : The GetLoadBalancer options.
type GetLoadBalancerOptions struct {
	// The load balancer identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetLoadBalancerOptions : Instantiate GetLoadBalancerOptions
func (*VpcV1) NewGetLoadBalancerOptions(id string) *GetLoadBalancerOptions {
	return &GetLoadBalancerOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *GetLoadBalancerOptions) SetID(id string) *GetLoadBalancerOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetLoadBalancerOptions) SetHeaders(param map[string]string) *GetLoadBalancerOptions {
	options.Headers = param
	return options
}

// GetLoadBalancerPoolMemberOptions : The GetLoadBalancerPoolMember options.
type GetLoadBalancerPoolMemberOptions struct {
	// The load balancer identifier.
	LoadBalancerID *string `validate:"required,ne="`

	// The pool identifier.
	PoolID *string `validate:"required,ne="`

	// The member identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetLoadBalancerPoolMemberOptions : Instantiate GetLoadBalancerPoolMemberOptions
func (*VpcV1) NewGetLoadBalancerPoolMemberOptions(loadBalancerID string, poolID string, id string) *GetLoadBalancerPoolMemberOptions {
	return &GetLoadBalancerPoolMemberOptions{
		LoadBalancerID: core.StringPtr(loadBalancerID),
		PoolID:         core.StringPtr(poolID),
		ID:             core.StringPtr(id),
	}
}

// SetLoadBalancerID : Allow user to set LoadBalancerID
func (options *GetLoadBalancerPoolMemberOptions) SetLoadBalancerID(loadBalancerID string) *GetLoadBalancerPoolMemberOptions {
	options.LoadBalancerID = core.StringPtr(loadBalancerID)
	return options
}

// SetPoolID : Allow user to set PoolID
func (options *GetLoadBalancerPoolMemberOptions) SetPoolID(poolID string) *GetLoadBalancerPoolMemberOptions {
	options.PoolID = core.StringPtr(poolID)
	return options
}

// SetID : Allow user to set ID
func (options *GetLoadBalancerPoolMemberOptions) SetID(id string) *GetLoadBalancerPoolMemberOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetLoadBalancerPoolMemberOptions) SetHeaders(param map[string]string) *GetLoadBalancerPoolMemberOptions {
	options.Headers = param
	return options
}

// GetLoadBalancerPoolOptions : The GetLoadBalancerPool options.
type GetLoadBalancerPoolOptions struct {
	// The load balancer identifier.
	LoadBalancerID *string `validate:"required,ne="`

	// The pool identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetLoadBalancerPoolOptions : Instantiate GetLoadBalancerPoolOptions
func (*VpcV1) NewGetLoadBalancerPoolOptions(loadBalancerID string, id string) *GetLoadBalancerPoolOptions {
	return &GetLoadBalancerPoolOptions{
		LoadBalancerID: core.StringPtr(loadBalancerID),
		ID:             core.StringPtr(id),
	}
}

// SetLoadBalancerID : Allow user to set LoadBalancerID
func (options *GetLoadBalancerPoolOptions) SetLoadBalancerID(loadBalancerID string) *GetLoadBalancerPoolOptions {
	options.LoadBalancerID = core.StringPtr(loadBalancerID)
	return options
}

// SetID : Allow user to set ID
func (options *GetLoadBalancerPoolOptions) SetID(id string) *GetLoadBalancerPoolOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetLoadBalancerPoolOptions) SetHeaders(param map[string]string) *GetLoadBalancerPoolOptions {
	options.Headers = param
	return options
}

// GetLoadBalancerProfileOptions : The GetLoadBalancerProfile options.
type GetLoadBalancerProfileOptions struct {
	// The load balancer profile name.
	Name *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetLoadBalancerProfileOptions : Instantiate GetLoadBalancerProfileOptions
func (*VpcV1) NewGetLoadBalancerProfileOptions(name string) *GetLoadBalancerProfileOptions {
	return &GetLoadBalancerProfileOptions{
		Name: core.StringPtr(name),
	}
}

// SetName : Allow user to set Name
func (options *GetLoadBalancerProfileOptions) SetName(name string) *GetLoadBalancerProfileOptions {
	options.Name = core.StringPtr(name)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetLoadBalancerProfileOptions) SetHeaders(param map[string]string) *GetLoadBalancerProfileOptions {
	options.Headers = param
	return options
}

// GetLoadBalancerStatisticsOptions : The GetLoadBalancerStatistics options.
type GetLoadBalancerStatisticsOptions struct {
	// The load balancer identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetLoadBalancerStatisticsOptions : Instantiate GetLoadBalancerStatisticsOptions
func (*VpcV1) NewGetLoadBalancerStatisticsOptions(id string) *GetLoadBalancerStatisticsOptions {
	return &GetLoadBalancerStatisticsOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *GetLoadBalancerStatisticsOptions) SetID(id string) *GetLoadBalancerStatisticsOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetLoadBalancerStatisticsOptions) SetHeaders(param map[string]string) *GetLoadBalancerStatisticsOptions {
	options.Headers = param
	return options
}

// GetNetworkACLOptions : The GetNetworkACL options.
type GetNetworkACLOptions struct {
	// The network ACL identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetNetworkACLOptions : Instantiate GetNetworkACLOptions
func (*VpcV1) NewGetNetworkACLOptions(id string) *GetNetworkACLOptions {
	return &GetNetworkACLOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *GetNetworkACLOptions) SetID(id string) *GetNetworkACLOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetNetworkACLOptions) SetHeaders(param map[string]string) *GetNetworkACLOptions {
	options.Headers = param
	return options
}

// GetNetworkACLRuleOptions : The GetNetworkACLRule options.
type GetNetworkACLRuleOptions struct {
	// The network ACL identifier.
	NetworkACLID *string `validate:"required,ne="`

	// The rule identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetNetworkACLRuleOptions : Instantiate GetNetworkACLRuleOptions
func (*VpcV1) NewGetNetworkACLRuleOptions(networkACLID string, id string) *GetNetworkACLRuleOptions {
	return &GetNetworkACLRuleOptions{
		NetworkACLID: core.StringPtr(networkACLID),
		ID:           core.StringPtr(id),
	}
}

// SetNetworkACLID : Allow user to set NetworkACLID
func (options *GetNetworkACLRuleOptions) SetNetworkACLID(networkACLID string) *GetNetworkACLRuleOptions {
	options.NetworkACLID = core.StringPtr(networkACLID)
	return options
}

// SetID : Allow user to set ID
func (options *GetNetworkACLRuleOptions) SetID(id string) *GetNetworkACLRuleOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetNetworkACLRuleOptions) SetHeaders(param map[string]string) *GetNetworkACLRuleOptions {
	options.Headers = param
	return options
}

// GetOperatingSystemOptions : The GetOperatingSystem options.
type GetOperatingSystemOptions struct {
	// The operating system name.
	Name *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetOperatingSystemOptions : Instantiate GetOperatingSystemOptions
func (*VpcV1) NewGetOperatingSystemOptions(name string) *GetOperatingSystemOptions {
	return &GetOperatingSystemOptions{
		Name: core.StringPtr(name),
	}
}

// SetName : Allow user to set Name
func (options *GetOperatingSystemOptions) SetName(name string) *GetOperatingSystemOptions {
	options.Name = core.StringPtr(name)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetOperatingSystemOptions) SetHeaders(param map[string]string) *GetOperatingSystemOptions {
	options.Headers = param
	return options
}

// GetPublicGatewayOptions : The GetPublicGateway options.
type GetPublicGatewayOptions struct {
	// The public gateway identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetPublicGatewayOptions : Instantiate GetPublicGatewayOptions
func (*VpcV1) NewGetPublicGatewayOptions(id string) *GetPublicGatewayOptions {
	return &GetPublicGatewayOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *GetPublicGatewayOptions) SetID(id string) *GetPublicGatewayOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetPublicGatewayOptions) SetHeaders(param map[string]string) *GetPublicGatewayOptions {
	options.Headers = param
	return options
}

// GetRegionOptions : The GetRegion options.
type GetRegionOptions struct {
	// The region name.
	Name *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetRegionOptions : Instantiate GetRegionOptions
func (*VpcV1) NewGetRegionOptions(name string) *GetRegionOptions {
	return &GetRegionOptions{
		Name: core.StringPtr(name),
	}
}

// SetName : Allow user to set Name
func (options *GetRegionOptions) SetName(name string) *GetRegionOptions {
	options.Name = core.StringPtr(name)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetRegionOptions) SetHeaders(param map[string]string) *GetRegionOptions {
	options.Headers = param
	return options
}

// GetRegionZoneOptions : The GetRegionZone options.
type GetRegionZoneOptions struct {
	// The region name.
	RegionName *string `validate:"required,ne="`

	// The zone name.
	Name *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetRegionZoneOptions : Instantiate GetRegionZoneOptions
func (*VpcV1) NewGetRegionZoneOptions(regionName string, name string) *GetRegionZoneOptions {
	return &GetRegionZoneOptions{
		RegionName: core.StringPtr(regionName),
		Name:       core.StringPtr(name),
	}
}

// SetRegionName : Allow user to set RegionName
func (options *GetRegionZoneOptions) SetRegionName(regionName string) *GetRegionZoneOptions {
	options.RegionName = core.StringPtr(regionName)
	return options
}

// SetName : Allow user to set Name
func (options *GetRegionZoneOptions) SetName(name string) *GetRegionZoneOptions {
	options.Name = core.StringPtr(name)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetRegionZoneOptions) SetHeaders(param map[string]string) *GetRegionZoneOptions {
	options.Headers = param
	return options
}

// GetSecurityGroupNetworkInterfaceOptions : The GetSecurityGroupNetworkInterface options.
type GetSecurityGroupNetworkInterfaceOptions struct {
	// The security group identifier.
	SecurityGroupID *string `validate:"required,ne="`

	// The network interface identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetSecurityGroupNetworkInterfaceOptions : Instantiate GetSecurityGroupNetworkInterfaceOptions
func (*VpcV1) NewGetSecurityGroupNetworkInterfaceOptions(securityGroupID string, id string) *GetSecurityGroupNetworkInterfaceOptions {
	return &GetSecurityGroupNetworkInterfaceOptions{
		SecurityGroupID: core.StringPtr(securityGroupID),
		ID:              core.StringPtr(id),
	}
}

// SetSecurityGroupID : Allow user to set SecurityGroupID
func (options *GetSecurityGroupNetworkInterfaceOptions) SetSecurityGroupID(securityGroupID string) *GetSecurityGroupNetworkInterfaceOptions {
	options.SecurityGroupID = core.StringPtr(securityGroupID)
	return options
}

// SetID : Allow user to set ID
func (options *GetSecurityGroupNetworkInterfaceOptions) SetID(id string) *GetSecurityGroupNetworkInterfaceOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetSecurityGroupNetworkInterfaceOptions) SetHeaders(param map[string]string) *GetSecurityGroupNetworkInterfaceOptions {
	options.Headers = param
	return options
}

// GetSecurityGroupOptions : The GetSecurityGroup options.
type GetSecurityGroupOptions struct {
	// The security group identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetSecurityGroupOptions : Instantiate GetSecurityGroupOptions
func (*VpcV1) NewGetSecurityGroupOptions(id string) *GetSecurityGroupOptions {
	return &GetSecurityGroupOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *GetSecurityGroupOptions) SetID(id string) *GetSecurityGroupOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetSecurityGroupOptions) SetHeaders(param map[string]string) *GetSecurityGroupOptions {
	options.Headers = param
	return options
}

// GetSecurityGroupRuleOptions : The GetSecurityGroupRule options.
type GetSecurityGroupRuleOptions struct {
	// The security group identifier.
	SecurityGroupID *string `validate:"required,ne="`

	// The rule identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetSecurityGroupRuleOptions : Instantiate GetSecurityGroupRuleOptions
func (*VpcV1) NewGetSecurityGroupRuleOptions(securityGroupID string, id string) *GetSecurityGroupRuleOptions {
	return &GetSecurityGroupRuleOptions{
		SecurityGroupID: core.StringPtr(securityGroupID),
		ID:              core.StringPtr(id),
	}
}

// SetSecurityGroupID : Allow user to set SecurityGroupID
func (options *GetSecurityGroupRuleOptions) SetSecurityGroupID(securityGroupID string) *GetSecurityGroupRuleOptions {
	options.SecurityGroupID = core.StringPtr(securityGroupID)
	return options
}

// SetID : Allow user to set ID
func (options *GetSecurityGroupRuleOptions) SetID(id string) *GetSecurityGroupRuleOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetSecurityGroupRuleOptions) SetHeaders(param map[string]string) *GetSecurityGroupRuleOptions {
	options.Headers = param
	return options
}

// GetSecurityGroupTargetOptions : The GetSecurityGroupTarget options.
type GetSecurityGroupTargetOptions struct {
	// The security group identifier.
	SecurityGroupID *string `validate:"required,ne="`

	// The security group target identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetSecurityGroupTargetOptions : Instantiate GetSecurityGroupTargetOptions
func (*VpcV1) NewGetSecurityGroupTargetOptions(securityGroupID string, id string) *GetSecurityGroupTargetOptions {
	return &GetSecurityGroupTargetOptions{
		SecurityGroupID: core.StringPtr(securityGroupID),
		ID:              core.StringPtr(id),
	}
}

// SetSecurityGroupID : Allow user to set SecurityGroupID
func (options *GetSecurityGroupTargetOptions) SetSecurityGroupID(securityGroupID string) *GetSecurityGroupTargetOptions {
	options.SecurityGroupID = core.StringPtr(securityGroupID)
	return options
}

// SetID : Allow user to set ID
func (options *GetSecurityGroupTargetOptions) SetID(id string) *GetSecurityGroupTargetOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetSecurityGroupTargetOptions) SetHeaders(param map[string]string) *GetSecurityGroupTargetOptions {
	options.Headers = param
	return options
}

// GetSubnetNetworkACLOptions : The GetSubnetNetworkACL options.
type GetSubnetNetworkACLOptions struct {
	// The subnet identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetSubnetNetworkACLOptions : Instantiate GetSubnetNetworkACLOptions
func (*VpcV1) NewGetSubnetNetworkACLOptions(id string) *GetSubnetNetworkACLOptions {
	return &GetSubnetNetworkACLOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *GetSubnetNetworkACLOptions) SetID(id string) *GetSubnetNetworkACLOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetSubnetNetworkACLOptions) SetHeaders(param map[string]string) *GetSubnetNetworkACLOptions {
	options.Headers = param
	return options
}

// GetSubnetOptions : The GetSubnet options.
type GetSubnetOptions struct {
	// The subnet identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetSubnetOptions : Instantiate GetSubnetOptions
func (*VpcV1) NewGetSubnetOptions(id string) *GetSubnetOptions {
	return &GetSubnetOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *GetSubnetOptions) SetID(id string) *GetSubnetOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetSubnetOptions) SetHeaders(param map[string]string) *GetSubnetOptions {
	options.Headers = param
	return options
}

// GetSubnetPublicGatewayOptions : The GetSubnetPublicGateway options.
type GetSubnetPublicGatewayOptions struct {
	// The subnet identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetSubnetPublicGatewayOptions : Instantiate GetSubnetPublicGatewayOptions
func (*VpcV1) NewGetSubnetPublicGatewayOptions(id string) *GetSubnetPublicGatewayOptions {
	return &GetSubnetPublicGatewayOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *GetSubnetPublicGatewayOptions) SetID(id string) *GetSubnetPublicGatewayOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetSubnetPublicGatewayOptions) SetHeaders(param map[string]string) *GetSubnetPublicGatewayOptions {
	options.Headers = param
	return options
}

// GetSubnetReservedIPOptions : The GetSubnetReservedIP options.
type GetSubnetReservedIPOptions struct {
	// The subnet identifier.
	SubnetID *string `validate:"required,ne="`

	// The reserved IP identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetSubnetReservedIPOptions : Instantiate GetSubnetReservedIPOptions
func (*VpcV1) NewGetSubnetReservedIPOptions(subnetID string, id string) *GetSubnetReservedIPOptions {
	return &GetSubnetReservedIPOptions{
		SubnetID: core.StringPtr(subnetID),
		ID:       core.StringPtr(id),
	}
}

// SetSubnetID : Allow user to set SubnetID
func (options *GetSubnetReservedIPOptions) SetSubnetID(subnetID string) *GetSubnetReservedIPOptions {
	options.SubnetID = core.StringPtr(subnetID)
	return options
}

// SetID : Allow user to set ID
func (options *GetSubnetReservedIPOptions) SetID(id string) *GetSubnetReservedIPOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetSubnetReservedIPOptions) SetHeaders(param map[string]string) *GetSubnetReservedIPOptions {
	options.Headers = param
	return options
}

// GetSubnetRoutingTableOptions : The GetSubnetRoutingTable options.
type GetSubnetRoutingTableOptions struct {
	// The subnet identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetSubnetRoutingTableOptions : Instantiate GetSubnetRoutingTableOptions
func (*VpcV1) NewGetSubnetRoutingTableOptions(id string) *GetSubnetRoutingTableOptions {
	return &GetSubnetRoutingTableOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *GetSubnetRoutingTableOptions) SetID(id string) *GetSubnetRoutingTableOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetSubnetRoutingTableOptions) SetHeaders(param map[string]string) *GetSubnetRoutingTableOptions {
	options.Headers = param
	return options
}

// GetVolumeOptions : The GetVolume options.
type GetVolumeOptions struct {
	// The volume identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetVolumeOptions : Instantiate GetVolumeOptions
func (*VpcV1) NewGetVolumeOptions(id string) *GetVolumeOptions {
	return &GetVolumeOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *GetVolumeOptions) SetID(id string) *GetVolumeOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetVolumeOptions) SetHeaders(param map[string]string) *GetVolumeOptions {
	options.Headers = param
	return options
}

// GetVolumeProfileOptions : The GetVolumeProfile options.
type GetVolumeProfileOptions struct {
	// The volume profile name.
	Name *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetVolumeProfileOptions : Instantiate GetVolumeProfileOptions
func (*VpcV1) NewGetVolumeProfileOptions(name string) *GetVolumeProfileOptions {
	return &GetVolumeProfileOptions{
		Name: core.StringPtr(name),
	}
}

// SetName : Allow user to set Name
func (options *GetVolumeProfileOptions) SetName(name string) *GetVolumeProfileOptions {
	options.Name = core.StringPtr(name)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetVolumeProfileOptions) SetHeaders(param map[string]string) *GetVolumeProfileOptions {
	options.Headers = param
	return options
}

// GetVPCAddressPrefixOptions : The GetVPCAddressPrefix options.
type GetVPCAddressPrefixOptions struct {
	// The VPC identifier.
	VPCID *string `validate:"required,ne="`

	// The prefix identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetVPCAddressPrefixOptions : Instantiate GetVPCAddressPrefixOptions
func (*VpcV1) NewGetVPCAddressPrefixOptions(vpcID string, id string) *GetVPCAddressPrefixOptions {
	return &GetVPCAddressPrefixOptions{
		VPCID: core.StringPtr(vpcID),
		ID:    core.StringPtr(id),
	}
}

// SetVPCID : Allow user to set VPCID
func (options *GetVPCAddressPrefixOptions) SetVPCID(vpcID string) *GetVPCAddressPrefixOptions {
	options.VPCID = core.StringPtr(vpcID)
	return options
}

// SetID : Allow user to set ID
func (options *GetVPCAddressPrefixOptions) SetID(id string) *GetVPCAddressPrefixOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetVPCAddressPrefixOptions) SetHeaders(param map[string]string) *GetVPCAddressPrefixOptions {
	options.Headers = param
	return options
}

// GetVPCDefaultNetworkACLOptions : The GetVPCDefaultNetworkACL options.
type GetVPCDefaultNetworkACLOptions struct {
	// The VPC identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetVPCDefaultNetworkACLOptions : Instantiate GetVPCDefaultNetworkACLOptions
func (*VpcV1) NewGetVPCDefaultNetworkACLOptions(id string) *GetVPCDefaultNetworkACLOptions {
	return &GetVPCDefaultNetworkACLOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *GetVPCDefaultNetworkACLOptions) SetID(id string) *GetVPCDefaultNetworkACLOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetVPCDefaultNetworkACLOptions) SetHeaders(param map[string]string) *GetVPCDefaultNetworkACLOptions {
	options.Headers = param
	return options
}

// GetVPCDefaultRoutingTableOptions : The GetVPCDefaultRoutingTable options.
type GetVPCDefaultRoutingTableOptions struct {
	// The VPC identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetVPCDefaultRoutingTableOptions : Instantiate GetVPCDefaultRoutingTableOptions
func (*VpcV1) NewGetVPCDefaultRoutingTableOptions(id string) *GetVPCDefaultRoutingTableOptions {
	return &GetVPCDefaultRoutingTableOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *GetVPCDefaultRoutingTableOptions) SetID(id string) *GetVPCDefaultRoutingTableOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetVPCDefaultRoutingTableOptions) SetHeaders(param map[string]string) *GetVPCDefaultRoutingTableOptions {
	options.Headers = param
	return options
}

// GetVPCDefaultSecurityGroupOptions : The GetVPCDefaultSecurityGroup options.
type GetVPCDefaultSecurityGroupOptions struct {
	// The VPC identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetVPCDefaultSecurityGroupOptions : Instantiate GetVPCDefaultSecurityGroupOptions
func (*VpcV1) NewGetVPCDefaultSecurityGroupOptions(id string) *GetVPCDefaultSecurityGroupOptions {
	return &GetVPCDefaultSecurityGroupOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *GetVPCDefaultSecurityGroupOptions) SetID(id string) *GetVPCDefaultSecurityGroupOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetVPCDefaultSecurityGroupOptions) SetHeaders(param map[string]string) *GetVPCDefaultSecurityGroupOptions {
	options.Headers = param
	return options
}

// GetVPCOptions : The GetVPC options.
type GetVPCOptions struct {
	// The VPC identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetVPCOptions : Instantiate GetVPCOptions
func (*VpcV1) NewGetVPCOptions(id string) *GetVPCOptions {
	return &GetVPCOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *GetVPCOptions) SetID(id string) *GetVPCOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetVPCOptions) SetHeaders(param map[string]string) *GetVPCOptions {
	options.Headers = param
	return options
}

// GetVPCRouteOptions : The GetVPCRoute options.
type GetVPCRouteOptions struct {
	// The VPC identifier.
	VPCID *string `validate:"required,ne="`

	// The route identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetVPCRouteOptions : Instantiate GetVPCRouteOptions
func (*VpcV1) NewGetVPCRouteOptions(vpcID string, id string) *GetVPCRouteOptions {
	return &GetVPCRouteOptions{
		VPCID: core.StringPtr(vpcID),
		ID:    core.StringPtr(id),
	}
}

// SetVPCID : Allow user to set VPCID
func (options *GetVPCRouteOptions) SetVPCID(vpcID string) *GetVPCRouteOptions {
	options.VPCID = core.StringPtr(vpcID)
	return options
}

// SetID : Allow user to set ID
func (options *GetVPCRouteOptions) SetID(id string) *GetVPCRouteOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetVPCRouteOptions) SetHeaders(param map[string]string) *GetVPCRouteOptions {
	options.Headers = param
	return options
}

// GetVPCRoutingTableOptions : The GetVPCRoutingTable options.
type GetVPCRoutingTableOptions struct {
	// The VPC identifier.
	VPCID *string `validate:"required,ne="`

	// The routing table identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetVPCRoutingTableOptions : Instantiate GetVPCRoutingTableOptions
func (*VpcV1) NewGetVPCRoutingTableOptions(vpcID string, id string) *GetVPCRoutingTableOptions {
	return &GetVPCRoutingTableOptions{
		VPCID: core.StringPtr(vpcID),
		ID:    core.StringPtr(id),
	}
}

// SetVPCID : Allow user to set VPCID
func (options *GetVPCRoutingTableOptions) SetVPCID(vpcID string) *GetVPCRoutingTableOptions {
	options.VPCID = core.StringPtr(vpcID)
	return options
}

// SetID : Allow user to set ID
func (options *GetVPCRoutingTableOptions) SetID(id string) *GetVPCRoutingTableOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetVPCRoutingTableOptions) SetHeaders(param map[string]string) *GetVPCRoutingTableOptions {
	options.Headers = param
	return options
}

// GetVPCRoutingTableRouteOptions : The GetVPCRoutingTableRoute options.
type GetVPCRoutingTableRouteOptions struct {
	// The VPC identifier.
	VPCID *string `validate:"required,ne="`

	// The routing table identifier.
	RoutingTableID *string `validate:"required,ne="`

	// The VPC routing table route identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetVPCRoutingTableRouteOptions : Instantiate GetVPCRoutingTableRouteOptions
func (*VpcV1) NewGetVPCRoutingTableRouteOptions(vpcID string, routingTableID string, id string) *GetVPCRoutingTableRouteOptions {
	return &GetVPCRoutingTableRouteOptions{
		VPCID:          core.StringPtr(vpcID),
		RoutingTableID: core.StringPtr(routingTableID),
		ID:             core.StringPtr(id),
	}
}

// SetVPCID : Allow user to set VPCID
func (options *GetVPCRoutingTableRouteOptions) SetVPCID(vpcID string) *GetVPCRoutingTableRouteOptions {
	options.VPCID = core.StringPtr(vpcID)
	return options
}

// SetRoutingTableID : Allow user to set RoutingTableID
func (options *GetVPCRoutingTableRouteOptions) SetRoutingTableID(routingTableID string) *GetVPCRoutingTableRouteOptions {
	options.RoutingTableID = core.StringPtr(routingTableID)
	return options
}

// SetID : Allow user to set ID
func (options *GetVPCRoutingTableRouteOptions) SetID(id string) *GetVPCRoutingTableRouteOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetVPCRoutingTableRouteOptions) SetHeaders(param map[string]string) *GetVPCRoutingTableRouteOptions {
	options.Headers = param
	return options
}

// GetVPNGatewayConnectionOptions : The GetVPNGatewayConnection options.
type GetVPNGatewayConnectionOptions struct {
	// The VPN gateway identifier.
	VPNGatewayID *string `validate:"required,ne="`

	// The VPN gateway connection identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetVPNGatewayConnectionOptions : Instantiate GetVPNGatewayConnectionOptions
func (*VpcV1) NewGetVPNGatewayConnectionOptions(vpnGatewayID string, id string) *GetVPNGatewayConnectionOptions {
	return &GetVPNGatewayConnectionOptions{
		VPNGatewayID: core.StringPtr(vpnGatewayID),
		ID:           core.StringPtr(id),
	}
}

// SetVPNGatewayID : Allow user to set VPNGatewayID
func (options *GetVPNGatewayConnectionOptions) SetVPNGatewayID(vpnGatewayID string) *GetVPNGatewayConnectionOptions {
	options.VPNGatewayID = core.StringPtr(vpnGatewayID)
	return options
}

// SetID : Allow user to set ID
func (options *GetVPNGatewayConnectionOptions) SetID(id string) *GetVPNGatewayConnectionOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetVPNGatewayConnectionOptions) SetHeaders(param map[string]string) *GetVPNGatewayConnectionOptions {
	options.Headers = param
	return options
}

// GetVPNGatewayOptions : The GetVPNGateway options.
type GetVPNGatewayOptions struct {
	// The VPN gateway identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewGetVPNGatewayOptions : Instantiate GetVPNGatewayOptions
func (*VpcV1) NewGetVPNGatewayOptions(id string) *GetVPNGatewayOptions {
	return &GetVPNGatewayOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *GetVPNGatewayOptions) SetID(id string) *GetVPNGatewayOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *GetVPNGatewayOptions) SetHeaders(param map[string]string) *GetVPNGatewayOptions {
	options.Headers = param
	return options
}

// IkePolicy : IkePolicy struct
type IkePolicy struct {
	// The authentication algorithm.
	AuthenticationAlgorithm *string `json:"authentication_algorithm" validate:"required"`

	// Collection of references to VPN gateway connections that use this IKE policy.
	Connections []VPNGatewayConnectionReference `json:"connections" validate:"required"`

	// The date and time that this IKE policy was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The Diffie-Hellman group.
	DhGroup *int64 `json:"dh_group" validate:"required"`

	// The encryption algorithm.
	EncryptionAlgorithm *string `json:"encryption_algorithm" validate:"required"`

	// The IKE policy's canonical URL.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this IKE policy.
	ID *string `json:"id" validate:"required"`

	// The IKE protocol version.
	IkeVersion *int64 `json:"ike_version" validate:"required"`

	// The key lifetime in seconds.
	KeyLifetime *int64 `json:"key_lifetime" validate:"required"`

	// The user-defined name for this IKE policy.
	Name *string `json:"name" validate:"required"`

	// The IKE negotiation mode. Only `main` is supported.
	NegotiationMode *string `json:"negotiation_mode" validate:"required"`

	// The resource group for this IKE policy.
	ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`

	// The resource type.
	ResourceType *string `json:"resource_type" validate:"required"`
}

// Constants associated with the IkePolicy.AuthenticationAlgorithm property.
// The authentication algorithm.
const (
	IkePolicyAuthenticationAlgorithmMd5Const    = "md5"
	IkePolicyAuthenticationAlgorithmSha1Const   = "sha1"
	IkePolicyAuthenticationAlgorithmSha256Const = "sha256"
	IkePolicyAuthenticationAlgorithmSha512Const = "sha512"
)

// Constants associated with the IkePolicy.EncryptionAlgorithm property.
// The encryption algorithm.
const (
	IkePolicyEncryptionAlgorithmAes128Const    = "aes128"
	IkePolicyEncryptionAlgorithmAes256Const    = "aes256"
	IkePolicyEncryptionAlgorithmTripleDesConst = "triple_des"
)

// Constants associated with the IkePolicy.NegotiationMode property.
// The IKE negotiation mode. Only `main` is supported.
const (
	IkePolicyNegotiationModeMainConst = "main"
)

// Constants associated with the IkePolicy.ResourceType property.
// The resource type.
const (
	IkePolicyResourceTypeIkePolicyConst = "ike_policy"
)

// UnmarshalIkePolicy unmarshals an instance of IkePolicy from the specified map of raw messages.
func UnmarshalIkePolicy(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(IkePolicy)
	err = core.UnmarshalPrimitive(m, "authentication_algorithm", &obj.AuthenticationAlgorithm)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "connections", &obj.Connections, UnmarshalVPNGatewayConnectionReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "dh_group", &obj.DhGroup)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "encryption_algorithm", &obj.EncryptionAlgorithm)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "ike_version", &obj.IkeVersion)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "key_lifetime", &obj.KeyLifetime)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "negotiation_mode", &obj.NegotiationMode)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// IkePolicyCollection : IkePolicyCollection struct
type IkePolicyCollection struct {
	// A link to the first page of resources.
	First *IkePolicyCollectionFirst `json:"first" validate:"required"`

	// Collection of IKE policies.
	IkePolicies []IkePolicy `json:"ike_policies" validate:"required"`

	// The maximum number of resources that can be returned by the request.
	Limit *int64 `json:"limit" validate:"required"`

	// A link to the next page of resources. This property is present for all pages
	// except the last page.
	Next *IkePolicyCollectionNext `json:"next,omitempty"`

	// The total number of resources across all pages.
	TotalCount *int64 `json:"total_count" validate:"required"`
}

// UnmarshalIkePolicyCollection unmarshals an instance of IkePolicyCollection from the specified map of raw messages.
func UnmarshalIkePolicyCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(IkePolicyCollection)
	err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalIkePolicyCollectionFirst)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "ike_policies", &obj.IkePolicies, UnmarshalIkePolicy)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalIkePolicyCollectionNext)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// IkePolicyIdentity : Identifies an IKE policy by a unique property.
// Models which "extend" this model:
// - IkePolicyIdentityByID
// - IkePolicyIdentityByHref
type IkePolicyIdentity struct {
	// The unique identifier for this IKE policy.
	ID *string `json:"id,omitempty"`

	// The IKE policy's canonical URL.
	Href *string `json:"href,omitempty"`
}

func (*IkePolicyIdentity) isaIkePolicyIdentity() bool {
	return true
}

type IkePolicyIdentityIntf interface {
	isaIkePolicyIdentity() bool
}

// UnmarshalIkePolicyIdentity unmarshals an instance of IkePolicyIdentity from the specified map of raw messages.
func UnmarshalIkePolicyIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(IkePolicyIdentity)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// IkePolicyPatch : IkePolicyPatch struct
type IkePolicyPatch struct {
	// The authentication algorithm.
	AuthenticationAlgorithm *string `json:"authentication_algorithm,omitempty"`

	// The Diffie-Hellman group.
	DhGroup *int64 `json:"dh_group,omitempty"`

	// The encryption algorithm.
	EncryptionAlgorithm *string `json:"encryption_algorithm,omitempty"`

	// The IKE protocol version.
	IkeVersion *int64 `json:"ike_version,omitempty"`

	// The key lifetime in seconds.
	KeyLifetime *int64 `json:"key_lifetime,omitempty"`

	// The user-defined name for this IKE policy.
	Name *string `json:"name,omitempty"`
}

// Constants associated with the IkePolicyPatch.AuthenticationAlgorithm property.
// The authentication algorithm.
const (
	IkePolicyPatchAuthenticationAlgorithmMd5Const    = "md5"
	IkePolicyPatchAuthenticationAlgorithmSha1Const   = "sha1"
	IkePolicyPatchAuthenticationAlgorithmSha256Const = "sha256"
	IkePolicyPatchAuthenticationAlgorithmSha512Const = "sha512"
)

// Constants associated with the IkePolicyPatch.EncryptionAlgorithm property.
// The encryption algorithm.
const (
	IkePolicyPatchEncryptionAlgorithmAes128Const    = "aes128"
	IkePolicyPatchEncryptionAlgorithmAes256Const    = "aes256"
	IkePolicyPatchEncryptionAlgorithmTripleDesConst = "triple_des"
)

// UnmarshalIkePolicyPatch unmarshals an instance of IkePolicyPatch from the specified map of raw messages.
func UnmarshalIkePolicyPatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(IkePolicyPatch)
	err = core.UnmarshalPrimitive(m, "authentication_algorithm", &obj.AuthenticationAlgorithm)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "dh_group", &obj.DhGroup)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "encryption_algorithm", &obj.EncryptionAlgorithm)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "ike_version", &obj.IkeVersion)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "key_lifetime", &obj.KeyLifetime)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the IkePolicyPatch
func (ikePolicyPatch *IkePolicyPatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(ikePolicyPatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// IkePolicyReference : IkePolicyReference struct
type IkePolicyReference struct {
	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *IkePolicyReferenceDeleted `json:"deleted,omitempty"`

	// The IKE policy's canonical URL.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this IKE policy.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this IKE policy.
	Name *string `json:"name" validate:"required"`

	// The resource type.
	ResourceType *string `json:"resource_type" validate:"required"`
}

// Constants associated with the IkePolicyReference.ResourceType property.
// The resource type.
const (
	IkePolicyReferenceResourceTypeIkePolicyConst = "ike_policy"
)

// UnmarshalIkePolicyReference unmarshals an instance of IkePolicyReference from the specified map of raw messages.
func UnmarshalIkePolicyReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(IkePolicyReference)
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalIkePolicyReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// IP : IP struct
type IP struct {
	// The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this
	// property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing
	// and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
	Address *string `json:"address" validate:"required"`
}

// UnmarshalIP unmarshals an instance of IP from the specified map of raw messages.
func UnmarshalIP(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(IP)
	err = core.UnmarshalPrimitive(m, "address", &obj.Address)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// IPsecPolicy : IPsecPolicy struct
type IPsecPolicy struct {
	// The authentication algorithm.
	AuthenticationAlgorithm *string `json:"authentication_algorithm" validate:"required"`

	// Collection of references to VPN gateway connections that use this IPsec policy.
	Connections []VPNGatewayConnectionReference `json:"connections" validate:"required"`

	// The date and time that this IPsec policy was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The encapsulation mode used. Only `tunnel` is supported.
	EncapsulationMode *string `json:"encapsulation_mode" validate:"required"`

	// The encryption algorithm.
	EncryptionAlgorithm *string `json:"encryption_algorithm" validate:"required"`

	// The IPsec policy's canonical URL.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this IPsec policy.
	ID *string `json:"id" validate:"required"`

	// The key lifetime in seconds.
	KeyLifetime *int64 `json:"key_lifetime" validate:"required"`

	// The user-defined name for this IPsec policy.
	Name *string `json:"name" validate:"required"`

	// Perfect Forward Secrecy.
	Pfs *string `json:"pfs" validate:"required"`

	// The resource group for this IPsec policy.
	ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`

	// The resource type.
	ResourceType *string `json:"resource_type" validate:"required"`

	// The transform protocol used. Only `esp` is supported.
	TransformProtocol *string `json:"transform_protocol" validate:"required"`
}

// Constants associated with the IPsecPolicy.AuthenticationAlgorithm property.
// The authentication algorithm.
const (
	IPsecPolicyAuthenticationAlgorithmMd5Const    = "md5"
	IPsecPolicyAuthenticationAlgorithmSha1Const   = "sha1"
	IPsecPolicyAuthenticationAlgorithmSha256Const = "sha256"
	IPsecPolicyAuthenticationAlgorithmSha512Const = "sha512"
)

// Constants associated with the IPsecPolicy.EncapsulationMode property.
// The encapsulation mode used. Only `tunnel` is supported.
const (
	IPsecPolicyEncapsulationModeTunnelConst = "tunnel"
)

// Constants associated with the IPsecPolicy.EncryptionAlgorithm property.
// The encryption algorithm.
const (
	IPsecPolicyEncryptionAlgorithmAes128Const    = "aes128"
	IPsecPolicyEncryptionAlgorithmAes256Const    = "aes256"
	IPsecPolicyEncryptionAlgorithmTripleDesConst = "triple_des"
)

// Constants associated with the IPsecPolicy.Pfs property.
// Perfect Forward Secrecy.
const (
	IPsecPolicyPfsDisabledConst = "disabled"
	IPsecPolicyPfsGroup14Const  = "group_14"
	IPsecPolicyPfsGroup19Const  = "group_19"
	IPsecPolicyPfsGroup2Const   = "group_2"
	IPsecPolicyPfsGroup5Const   = "group_5"
)

// Constants associated with the IPsecPolicy.ResourceType property.
// The resource type.
const (
	IPsecPolicyResourceTypeIpsecPolicyConst = "ipsec_policy"
)

// Constants associated with the IPsecPolicy.TransformProtocol property.
// The transform protocol used. Only `esp` is supported.
const (
	IPsecPolicyTransformProtocolEspConst = "esp"
)

// UnmarshalIPsecPolicy unmarshals an instance of IPsecPolicy from the specified map of raw messages.
func UnmarshalIPsecPolicy(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(IPsecPolicy)
	err = core.UnmarshalPrimitive(m, "authentication_algorithm", &obj.AuthenticationAlgorithm)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "connections", &obj.Connections, UnmarshalVPNGatewayConnectionReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "encapsulation_mode", &obj.EncapsulationMode)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "encryption_algorithm", &obj.EncryptionAlgorithm)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "key_lifetime", &obj.KeyLifetime)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "pfs", &obj.Pfs)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "transform_protocol", &obj.TransformProtocol)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// IPsecPolicyCollection : IPsecPolicyCollection struct
type IPsecPolicyCollection struct {
	// A link to the first page of resources.
	First *IPsecPolicyCollectionFirst `json:"first" validate:"required"`

	// Collection of IPsec policies.
	IpsecPolicies []IPsecPolicy `json:"ipsec_policies" validate:"required"`

	// The maximum number of resources that can be returned by the request.
	Limit *int64 `json:"limit" validate:"required"`

	// A link to the next page of resources. This property is present for all pages
	// except the last page.
	Next *IPsecPolicyCollectionNext `json:"next,omitempty"`

	// The total number of resources across all pages.
	TotalCount *int64 `json:"total_count" validate:"required"`
}

// UnmarshalIPsecPolicyCollection unmarshals an instance of IPsecPolicyCollection from the specified map of raw messages.
func UnmarshalIPsecPolicyCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(IPsecPolicyCollection)
	err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalIPsecPolicyCollectionFirst)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "ipsec_policies", &obj.IpsecPolicies, UnmarshalIPsecPolicy)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalIPsecPolicyCollectionNext)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// IPsecPolicyCollectionFirst : A link to the first page of resources.
type IPsecPolicyCollectionFirst struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalIPsecPolicyCollectionFirst unmarshals an instance of IPsecPolicyCollectionFirst from the specified map of raw messages.
func UnmarshalIPsecPolicyCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(IPsecPolicyCollectionFirst)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// IPsecPolicyCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
type IPsecPolicyCollectionNext struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalIPsecPolicyCollectionNext unmarshals an instance of IPsecPolicyCollectionNext from the specified map of raw messages.
func UnmarshalIPsecPolicyCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(IPsecPolicyCollectionNext)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// IPsecPolicyIdentity : Identifies an IPsec policy by a unique property.
// Models which "extend" this model:
// - IPsecPolicyIdentityByID
// - IPsecPolicyIdentityByHref
type IPsecPolicyIdentity struct {
	// The unique identifier for this IPsec policy.
	ID *string `json:"id,omitempty"`

	// The IPsec policy's canonical URL.
	Href *string `json:"href,omitempty"`
}

func (*IPsecPolicyIdentity) isaIPsecPolicyIdentity() bool {
	return true
}

type IPsecPolicyIdentityIntf interface {
	isaIPsecPolicyIdentity() bool
}

// UnmarshalIPsecPolicyIdentity unmarshals an instance of IPsecPolicyIdentity from the specified map of raw messages.
func UnmarshalIPsecPolicyIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(IPsecPolicyIdentity)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// IPsecPolicyPatch : IPsecPolicyPatch struct
type IPsecPolicyPatch struct {
	// The authentication algorithm.
	AuthenticationAlgorithm *string `json:"authentication_algorithm,omitempty"`

	// The encryption algorithm.
	EncryptionAlgorithm *string `json:"encryption_algorithm,omitempty"`

	// The key lifetime in seconds.
	KeyLifetime *int64 `json:"key_lifetime,omitempty"`

	// The user-defined name for this IPsec policy.
	Name *string `json:"name,omitempty"`

	// Perfect Forward Secrecy.
	Pfs *string `json:"pfs,omitempty"`
}

// Constants associated with the IPsecPolicyPatch.AuthenticationAlgorithm property.
// The authentication algorithm.
const (
	IPsecPolicyPatchAuthenticationAlgorithmMd5Const    = "md5"
	IPsecPolicyPatchAuthenticationAlgorithmSha1Const   = "sha1"
	IPsecPolicyPatchAuthenticationAlgorithmSha256Const = "sha256"
	IPsecPolicyPatchAuthenticationAlgorithmSha512Const = "sha512"
)

// Constants associated with the IPsecPolicyPatch.EncryptionAlgorithm property.
// The encryption algorithm.
const (
	IPsecPolicyPatchEncryptionAlgorithmAes128Const    = "aes128"
	IPsecPolicyPatchEncryptionAlgorithmAes256Const    = "aes256"
	IPsecPolicyPatchEncryptionAlgorithmTripleDesConst = "triple_des"
)

// Constants associated with the IPsecPolicyPatch.Pfs property.
// Perfect Forward Secrecy.
const (
	IPsecPolicyPatchPfsDisabledConst = "disabled"
	IPsecPolicyPatchPfsGroup14Const  = "group_14"
	IPsecPolicyPatchPfsGroup19Const  = "group_19"
	IPsecPolicyPatchPfsGroup2Const   = "group_2"
	IPsecPolicyPatchPfsGroup5Const   = "group_5"
)

// UnmarshalIPsecPolicyPatch unmarshals an instance of IPsecPolicyPatch from the specified map of raw messages.
func UnmarshalIPsecPolicyPatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(IPsecPolicyPatch)
	err = core.UnmarshalPrimitive(m, "authentication_algorithm", &obj.AuthenticationAlgorithm)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "encryption_algorithm", &obj.EncryptionAlgorithm)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "key_lifetime", &obj.KeyLifetime)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "pfs", &obj.Pfs)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the IPsecPolicyPatch
func (iPsecPolicyPatch *IPsecPolicyPatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(iPsecPolicyPatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// IPsecPolicyReference : IPsecPolicyReference struct
type IPsecPolicyReference struct {
	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *IPsecPolicyReferenceDeleted `json:"deleted,omitempty"`

	// The IPsec policy's canonical URL.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this IPsec policy.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this IPsec policy.
	Name *string `json:"name" validate:"required"`

	// The resource type.
	ResourceType *string `json:"resource_type" validate:"required"`
}

// Constants associated with the IPsecPolicyReference.ResourceType property.
// The resource type.
const (
	IPsecPolicyReferenceResourceTypeIpsecPolicyConst = "ipsec_policy"
)

// UnmarshalIPsecPolicyReference unmarshals an instance of IPsecPolicyReference from the specified map of raw messages.
func UnmarshalIPsecPolicyReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(IPsecPolicyReference)
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalIPsecPolicyReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// IPsecPolicyReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type IPsecPolicyReferenceDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalIPsecPolicyReferenceDeleted unmarshals an instance of IPsecPolicyReferenceDeleted from the specified map of raw messages.
func UnmarshalIPsecPolicyReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(IPsecPolicyReferenceDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// IkePolicyCollectionFirst : A link to the first page of resources.
type IkePolicyCollectionFirst struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalIkePolicyCollectionFirst unmarshals an instance of IkePolicyCollectionFirst from the specified map of raw messages.
func UnmarshalIkePolicyCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(IkePolicyCollectionFirst)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// IkePolicyCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
type IkePolicyCollectionNext struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalIkePolicyCollectionNext unmarshals an instance of IkePolicyCollectionNext from the specified map of raw messages.
func UnmarshalIkePolicyCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(IkePolicyCollectionNext)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// IkePolicyReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type IkePolicyReferenceDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalIkePolicyReferenceDeleted unmarshals an instance of IkePolicyReferenceDeleted from the specified map of raw messages.
func UnmarshalIkePolicyReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(IkePolicyReferenceDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// Image : Image struct
type Image struct {
	// The date and time that the image was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The CRN for this image.
	CRN *string `json:"crn" validate:"required"`

	// The type of encryption used on the image.
	Encryption *string `json:"encryption" validate:"required"`

	// The key that will be used to encrypt volumes created from this image (unless an
	// alternate `encryption_key` is provided at volume creation).
	//
	// This property will be present for images with an `encryption` type of `user_managed`.
	EncryptionKey *EncryptionKeyReference `json:"encryption_key,omitempty"`

	// Details for the stored image file.
	File *ImageFile `json:"file" validate:"required"`

	// The URL for this image.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this image.
	ID *string `json:"id" validate:"required"`

	// The minimum size (in gigabytes) of a volume onto which this image may be provisioned.
	//
	// This property may be absent if the image has a `status` of `pending`, `tentative`, or
	// `failed`.
	MinimumProvisionedSize *int64 `json:"minimum_provisioned_size,omitempty"`

	// The user-defined or system-provided name for this image.
	Name *string `json:"name" validate:"required"`

	// The operating system included in this image.
	OperatingSystem *OperatingSystem `json:"operating_system,omitempty"`

	// The resource group for this image.
	ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`

	// The status of this image
	// - available: image can be used (provisionable)
	// - deleting: image is being deleted, and can no longer be used to provision new
	//   resources
	// - deprecated: image can be used, but is slated to become `obsolete` (provisionable)
	// - failed: image is corrupt or did not pass validation
	// - obsolete: image can no longer be used to provision new resources
	// - pending: image is being imported and is not yet `available`
	// - tentative: image import has timed out (contact support)
	// - unusable: image cannot be used (see `status_reasons[]` for possible remediation)
	//
	// The enumerated values for this property are expected to expand in the future. When processing this property, check
	// for and log unknown values. Optionally halt processing and surface the error, or bypass the image on which the
	// unexpected property value was encountered.
	Status *string `json:"status" validate:"required"`

	// Array of reasons for the current status (if any).
	//
	// The enumerated reason code values for this property will expand in the future. When processing this property, check
	// for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the
	// unexpected reason code was encountered.
	StatusReasons []ImageStatusReason `json:"status_reasons" validate:"required"`

	// Whether the image is publicly visible or private to the account.
	Visibility *string `json:"visibility" validate:"required"`
}

// Constants associated with the Image.Encryption property.
// The type of encryption used on the image.
const (
	ImageEncryptionNoneConst        = "none"
	ImageEncryptionUserManagedConst = "user_managed"
)

// Constants associated with the Image.Status property.
// The status of this image
// - available: image can be used (provisionable)
// - deleting: image is being deleted, and can no longer be used to provision new
//   resources
// - deprecated: image can be used, but is slated to become `obsolete` (provisionable)
// - failed: image is corrupt or did not pass validation
// - obsolete: image can no longer be used to provision new resources
// - pending: image is being imported and is not yet `available`
// - tentative: image import has timed out (contact support)
// - unusable: image cannot be used (see `status_reasons[]` for possible remediation)
//
// The enumerated values for this property are expected to expand in the future. When processing this property, check
// for and log unknown values. Optionally halt processing and surface the error, or bypass the image on which the
// unexpected property value was encountered.
const (
	ImageStatusAvailableConst  = "available"
	ImageStatusDeletingConst   = "deleting"
	ImageStatusDeprecatedConst = "deprecated"
	ImageStatusFailedConst     = "failed"
	ImageStatusPendingConst    = "pending"
	ImageStatusTentativeConst  = "tentative"
	ImageStatusUnusableConst   = "unusable"
)

// Constants associated with the Image.Visibility property.
// Whether the image is publicly visible or private to the account.
const (
	ImageVisibilityPrivateConst = "private"
	ImageVisibilityPublicConst  = "public"
)

// UnmarshalImage unmarshals an instance of Image from the specified map of raw messages.
func UnmarshalImage(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(Image)
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "encryption", &obj.Encryption)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "file", &obj.File, UnmarshalImageFile)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "minimum_provisioned_size", &obj.MinimumProvisionedSize)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "operating_system", &obj.OperatingSystem, UnmarshalOperatingSystem)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "status", &obj.Status)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "status_reasons", &obj.StatusReasons, UnmarshalImageStatusReason)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "visibility", &obj.Visibility)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ImageCollection : ImageCollection struct
type ImageCollection struct {
	// A link to the first page of resources.
	First *ImageCollectionFirst `json:"first" validate:"required"`

	// Collection of images.
	Images []Image `json:"images" validate:"required"`

	// The maximum number of resources that can be returned by the request.
	Limit *int64 `json:"limit" validate:"required"`

	// A link to the next page of resources. This property is present for all pages
	// except the last page.
	Next *ImageCollectionNext `json:"next,omitempty"`
}

// UnmarshalImageCollection unmarshals an instance of ImageCollection from the specified map of raw messages.
func UnmarshalImageCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ImageCollection)
	err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalImageCollectionFirst)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "images", &obj.Images, UnmarshalImage)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalImageCollectionNext)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ImageCollectionFirst : A link to the first page of resources.
type ImageCollectionFirst struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalImageCollectionFirst unmarshals an instance of ImageCollectionFirst from the specified map of raw messages.
func UnmarshalImageCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ImageCollectionFirst)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ImageCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
type ImageCollectionNext struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalImageCollectionNext unmarshals an instance of ImageCollectionNext from the specified map of raw messages.
func UnmarshalImageCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ImageCollectionNext)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ImageFile : ImageFile struct
type ImageFile struct {
	// Checksums for this image file.
	//
	// This property may be absent if the associated image has a `status` of `pending` or
	// `failed`.
	Checksums *ImageFileChecksums `json:"checksums,omitempty"`

	// The size of the stored image file rounded up to the next gigabyte.
	//
	// This property may be absent if the associated image has a `status` of `pending` or
	// `failed`.
	Size *int64 `json:"size,omitempty"`
}

// UnmarshalImageFile unmarshals an instance of ImageFile from the specified map of raw messages.
func UnmarshalImageFile(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ImageFile)
	err = core.UnmarshalModel(m, "checksums", &obj.Checksums, UnmarshalImageFileChecksums)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "size", &obj.Size)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ImageFileChecksums : ImageFileChecksums struct
type ImageFileChecksums struct {
	// The SHA256 fingerprint of the image file.
	Sha256 *string `json:"sha256,omitempty"`
}

// UnmarshalImageFileChecksums unmarshals an instance of ImageFileChecksums from the specified map of raw messages.
func UnmarshalImageFileChecksums(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ImageFileChecksums)
	err = core.UnmarshalPrimitive(m, "sha256", &obj.Sha256)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ImageFilePrototype : ImageFilePrototype struct
type ImageFilePrototype struct {
	// The Cloud Object Store (COS) location of the image file.
	Href *string `json:"href" validate:"required"`
}

// NewImageFilePrototype : Instantiate ImageFilePrototype (Generic Model Constructor)
func (*VpcV1) NewImageFilePrototype(href string) (model *ImageFilePrototype, err error) {
	model = &ImageFilePrototype{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

// UnmarshalImageFilePrototype unmarshals an instance of ImageFilePrototype from the specified map of raw messages.
func UnmarshalImageFilePrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ImageFilePrototype)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ImageIdentity : Identifies an image by a unique property.
// Models which "extend" this model:
// - ImageIdentityByID
// - ImageIdentityByCRN
// - ImageIdentityByHref
type ImageIdentity struct {
	// The unique identifier for this image.
	ID *string `json:"id,omitempty"`

	// The CRN for this image.
	CRN *string `json:"crn,omitempty"`

	// The URL for this image.
	Href *string `json:"href,omitempty"`
}

func (*ImageIdentity) isaImageIdentity() bool {
	return true
}

type ImageIdentityIntf interface {
	isaImageIdentity() bool
}

// UnmarshalImageIdentity unmarshals an instance of ImageIdentity from the specified map of raw messages.
func UnmarshalImageIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ImageIdentity)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ImagePatch : ImagePatch struct
type ImagePatch struct {
	// The unique user-defined name for this image. Names starting with "ibm-" are not allowed.
	Name *string `json:"name,omitempty"`
}

// UnmarshalImagePatch unmarshals an instance of ImagePatch from the specified map of raw messages.
func UnmarshalImagePatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ImagePatch)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the ImagePatch
func (imagePatch *ImagePatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(imagePatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// ImagePrototype : ImagePrototype struct
// Models which "extend" this model:
// - ImagePrototypeImageByFile
type ImagePrototype struct {
	// The unique user-defined name for this image. Names starting with "ibm-" are not allowed. If unspecified, the name
	// will be a hyphenated list of randomly-selected words.
	Name *string `json:"name,omitempty"`

	// The resource group to use. If unspecified, the account's [default resource
	// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
	ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`

	// A base64-encoded, encrypted representation of the key that was used to encrypt the data for this image.
	//
	// That representation is created by wrapping the key's value with the `encryption_key` root key (which must also be
	// provided), using either [Key Protect](https://cloud.ibm.com/docs/key-protect?topic=key-protect-wrap-keys) or the
	// [Hyper Protect Crypto Service](https://cloud.ibm.com/docs/services/hs-crypto?topic=hs-crypto-wrap-keys).
	//
	// If this property is not provided, the imported image is treated as unencrypted.
	EncryptedDataKey *string `json:"encrypted_data_key,omitempty"`

	// The identity of the root key that was used to wrap the data key (which is ultimately
	// represented as `encrypted_data_key`). Additionally, the root key will be used to encrypt
	// volumes created from this image (unless an alternate `encryption_key` is provided at
	// volume creation).
	//
	// If this property is not provided, the imported image is treated as unencrypted.
	EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"`

	// The file from which to create the image.
	File *ImageFilePrototype `json:"file,omitempty"`

	// The identity of the [supported operating
	// system](https://cloud.ibm.com/apidocs/vpc#list-operating-systems) included in
	// this image.
	OperatingSystem OperatingSystemIdentityIntf `json:"operating_system,omitempty"`
}

func (*ImagePrototype) isaImagePrototype() bool {
	return true
}

type ImagePrototypeIntf interface {
	isaImagePrototype() bool
}

// UnmarshalImagePrototype unmarshals an instance of ImagePrototype from the specified map of raw messages.
func UnmarshalImagePrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ImagePrototype)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "encrypted_data_key", &obj.EncryptedDataKey)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "file", &obj.File, UnmarshalImageFilePrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "operating_system", &obj.OperatingSystem, UnmarshalOperatingSystemIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ImageReference : ImageReference struct
type ImageReference struct {
	// The CRN for this image.
	CRN *string `json:"crn" validate:"required"`

	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *ImageReferenceDeleted `json:"deleted,omitempty"`

	// The URL for this image.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this image.
	ID *string `json:"id" validate:"required"`

	// The user-defined or system-provided name for this image.
	Name *string `json:"name" validate:"required"`
}

// UnmarshalImageReference unmarshals an instance of ImageReference from the specified map of raw messages.
func UnmarshalImageReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ImageReference)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalImageReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ImageReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type ImageReferenceDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalImageReferenceDeleted unmarshals an instance of ImageReferenceDeleted from the specified map of raw messages.
func UnmarshalImageReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ImageReferenceDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ImageStatusReason : ImageStatusReason struct
type ImageStatusReason struct {
	// A snake case string succinctly identifying the status reason.
	Code *string `json:"code" validate:"required"`

	// An explanation of the status reason.
	Message *string `json:"message" validate:"required"`

	// Link to documentation about this status reason.
	MoreInfo *string `json:"more_info,omitempty"`
}

// Constants associated with the ImageStatusReason.Code property.
// A snake case string succinctly identifying the status reason.
const (
	ImageStatusReasonCodeEncryptionKeyDeletedConst  = "encryption_key_deleted"
	ImageStatusReasonCodeEncryptionKeyDisabledConst = "encryption_key_disabled"
)

// UnmarshalImageStatusReason unmarshals an instance of ImageStatusReason from the specified map of raw messages.
func UnmarshalImageStatusReason(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ImageStatusReason)
	err = core.UnmarshalPrimitive(m, "code", &obj.Code)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "message", &obj.Message)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// Instance : Instance struct
type Instance struct {
	// The total bandwidth (in megabits per second) shared across the virtual server instance's network interfaces.
	Bandwidth *int64 `json:"bandwidth" validate:"required"`

	// Boot volume attachment.
	BootVolumeAttachment *VolumeAttachmentReferenceInstanceContext `json:"boot_volume_attachment" validate:"required"`

	// The date and time that the virtual server instance was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The CRN for this virtual server instance.
	CRN *string `json:"crn" validate:"required"`

	// Collection of the instance's disks.
	Disks []InstanceDisk `json:"disks" validate:"required"`

	// The virtual server instance GPU configuration.
	Gpu *InstanceGpu `json:"gpu,omitempty"`

	// The URL for this virtual server instance.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this virtual server instance.
	ID *string `json:"id" validate:"required"`

	// The image the virtual server instance was provisioned from.
	Image *ImageReference `json:"image,omitempty"`

	// The amount of memory, truncated to whole gibibytes.
	Memory *int64 `json:"memory" validate:"required"`

	// The user-defined name for this virtual server instance (and default system hostname).
	Name *string `json:"name" validate:"required"`

	// Collection of the virtual server instance's network interfaces, including the primary network interface.
	NetworkInterfaces []NetworkInterfaceInstanceContextReference `json:"network_interfaces" validate:"required"`

	// Primary network interface.
	PrimaryNetworkInterface *NetworkInterfaceInstanceContextReference `json:"primary_network_interface" validate:"required"`

	// The profile for this virtual server instance.
	Profile *InstanceProfileReference `json:"profile" validate:"required"`

	// The resource group for this instance.
	ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`

	// The status of the virtual server instance.
	Status *string `json:"status" validate:"required"`

	// Array of reasons for the current status (if any).
	//
	// The enumerated reason code values for this property will expand in the future. When processing this property, check
	// for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the
	// unexpected reason code was encountered.
	StatusReasons []InstanceStatusReason `json:"status_reasons" validate:"required"`

	// The virtual server instance VCPU configuration.
	Vcpu *InstanceVcpu `json:"vcpu" validate:"required"`

	// Collection of the virtual server instance's volume attachments, including the boot volume attachment.
	VolumeAttachments []VolumeAttachmentReferenceInstanceContext `json:"volume_attachments" validate:"required"`

	// The VPC this virtual server instance resides in.
	VPC *VPCReference `json:"vpc" validate:"required"`

	// The zone this virtual server instance resides in.
	Zone *ZoneReference `json:"zone" validate:"required"`
}

// Constants associated with the Instance.Status property.
// The status of the virtual server instance.
const (
	InstanceStatusDeletingConst   = "deleting"
	InstanceStatusFailedConst     = "failed"
	InstanceStatusPausedConst     = "paused"
	InstanceStatusPausingConst    = "pausing"
	InstanceStatusPendingConst    = "pending"
	InstanceStatusRestartingConst = "restarting"
	InstanceStatusResumingConst   = "resuming"
	InstanceStatusRunningConst    = "running"
	InstanceStatusStartingConst   = "starting"
	InstanceStatusStoppedConst    = "stopped"
	InstanceStatusStoppingConst   = "stopping"
)

// UnmarshalInstance unmarshals an instance of Instance from the specified map of raw messages.
func UnmarshalInstance(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(Instance)
	err = core.UnmarshalPrimitive(m, "bandwidth", &obj.Bandwidth)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentReferenceInstanceContext)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "disks", &obj.Disks, UnmarshalInstanceDisk)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "gpu", &obj.Gpu, UnmarshalInstanceGpu)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "memory", &obj.Memory)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfaceInstanceContextReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfaceInstanceContextReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "status", &obj.Status)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "status_reasons", &obj.StatusReasons, UnmarshalInstanceStatusReason)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "vcpu", &obj.Vcpu, UnmarshalInstanceVcpu)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentReferenceInstanceContext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneReference)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceAction : InstanceAction struct
type InstanceAction struct {
	// The date and time that the action was completed.
	CompletedAt *strfmt.DateTime `json:"completed_at,omitempty"`

	// The date and time that the action was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// If set to true, the action will be forced immediately, and all queued actions deleted. Ignored for the start action.
	Force *bool `json:"force,omitempty"`

	// The URL for this instance action.
	Href *string `json:"href" validate:"required"`

	// The identifier for this instance action.
	ID *string `json:"id" validate:"required"`

	// The date and time that the action was started.
	StartedAt *strfmt.DateTime `json:"started_at,omitempty"`

	// The current status of this action.
	Status *string `json:"status" validate:"required"`

	// The type of action.
	Type *string `json:"type" validate:"required"`
}

// Constants associated with the InstanceAction.Status property.
// The current status of this action.
const (
	InstanceActionStatusCompletedConst = "completed"
	InstanceActionStatusFailedConst    = "failed"
	InstanceActionStatusPendingConst   = "pending"
	InstanceActionStatusRunningConst   = "running"
)

// Constants associated with the InstanceAction.Type property.
// The type of action.
const (
	InstanceActionTypeRebootConst = "reboot"
	InstanceActionTypeStartConst  = "start"
	InstanceActionTypeStopConst   = "stop"
)

// UnmarshalInstanceAction unmarshals an instance of InstanceAction from the specified map of raw messages.
func UnmarshalInstanceAction(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceAction)
	err = core.UnmarshalPrimitive(m, "completed_at", &obj.CompletedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "force", &obj.Force)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "started_at", &obj.StartedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "status", &obj.Status)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceCollection : InstanceCollection struct
type InstanceCollection struct {
	// A link to the first page of resources.
	First *InstanceCollectionFirst `json:"first" validate:"required"`

	// Collection of virtual server instances.
	Instances []Instance `json:"instances" validate:"required"`

	// The maximum number of resources that can be returned by the request.
	Limit *int64 `json:"limit" validate:"required"`

	// A link to the next page of resources. This property is present for all pages
	// except the last page.
	Next *InstanceCollectionNext `json:"next,omitempty"`

	// The total number of resources across all pages.
	TotalCount *int64 `json:"total_count" validate:"required"`
}

// UnmarshalInstanceCollection unmarshals an instance of InstanceCollection from the specified map of raw messages.
func UnmarshalInstanceCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceCollection)
	err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalInstanceCollectionFirst)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "instances", &obj.Instances, UnmarshalInstance)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalInstanceCollectionNext)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceCollectionFirst : A link to the first page of resources.
type InstanceCollectionFirst struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalInstanceCollectionFirst unmarshals an instance of InstanceCollectionFirst from the specified map of raw messages.
func UnmarshalInstanceCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceCollectionFirst)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
type InstanceCollectionNext struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalInstanceCollectionNext unmarshals an instance of InstanceCollectionNext from the specified map of raw messages.
func UnmarshalInstanceCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceCollectionNext)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceConsoleAccessToken : The instance console access token information.
type InstanceConsoleAccessToken struct {
	// A URL safe single-use token used to access the console WebSocket.
	AccessToken *string `json:"access_token" validate:"required"`

	// The instance console type for which this token may be used.
	ConsoleType *string `json:"console_type" validate:"required"`

	// The date and time that the access token was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The date and time that the access token will expire.
	ExpiresAt *strfmt.DateTime `json:"expires_at" validate:"required"`

	// Indicates whether to disconnect an existing serial console session as the serial console cannot be shared.  This has
	// no effect on VNC consoles.
	Force *bool `json:"force" validate:"required"`

	// The URL to access this instance console.
	Href *string `json:"href" validate:"required"`
}

// Constants associated with the InstanceConsoleAccessToken.ConsoleType property.
// The instance console type for which this token may be used.
const (
	InstanceConsoleAccessTokenConsoleTypeSerialConst = "serial"
	InstanceConsoleAccessTokenConsoleTypeVncConst    = "vnc"
)

// UnmarshalInstanceConsoleAccessToken unmarshals an instance of InstanceConsoleAccessToken from the specified map of raw messages.
func UnmarshalInstanceConsoleAccessToken(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceConsoleAccessToken)
	err = core.UnmarshalPrimitive(m, "access_token", &obj.AccessToken)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "console_type", &obj.ConsoleType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "expires_at", &obj.ExpiresAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "force", &obj.Force)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceDisk : InstanceDisk struct
type InstanceDisk struct {
	// The date and time that the disk was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The URL for this instance disk.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this instance disk.
	ID *string `json:"id" validate:"required"`

	// The disk interface used for attaching the disk.
	//
	// The enumerated values for this property are expected to expand in the future. When processing this property, check
	// for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the
	// unexpected property value was encountered.
	InterfaceType *string `json:"interface_type" validate:"required"`

	// The user-defined name for this disk.
	Name *string `json:"name" validate:"required"`

	// The resource type.
	ResourceType *string `json:"resource_type" validate:"required"`

	// The size of the disk in GB (gigabytes).
	Size *int64 `json:"size" validate:"required"`
}

// Constants associated with the InstanceDisk.InterfaceType property.
// The disk interface used for attaching the disk.
//
// The enumerated values for this property are expected to expand in the future. When processing this property, check
// for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the
// unexpected property value was encountered.
const (
	InstanceDiskInterfaceTypeNvmeConst      = "nvme"
	InstanceDiskInterfaceTypeVirtioBlkConst = "virtio_blk"
)

// Constants associated with the InstanceDisk.ResourceType property.
// The resource type.
const (
	InstanceDiskResourceTypeInstanceDiskConst = "instance_disk"
)

// UnmarshalInstanceDisk unmarshals an instance of InstanceDisk from the specified map of raw messages.
func UnmarshalInstanceDisk(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceDisk)
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "interface_type", &obj.InterfaceType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "size", &obj.Size)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceDiskCollection : InstanceDiskCollection struct
type InstanceDiskCollection struct {
	// Collection of the instance's disks.
	Disks []InstanceDisk `json:"disks" validate:"required"`
}

// UnmarshalInstanceDiskCollection unmarshals an instance of InstanceDiskCollection from the specified map of raw messages.
func UnmarshalInstanceDiskCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceDiskCollection)
	err = core.UnmarshalModel(m, "disks", &obj.Disks, UnmarshalInstanceDisk)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceDiskPatch : InstanceDiskPatch struct
type InstanceDiskPatch struct {
	// The user-defined name for this disk.
	Name *string `json:"name,omitempty"`
}

// UnmarshalInstanceDiskPatch unmarshals an instance of InstanceDiskPatch from the specified map of raw messages.
func UnmarshalInstanceDiskPatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceDiskPatch)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the InstanceDiskPatch
func (instanceDiskPatch *InstanceDiskPatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(instanceDiskPatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// InstanceDiskReference : InstanceDiskReference struct
type InstanceDiskReference struct {
	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *InstanceDiskReferenceDeleted `json:"deleted,omitempty"`

	// The URL for this instance disk.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this instance disk.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this disk.
	Name *string `json:"name" validate:"required"`

	// The resource type.
	ResourceType *string `json:"resource_type" validate:"required"`
}

// Constants associated with the InstanceDiskReference.ResourceType property.
// The resource type.
const (
	InstanceDiskReferenceResourceTypeInstanceDiskConst = "instance_disk"
)

// UnmarshalInstanceDiskReference unmarshals an instance of InstanceDiskReference from the specified map of raw messages.
func UnmarshalInstanceDiskReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceDiskReference)
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalInstanceDiskReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceDiskReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type InstanceDiskReferenceDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalInstanceDiskReferenceDeleted unmarshals an instance of InstanceDiskReferenceDeleted from the specified map of raw messages.
func UnmarshalInstanceDiskReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceDiskReferenceDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGpu : The virtual server instance GPU configuration.
type InstanceGpu struct {
	// The number of GPUs assigned to the instance.
	Count *int64 `json:"count" validate:"required"`

	// The GPU manufacturer.
	Manufacturer *string `json:"manufacturer" validate:"required"`

	// The overall amount of GPU memory in GiB (gibibytes).
	Memory *int64 `json:"memory" validate:"required"`

	// The GPU model.
	Model *string `json:"model" validate:"required"`
}

// UnmarshalInstanceGpu unmarshals an instance of InstanceGpu from the specified map of raw messages.
func UnmarshalInstanceGpu(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGpu)
	err = core.UnmarshalPrimitive(m, "count", &obj.Count)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "manufacturer", &obj.Manufacturer)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "memory", &obj.Memory)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "model", &obj.Model)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroup : InstanceGroup struct
type InstanceGroup struct {
	// Required if specifying a load balancer pool only. Used by the instance group when scaling up instances to supply the
	// port for the load balancer pool member.
	ApplicationPort *int64 `json:"application_port,omitempty"`

	// The date and time that the instance group was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The CRN for this instance group.
	CRN *string `json:"crn" validate:"required"`

	// The URL for this instance group.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this instance group.
	ID *string `json:"id" validate:"required"`

	// The template used to create new instances for this group.
	InstanceTemplate *InstanceTemplateReference `json:"instance_template" validate:"required"`

	// The load balancer pool managed by this group. Instances created
	// by this group will have a new load balancer pool member in that
	// pool created.
	LoadBalancerPool *LoadBalancerPoolReference `json:"load_balancer_pool,omitempty"`

	// Array of references to managers for the instance group.
	Managers []InstanceGroupManagerReference `json:"managers" validate:"required"`

	// The number of instances in the instance group.
	MembershipCount *int64 `json:"membership_count" validate:"required"`

	// The user-defined name for this instance group.
	Name *string `json:"name" validate:"required"`

	ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`

	// The status of the instance group
	// - `deleting`: Group is being deleted
	// - `healthy`: Group has `membership_count` instances
	// - `scaling`: Instances in the group are being created or deleted to reach
	//              `membership_count`
	// - `unhealthy`: Group is unable to reach `membership_count` instances.
	Status *string `json:"status" validate:"required"`

	// Array of references to subnets to use when creating new instances.
	Subnets []SubnetReference `json:"subnets" validate:"required"`

	// The date and time that the instance group was updated.
	UpdatedAt *strfmt.DateTime `json:"updated_at" validate:"required"`

	// The VPC the instance group resides in.
	VPC *VPCReference `json:"vpc" validate:"required"`
}

// Constants associated with the InstanceGroup.Status property.
// The status of the instance group
// - `deleting`: Group is being deleted
// - `healthy`: Group has `membership_count` instances
// - `scaling`: Instances in the group are being created or deleted to reach
//              `membership_count`
// - `unhealthy`: Group is unable to reach `membership_count` instances.
const (
	InstanceGroupStatusDeletingConst  = "deleting"
	InstanceGroupStatusHealthyConst   = "healthy"
	InstanceGroupStatusScalingConst   = "scaling"
	InstanceGroupStatusUnhealthyConst = "unhealthy"
)

// UnmarshalInstanceGroup unmarshals an instance of InstanceGroup from the specified map of raw messages.
func UnmarshalInstanceGroup(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroup)
	err = core.UnmarshalPrimitive(m, "application_port", &obj.ApplicationPort)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "instance_template", &obj.InstanceTemplate, UnmarshalInstanceTemplateReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "load_balancer_pool", &obj.LoadBalancerPool, UnmarshalLoadBalancerPoolReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "managers", &obj.Managers, UnmarshalInstanceGroupManagerReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "membership_count", &obj.MembershipCount)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "status", &obj.Status)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "subnets", &obj.Subnets, UnmarshalSubnetReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupCollection : InstanceGroupCollection struct
type InstanceGroupCollection struct {
	// A link to the first page of resources.
	First *InstanceGroupCollectionFirst `json:"first" validate:"required"`

	// Collection of instance groups.
	InstanceGroups []InstanceGroup `json:"instance_groups" validate:"required"`

	// The maximum number of resources that can be returned by the request.
	Limit *int64 `json:"limit" validate:"required"`

	// A link to the next page of resources. This property is present for all pages
	// except the last page.
	Next *InstanceGroupCollectionNext `json:"next,omitempty"`

	// The total number of resources across all pages.
	TotalCount *int64 `json:"total_count" validate:"required"`
}

// UnmarshalInstanceGroupCollection unmarshals an instance of InstanceGroupCollection from the specified map of raw messages.
func UnmarshalInstanceGroupCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupCollection)
	err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalInstanceGroupCollectionFirst)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "instance_groups", &obj.InstanceGroups, UnmarshalInstanceGroup)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalInstanceGroupCollectionNext)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupCollectionFirst : A link to the first page of resources.
type InstanceGroupCollectionFirst struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalInstanceGroupCollectionFirst unmarshals an instance of InstanceGroupCollectionFirst from the specified map of raw messages.
func UnmarshalInstanceGroupCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupCollectionFirst)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
type InstanceGroupCollectionNext struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalInstanceGroupCollectionNext unmarshals an instance of InstanceGroupCollectionNext from the specified map of raw messages.
func UnmarshalInstanceGroupCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupCollectionNext)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManager : InstanceGroupManager struct
// Models which "extend" this model:
// - InstanceGroupManagerAutoScale
// - InstanceGroupManagerScheduled
type InstanceGroupManager struct {
	// The date and time that the instance group manager was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The URL for this instance group manager.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this instance group manager.
	ID *string `json:"id" validate:"required"`

	// If set to `true`, this manager will control the instance group.
	ManagementEnabled *bool `json:"management_enabled" validate:"required"`

	// The user-defined name for this instance group manager. Names must be unique within the instance group.
	Name *string `json:"name" validate:"required"`

	// The date and time that the instance group manager was updated.
	UpdatedAt *strfmt.DateTime `json:"updated_at" validate:"required"`

	// The time window in seconds to aggregate metrics prior to evaluation.
	AggregationWindow *int64 `json:"aggregation_window,omitempty"`

	// The duration of time in seconds to pause further scale actions after scaling has taken place.
	Cooldown *int64 `json:"cooldown,omitempty"`

	// The type of instance group manager.
	ManagerType *string `json:"manager_type,omitempty"`

	// The maximum number of members in a managed instance group.
	MaxMembershipCount *int64 `json:"max_membership_count,omitempty"`

	// The minimum number of members in a managed instance group.
	MinMembershipCount *int64 `json:"min_membership_count,omitempty"`

	// The policies of the instance group manager.
	Policies []InstanceGroupManagerPolicyReference `json:"policies,omitempty"`

	// The actions of the instance group manager.
	Actions []InstanceGroupManagerActionReference `json:"actions,omitempty"`
}

// Constants associated with the InstanceGroupManager.ManagerType property.
// The type of instance group manager.
const (
	InstanceGroupManagerManagerTypeAutoscaleConst = "autoscale"
)

func (*InstanceGroupManager) isaInstanceGroupManager() bool {
	return true
}

type InstanceGroupManagerIntf interface {
	isaInstanceGroupManager() bool
}

// UnmarshalInstanceGroupManager unmarshals an instance of InstanceGroupManager from the specified map of raw messages.
func UnmarshalInstanceGroupManager(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManager)
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "management_enabled", &obj.ManagementEnabled)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "aggregation_window", &obj.AggregationWindow)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "cooldown", &obj.Cooldown)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "manager_type", &obj.ManagerType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "policies", &obj.Policies, UnmarshalInstanceGroupManagerPolicyReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "actions", &obj.Actions, UnmarshalInstanceGroupManagerActionReference)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerAction : InstanceGroupManagerAction struct
// Models which "extend" this model:
// - InstanceGroupManagerActionScheduledAction
type InstanceGroupManagerAction struct {
	// If set to `true`, this scheduled action will be automatically deleted after it has finished and the
	// `auto_delete_timeout` time has passed.
	AutoDelete *bool `json:"auto_delete" validate:"required"`

	// Amount of time in hours that are required to pass before the scheduled action will be automatically deleted once it
	// has finished. If this value is 0, the action will be deleted on completion.
	AutoDeleteTimeout *int64 `json:"auto_delete_timeout" validate:"required"`

	// The date and time that the instance group manager action was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The URL for this instance group manager action.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this instance group manager action.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this instance group manager action. Names must be unique within the instance group
	// manager.
	Name *string `json:"name" validate:"required"`

	// The resource type.
	ResourceType *string `json:"resource_type" validate:"required"`

	// The status of the instance group action
	// - `active`: Action is ready to be run
	// - `completed`: Action was completed successfully
	// - `failed`: Action could not be completed successfully
	// - `incompatible`: Action parameters are not compatible with the group or manager
	// - `omitted`: Action was not applied because this action's manager was disabled.
	Status *string `json:"status" validate:"required"`

	// The date and time that the instance group manager action was modified.
	UpdatedAt *strfmt.DateTime `json:"updated_at" validate:"required"`

	// The type of action for the instance group.
	ActionType *string `json:"action_type,omitempty"`

	// The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min
	// period.
	CronSpec *string `json:"cron_spec,omitempty"`

	// The date and time the scheduled action was last applied. If empty the action has never been applied.
	LastAppliedAt *strfmt.DateTime `json:"last_applied_at,omitempty"`

	// The date and time the scheduled action will next run. If empty the system is currently calculating the next run
	// time.
	NextRunAt *strfmt.DateTime `json:"next_run_at,omitempty"`

	Group *InstanceGroupManagerScheduledActionGroupGroup `json:"group,omitempty"`

	Manager InstanceGroupManagerScheduledActionManagerManagerIntf `json:"manager,omitempty"`
}

// Constants associated with the InstanceGroupManagerAction.ResourceType property.
// The resource type.
const (
	InstanceGroupManagerActionResourceTypeInstanceGroupManagerActionConst = "instance_group_manager_action"
)

// Constants associated with the InstanceGroupManagerAction.Status property.
// The status of the instance group action
// - `active`: Action is ready to be run
// - `completed`: Action was completed successfully
// - `failed`: Action could not be completed successfully
// - `incompatible`: Action parameters are not compatible with the group or manager
// - `omitted`: Action was not applied because this action's manager was disabled.
const (
	InstanceGroupManagerActionStatusActiveConst       = "active"
	InstanceGroupManagerActionStatusCompletedConst    = "completed"
	InstanceGroupManagerActionStatusFailedConst       = "failed"
	InstanceGroupManagerActionStatusIncompatibleConst = "incompatible"
	InstanceGroupManagerActionStatusOmittedConst      = "omitted"
)

// Constants associated with the InstanceGroupManagerAction.ActionType property.
// The type of action for the instance group.
const (
	InstanceGroupManagerActionActionTypeScheduledConst = "scheduled"
)

func (*InstanceGroupManagerAction) isaInstanceGroupManagerAction() bool {
	return true
}

type InstanceGroupManagerActionIntf interface {
	isaInstanceGroupManagerAction() bool
}

// UnmarshalInstanceGroupManagerAction unmarshals an instance of InstanceGroupManagerAction from the specified map of raw messages.
func UnmarshalInstanceGroupManagerAction(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerAction)
	err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "auto_delete_timeout", &obj.AutoDeleteTimeout)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "status", &obj.Status)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "action_type", &obj.ActionType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "last_applied_at", &obj.LastAppliedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "next_run_at", &obj.NextRunAt)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroupGroup)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionManagerManager)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerActionPatch : InstanceGroupManagerActionPatch struct
// Models which "extend" this model:
// - InstanceGroupManagerActionPatchScheduledActionPatch
type InstanceGroupManagerActionPatch struct {
	// The user-defined name for this instance group manager action. Names must be unique within the instance group
	// manager.
	Name *string `json:"name,omitempty"`

	// The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min
	// period.
	CronSpec *string `json:"cron_spec,omitempty"`

	Group *InstanceGroupManagerScheduledActionGroupPatch `json:"group,omitempty"`

	Manager InstanceGroupManagerScheduledActionByManagerPatchManagerIntf `json:"manager,omitempty"`

	// The date and time the scheduled action will run.
	RunAt *strfmt.DateTime `json:"run_at,omitempty"`
}

func (*InstanceGroupManagerActionPatch) isaInstanceGroupManagerActionPatch() bool {
	return true
}

type InstanceGroupManagerActionPatchIntf interface {
	isaInstanceGroupManagerActionPatch() bool
}

// UnmarshalInstanceGroupManagerActionPatch unmarshals an instance of InstanceGroupManagerActionPatch from the specified map of raw messages.
func UnmarshalInstanceGroupManagerActionPatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerActionPatch)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroupPatch)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionByManagerPatchManager)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "run_at", &obj.RunAt)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the InstanceGroupManagerActionPatch
func (instanceGroupManagerActionPatch *InstanceGroupManagerActionPatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(instanceGroupManagerActionPatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// InstanceGroupManagerActionPrototype : InstanceGroupManagerActionPrototype struct
// Models which "extend" this model:
// - InstanceGroupManagerActionPrototypeScheduledActionPrototype
type InstanceGroupManagerActionPrototype struct {
	// The user-defined name for this instance group manager action. Names must be unique within the instance group
	// manager.
	Name *string `json:"name,omitempty"`

	// The date and time the scheduled action will run.
	RunAt *strfmt.DateTime `json:"run_at,omitempty"`

	Group *InstanceGroupManagerScheduledActionGroupPrototype `json:"group,omitempty"`

	Manager InstanceGroupManagerScheduledActionByManagerManagerIntf `json:"manager,omitempty"`

	// The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min
	// period.
	CronSpec *string `json:"cron_spec,omitempty"`
}

func (*InstanceGroupManagerActionPrototype) isaInstanceGroupManagerActionPrototype() bool {
	return true
}

type InstanceGroupManagerActionPrototypeIntf interface {
	isaInstanceGroupManagerActionPrototype() bool
}

// UnmarshalInstanceGroupManagerActionPrototype unmarshals an instance of InstanceGroupManagerActionPrototype from the specified map of raw messages.
func UnmarshalInstanceGroupManagerActionPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerActionPrototype)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "run_at", &obj.RunAt)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroupPrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionByManagerManager)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerActionReference : InstanceGroupManagerActionReference struct
type InstanceGroupManagerActionReference struct {
	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *InstanceGroupManagerActionReferenceDeleted `json:"deleted,omitempty"`

	// The URL for this instance group manager action.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this instance group manager action.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this instance group manager action. Names must be unique within the instance group
	// manager.
	Name *string `json:"name" validate:"required"`

	// The resource type.
	ResourceType *string `json:"resource_type" validate:"required"`
}

// Constants associated with the InstanceGroupManagerActionReference.ResourceType property.
// The resource type.
const (
	InstanceGroupManagerActionReferenceResourceTypeInstanceGroupManagerActionConst = "instance_group_manager_action"
)

// UnmarshalInstanceGroupManagerActionReference unmarshals an instance of InstanceGroupManagerActionReference from the specified map of raw messages.
func UnmarshalInstanceGroupManagerActionReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerActionReference)
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalInstanceGroupManagerActionReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerActionReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type InstanceGroupManagerActionReferenceDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalInstanceGroupManagerActionReferenceDeleted unmarshals an instance of InstanceGroupManagerActionReferenceDeleted from the specified map of raw messages.
func UnmarshalInstanceGroupManagerActionReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerActionReferenceDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerActionsCollection : InstanceGroupManagerActionsCollection struct
type InstanceGroupManagerActionsCollection struct {
	// Collection of instance group manager actions.
	Actions []InstanceGroupManagerActionIntf `json:"actions" validate:"required"`

	// A link to the first page of resources.
	First *InstanceGroupManagerActionsCollectionFirst `json:"first" validate:"required"`

	// The maximum number of resources that can be returned by the request.
	Limit *int64 `json:"limit" validate:"required"`

	// A link to the next page of resources. This property is present for all pages
	// except the last page.
	Next *InstanceGroupManagerActionsCollectionNext `json:"next,omitempty"`

	// The total number of resources across all pages.
	TotalCount *int64 `json:"total_count" validate:"required"`
}

// UnmarshalInstanceGroupManagerActionsCollection unmarshals an instance of InstanceGroupManagerActionsCollection from the specified map of raw messages.
func UnmarshalInstanceGroupManagerActionsCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerActionsCollection)
	err = core.UnmarshalModel(m, "actions", &obj.Actions, UnmarshalInstanceGroupManagerAction)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalInstanceGroupManagerActionsCollectionFirst)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalInstanceGroupManagerActionsCollectionNext)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerActionsCollectionFirst : A link to the first page of resources.
type InstanceGroupManagerActionsCollectionFirst struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalInstanceGroupManagerActionsCollectionFirst unmarshals an instance of InstanceGroupManagerActionsCollectionFirst from the specified map of raw messages.
func UnmarshalInstanceGroupManagerActionsCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerActionsCollectionFirst)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerActionsCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
type InstanceGroupManagerActionsCollectionNext struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalInstanceGroupManagerActionsCollectionNext unmarshals an instance of InstanceGroupManagerActionsCollectionNext from the specified map of raw messages.
func UnmarshalInstanceGroupManagerActionsCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerActionsCollectionNext)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerCollection : InstanceGroupManagerCollection struct
type InstanceGroupManagerCollection struct {
	// A link to the first page of resources.
	First *InstanceGroupManagerCollectionFirst `json:"first" validate:"required"`

	// The maximum number of resources that can be returned by the request.
	Limit *int64 `json:"limit" validate:"required"`

	// Collection of instance group managers.
	Managers []InstanceGroupManagerIntf `json:"managers" validate:"required"`

	// A link to the next page of resources. This property is present for all pages
	// except the last page.
	Next *InstanceGroupManagerCollectionNext `json:"next,omitempty"`

	// The total number of resources across all pages.
	TotalCount *int64 `json:"total_count" validate:"required"`
}

// UnmarshalInstanceGroupManagerCollection unmarshals an instance of InstanceGroupManagerCollection from the specified map of raw messages.
func UnmarshalInstanceGroupManagerCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerCollection)
	err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalInstanceGroupManagerCollectionFirst)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "managers", &obj.Managers, UnmarshalInstanceGroupManager)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalInstanceGroupManagerCollectionNext)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerCollectionFirst : A link to the first page of resources.
type InstanceGroupManagerCollectionFirst struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalInstanceGroupManagerCollectionFirst unmarshals an instance of InstanceGroupManagerCollectionFirst from the specified map of raw messages.
func UnmarshalInstanceGroupManagerCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerCollectionFirst)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
type InstanceGroupManagerCollectionNext struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalInstanceGroupManagerCollectionNext unmarshals an instance of InstanceGroupManagerCollectionNext from the specified map of raw messages.
func UnmarshalInstanceGroupManagerCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerCollectionNext)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerPatch : InstanceGroupManagerPatch struct
type InstanceGroupManagerPatch struct {
	// The time window in seconds to aggregate metrics prior to evaluation.
	AggregationWindow *int64 `json:"aggregation_window,omitempty"`

	// The duration of time in seconds to pause further scale actions after scaling has taken place.
	Cooldown *int64 `json:"cooldown,omitempty"`

	// If set to `true`, this manager will control the instance group.
	ManagementEnabled *bool `json:"management_enabled,omitempty"`

	// The maximum number of members in a managed instance group.
	MaxMembershipCount *int64 `json:"max_membership_count,omitempty"`

	// The minimum number of members in a managed instance group.
	MinMembershipCount *int64 `json:"min_membership_count,omitempty"`

	// The user-defined name for this instance group manager. Names must be unique within the instance group.
	Name *string `json:"name,omitempty"`
}

// UnmarshalInstanceGroupManagerPatch unmarshals an instance of InstanceGroupManagerPatch from the specified map of raw messages.
func UnmarshalInstanceGroupManagerPatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerPatch)
	err = core.UnmarshalPrimitive(m, "aggregation_window", &obj.AggregationWindow)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "cooldown", &obj.Cooldown)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "management_enabled", &obj.ManagementEnabled)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the InstanceGroupManagerPatch
func (instanceGroupManagerPatch *InstanceGroupManagerPatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(instanceGroupManagerPatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// InstanceGroupManagerPolicy : InstanceGroupManagerPolicy struct
// Models which "extend" this model:
// - InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy
type InstanceGroupManagerPolicy struct {
	// The date and time that the instance group manager policy was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The URL for this instance group manager policy.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this instance group manager policy.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this instance group manager policy. Names must be unique within the instance group
	// manager.
	Name *string `json:"name" validate:"required"`

	// The date and time that the instance group manager policy was updated.
	UpdatedAt *strfmt.DateTime `json:"updated_at" validate:"required"`

	// The type of metric to be evaluated.
	MetricType *string `json:"metric_type,omitempty"`

	// The metric value to be evaluated.
	MetricValue *int64 `json:"metric_value,omitempty"`

	// The type of policy for the instance group.
	PolicyType *string `json:"policy_type,omitempty"`
}

// Constants associated with the InstanceGroupManagerPolicy.MetricType property.
// The type of metric to be evaluated.
const (
	InstanceGroupManagerPolicyMetricTypeCpuConst        = "cpu"
	InstanceGroupManagerPolicyMetricTypeMemoryConst     = "memory"
	InstanceGroupManagerPolicyMetricTypeNetworkInConst  = "network_in"
	InstanceGroupManagerPolicyMetricTypeNetworkOutConst = "network_out"
)

// Constants associated with the InstanceGroupManagerPolicy.PolicyType property.
// The type of policy for the instance group.
const (
	InstanceGroupManagerPolicyPolicyTypeTargetConst = "target"
)

func (*InstanceGroupManagerPolicy) isaInstanceGroupManagerPolicy() bool {
	return true
}

type InstanceGroupManagerPolicyIntf interface {
	isaInstanceGroupManagerPolicy() bool
}

// UnmarshalInstanceGroupManagerPolicy unmarshals an instance of InstanceGroupManagerPolicy from the specified map of raw messages.
func UnmarshalInstanceGroupManagerPolicy(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerPolicy)
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "metric_type", &obj.MetricType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "metric_value", &obj.MetricValue)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "policy_type", &obj.PolicyType)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerPolicyCollection : InstanceGroupManagerPolicyCollection struct
type InstanceGroupManagerPolicyCollection struct {
	// A link to the first page of resources.
	First *InstanceGroupManagerPolicyCollectionFirst `json:"first" validate:"required"`

	// The maximum number of resources that can be returned by the request.
	Limit *int64 `json:"limit" validate:"required"`

	// A link to the next page of resources. This property is present for all pages
	// except the last page.
	Next *InstanceGroupManagerPolicyCollectionNext `json:"next,omitempty"`

	// Collection of instance group manager policies.
	Policies []InstanceGroupManagerPolicyIntf `json:"policies" validate:"required"`

	// The total number of resources across all pages.
	TotalCount *int64 `json:"total_count" validate:"required"`
}

// UnmarshalInstanceGroupManagerPolicyCollection unmarshals an instance of InstanceGroupManagerPolicyCollection from the specified map of raw messages.
func UnmarshalInstanceGroupManagerPolicyCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerPolicyCollection)
	err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalInstanceGroupManagerPolicyCollectionFirst)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalInstanceGroupManagerPolicyCollectionNext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "policies", &obj.Policies, UnmarshalInstanceGroupManagerPolicy)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerPolicyCollectionFirst : A link to the first page of resources.
type InstanceGroupManagerPolicyCollectionFirst struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalInstanceGroupManagerPolicyCollectionFirst unmarshals an instance of InstanceGroupManagerPolicyCollectionFirst from the specified map of raw messages.
func UnmarshalInstanceGroupManagerPolicyCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerPolicyCollectionFirst)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerPolicyCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
type InstanceGroupManagerPolicyCollectionNext struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalInstanceGroupManagerPolicyCollectionNext unmarshals an instance of InstanceGroupManagerPolicyCollectionNext from the specified map of raw messages.
func UnmarshalInstanceGroupManagerPolicyCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerPolicyCollectionNext)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerPolicyPatch : InstanceGroupManagerPolicyPatch struct
type InstanceGroupManagerPolicyPatch struct {
	// The type of metric to be evaluated.
	MetricType *string `json:"metric_type,omitempty"`

	// The metric value to be evaluated.
	MetricValue *int64 `json:"metric_value,omitempty"`

	// The user-defined name for this instance group manager policy. Names must be unique within the instance group
	// manager.
	Name *string `json:"name,omitempty"`
}

// Constants associated with the InstanceGroupManagerPolicyPatch.MetricType property.
// The type of metric to be evaluated.
const (
	InstanceGroupManagerPolicyPatchMetricTypeCpuConst        = "cpu"
	InstanceGroupManagerPolicyPatchMetricTypeMemoryConst     = "memory"
	InstanceGroupManagerPolicyPatchMetricTypeNetworkInConst  = "network_in"
	InstanceGroupManagerPolicyPatchMetricTypeNetworkOutConst = "network_out"
)

// UnmarshalInstanceGroupManagerPolicyPatch unmarshals an instance of InstanceGroupManagerPolicyPatch from the specified map of raw messages.
func UnmarshalInstanceGroupManagerPolicyPatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerPolicyPatch)
	err = core.UnmarshalPrimitive(m, "metric_type", &obj.MetricType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "metric_value", &obj.MetricValue)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the InstanceGroupManagerPolicyPatch
func (instanceGroupManagerPolicyPatch *InstanceGroupManagerPolicyPatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(instanceGroupManagerPolicyPatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// InstanceGroupManagerPolicyPrototype : InstanceGroupManagerPolicyPrototype struct
// Models which "extend" this model:
// - InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype
type InstanceGroupManagerPolicyPrototype struct {
	// The user-defined name for this instance group manager policy. Names must be unique within the instance group
	// manager.
	Name *string `json:"name,omitempty"`

	// The type of metric to be evaluated.
	MetricType *string `json:"metric_type,omitempty"`

	// The metric value to be evaluated.
	MetricValue *int64 `json:"metric_value,omitempty"`

	// The type of policy for the instance group.
	PolicyType *string `json:"policy_type,omitempty"`
}

// Constants associated with the InstanceGroupManagerPolicyPrototype.MetricType property.
// The type of metric to be evaluated.
const (
	InstanceGroupManagerPolicyPrototypeMetricTypeCpuConst        = "cpu"
	InstanceGroupManagerPolicyPrototypeMetricTypeMemoryConst     = "memory"
	InstanceGroupManagerPolicyPrototypeMetricTypeNetworkInConst  = "network_in"
	InstanceGroupManagerPolicyPrototypeMetricTypeNetworkOutConst = "network_out"
)

// Constants associated with the InstanceGroupManagerPolicyPrototype.PolicyType property.
// The type of policy for the instance group.
const (
	InstanceGroupManagerPolicyPrototypePolicyTypeTargetConst = "target"
)

func (*InstanceGroupManagerPolicyPrototype) isaInstanceGroupManagerPolicyPrototype() bool {
	return true
}

type InstanceGroupManagerPolicyPrototypeIntf interface {
	isaInstanceGroupManagerPolicyPrototype() bool
}

// UnmarshalInstanceGroupManagerPolicyPrototype unmarshals an instance of InstanceGroupManagerPolicyPrototype from the specified map of raw messages.
func UnmarshalInstanceGroupManagerPolicyPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerPolicyPrototype)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "metric_type", &obj.MetricType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "metric_value", &obj.MetricValue)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "policy_type", &obj.PolicyType)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerPolicyReference : InstanceGroupManagerPolicyReference struct
type InstanceGroupManagerPolicyReference struct {
	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *InstanceGroupManagerPolicyReferenceDeleted `json:"deleted,omitempty"`

	// The URL for this instance group manager policy.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this instance group manager policy.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this instance group manager policy. Names must be unique within the instance group
	// manager.
	Name *string `json:"name" validate:"required"`
}

// UnmarshalInstanceGroupManagerPolicyReference unmarshals an instance of InstanceGroupManagerPolicyReference from the specified map of raw messages.
func UnmarshalInstanceGroupManagerPolicyReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerPolicyReference)
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalInstanceGroupManagerPolicyReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerPolicyReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type InstanceGroupManagerPolicyReferenceDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalInstanceGroupManagerPolicyReferenceDeleted unmarshals an instance of InstanceGroupManagerPolicyReferenceDeleted from the specified map of raw messages.
func UnmarshalInstanceGroupManagerPolicyReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerPolicyReferenceDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerPrototype : InstanceGroupManagerPrototype struct
// Models which "extend" this model:
// - InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype
// - InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype
type InstanceGroupManagerPrototype struct {
	// If set to `true`, this manager will control the instance group.
	ManagementEnabled *bool `json:"management_enabled,omitempty"`

	// The user-defined name for this instance group manager. Names must be unique within the instance group.
	Name *string `json:"name,omitempty"`

	// The time window in seconds to aggregate metrics prior to evaluation.
	AggregationWindow *int64 `json:"aggregation_window,omitempty"`

	// The duration of time in seconds to pause further scale actions after scaling has taken place.
	Cooldown *int64 `json:"cooldown,omitempty"`

	// The type of instance group manager.
	ManagerType *string `json:"manager_type,omitempty"`

	// The maximum number of members in a managed instance group.
	MaxMembershipCount *int64 `json:"max_membership_count,omitempty"`

	// The minimum number of members in a managed instance group.
	MinMembershipCount *int64 `json:"min_membership_count,omitempty"`
}

// Constants associated with the InstanceGroupManagerPrototype.ManagerType property.
// The type of instance group manager.
const (
	InstanceGroupManagerPrototypeManagerTypeAutoscaleConst = "autoscale"
)

func (*InstanceGroupManagerPrototype) isaInstanceGroupManagerPrototype() bool {
	return true
}

type InstanceGroupManagerPrototypeIntf interface {
	isaInstanceGroupManagerPrototype() bool
}

// UnmarshalInstanceGroupManagerPrototype unmarshals an instance of InstanceGroupManagerPrototype from the specified map of raw messages.
func UnmarshalInstanceGroupManagerPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerPrototype)
	err = core.UnmarshalPrimitive(m, "management_enabled", &obj.ManagementEnabled)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "aggregation_window", &obj.AggregationWindow)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "cooldown", &obj.Cooldown)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "manager_type", &obj.ManagerType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerReference : InstanceGroupManagerReference struct
type InstanceGroupManagerReference struct {
	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *InstanceGroupManagerReferenceDeleted `json:"deleted,omitempty"`

	// The URL for this instance group manager.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this instance group manager.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this instance group manager. Names must be unique within the instance group.
	Name *string `json:"name" validate:"required"`
}

// UnmarshalInstanceGroupManagerReference unmarshals an instance of InstanceGroupManagerReference from the specified map of raw messages.
func UnmarshalInstanceGroupManagerReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerReference)
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalInstanceGroupManagerReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type InstanceGroupManagerReferenceDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalInstanceGroupManagerReferenceDeleted unmarshals an instance of InstanceGroupManagerReferenceDeleted from the specified map of raw messages.
func UnmarshalInstanceGroupManagerReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerReferenceDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerScheduledActionByManagerManager : InstanceGroupManagerScheduledActionByManagerManager struct
// Models which "extend" this model:
// - InstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototype
type InstanceGroupManagerScheduledActionByManagerManager struct {
	// The maximum number of members the instance group should have at the scheduled time.
	MaxMembershipCount *int64 `json:"max_membership_count,omitempty"`

	// The minimum number of members the instance group should have at the scheduled time.
	MinMembershipCount *int64 `json:"min_membership_count,omitempty"`

	// The unique identifier for this instance group manager.
	ID *string `json:"id,omitempty"`

	// The URL for this instance group manager.
	Href *string `json:"href,omitempty"`
}

func (*InstanceGroupManagerScheduledActionByManagerManager) isaInstanceGroupManagerScheduledActionByManagerManager() bool {
	return true
}

type InstanceGroupManagerScheduledActionByManagerManagerIntf interface {
	isaInstanceGroupManagerScheduledActionByManagerManager() bool
}

// UnmarshalInstanceGroupManagerScheduledActionByManagerManager unmarshals an instance of InstanceGroupManagerScheduledActionByManagerManager from the specified map of raw messages.
func UnmarshalInstanceGroupManagerScheduledActionByManagerManager(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerScheduledActionByManagerManager)
	err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerScheduledActionByManagerPatchManager : InstanceGroupManagerScheduledActionByManagerPatchManager struct
// Models which "extend" this model:
// - InstanceGroupManagerScheduledActionByManagerPatchManagerAutoScalePatch
type InstanceGroupManagerScheduledActionByManagerPatchManager struct {
	// The maximum number of members the instance group should have at the scheduled time.
	MaxMembershipCount *int64 `json:"max_membership_count,omitempty"`

	// The minimum number of members the instance group should have at the scheduled time.
	MinMembershipCount *int64 `json:"min_membership_count,omitempty"`
}

func (*InstanceGroupManagerScheduledActionByManagerPatchManager) isaInstanceGroupManagerScheduledActionByManagerPatchManager() bool {
	return true
}

type InstanceGroupManagerScheduledActionByManagerPatchManagerIntf interface {
	isaInstanceGroupManagerScheduledActionByManagerPatchManager() bool
}

// UnmarshalInstanceGroupManagerScheduledActionByManagerPatchManager unmarshals an instance of InstanceGroupManagerScheduledActionByManagerPatchManager from the specified map of raw messages.
func UnmarshalInstanceGroupManagerScheduledActionByManagerPatchManager(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerScheduledActionByManagerPatchManager)
	err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerScheduledActionGroupGroup : InstanceGroupManagerScheduledActionGroupGroup struct
type InstanceGroupManagerScheduledActionGroupGroup struct {
	// The number of members the instance group should have at the scheduled time.
	MembershipCount *int64 `json:"membership_count" validate:"required"`
}

// UnmarshalInstanceGroupManagerScheduledActionGroupGroup unmarshals an instance of InstanceGroupManagerScheduledActionGroupGroup from the specified map of raw messages.
func UnmarshalInstanceGroupManagerScheduledActionGroupGroup(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerScheduledActionGroupGroup)
	err = core.UnmarshalPrimitive(m, "membership_count", &obj.MembershipCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerScheduledActionGroupPatch : InstanceGroupManagerScheduledActionGroupPatch struct
type InstanceGroupManagerScheduledActionGroupPatch struct {
	// The number of members the instance group should have at the scheduled time.
	MembershipCount *int64 `json:"membership_count,omitempty"`
}

// UnmarshalInstanceGroupManagerScheduledActionGroupPatch unmarshals an instance of InstanceGroupManagerScheduledActionGroupPatch from the specified map of raw messages.
func UnmarshalInstanceGroupManagerScheduledActionGroupPatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerScheduledActionGroupPatch)
	err = core.UnmarshalPrimitive(m, "membership_count", &obj.MembershipCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerScheduledActionGroupPrototype : InstanceGroupManagerScheduledActionGroupPrototype struct
type InstanceGroupManagerScheduledActionGroupPrototype struct {
	// The number of members the instance group should have at the scheduled time.
	MembershipCount *int64 `json:"membership_count" validate:"required"`
}

// NewInstanceGroupManagerScheduledActionGroupPrototype : Instantiate InstanceGroupManagerScheduledActionGroupPrototype (Generic Model Constructor)
func (*VpcV1) NewInstanceGroupManagerScheduledActionGroupPrototype(membershipCount int64) (model *InstanceGroupManagerScheduledActionGroupPrototype, err error) {
	model = &InstanceGroupManagerScheduledActionGroupPrototype{
		MembershipCount: core.Int64Ptr(membershipCount),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

// UnmarshalInstanceGroupManagerScheduledActionGroupPrototype unmarshals an instance of InstanceGroupManagerScheduledActionGroupPrototype from the specified map of raw messages.
func UnmarshalInstanceGroupManagerScheduledActionGroupPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerScheduledActionGroupPrototype)
	err = core.UnmarshalPrimitive(m, "membership_count", &obj.MembershipCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerScheduledActionManagerManager : InstanceGroupManagerScheduledActionManagerManager struct
// Models which "extend" this model:
// - InstanceGroupManagerScheduledActionManagerManagerAutoScale
type InstanceGroupManagerScheduledActionManagerManager struct {
	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *InstanceGroupManagerReferenceDeleted `json:"deleted,omitempty"`

	// The URL for this instance group manager.
	Href *string `json:"href,omitempty"`

	// The unique identifier for this instance group manager.
	ID *string `json:"id,omitempty"`

	// The user-defined name for this instance group manager. Names must be unique within the instance group.
	Name *string `json:"name,omitempty"`

	// The maximum number of members the instance group should have at the scheduled time.
	MaxMembershipCount *int64 `json:"max_membership_count,omitempty"`

	// The minimum number of members the instance group should have at the scheduled time.
	MinMembershipCount *int64 `json:"min_membership_count,omitempty"`
}

func (*InstanceGroupManagerScheduledActionManagerManager) isaInstanceGroupManagerScheduledActionManagerManager() bool {
	return true
}

type InstanceGroupManagerScheduledActionManagerManagerIntf interface {
	isaInstanceGroupManagerScheduledActionManagerManager() bool
}

// UnmarshalInstanceGroupManagerScheduledActionManagerManager unmarshals an instance of InstanceGroupManagerScheduledActionManagerManager from the specified map of raw messages.
func UnmarshalInstanceGroupManagerScheduledActionManagerManager(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerScheduledActionManagerManager)
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalInstanceGroupManagerReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupMembership : InstanceGroupMembership struct
type InstanceGroupMembership struct {
	// The date and time that the instance group manager policy was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// If set to true, when deleting the membership the instance will also be deleted.
	DeleteInstanceOnMembershipDelete *bool `json:"delete_instance_on_membership_delete" validate:"required"`

	// The URL for this instance group membership.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this instance group membership.
	ID *string `json:"id" validate:"required"`

	Instance *InstanceReference `json:"instance" validate:"required"`

	InstanceTemplate *InstanceTemplateReference `json:"instance_template" validate:"required"`

	// The user-defined name for this instance group membership. Names must be unique within the instance group.
	Name *string `json:"name" validate:"required"`

	PoolMember *LoadBalancerPoolMemberReference `json:"pool_member,omitempty"`

	// The status of the instance group membership
	// - `deleting`: Membership is deleting dependent resources
	// - `failed`: Membership was unable to maintain dependent resources
	// - `healthy`: Membership is active and serving in the group
	// - `pending`: Membership is waiting for dependent resources
	// - `unhealthy`: Membership has unhealthy dependent resources.
	Status *string `json:"status" validate:"required"`

	// The date and time that the instance group membership was updated.
	UpdatedAt *strfmt.DateTime `json:"updated_at" validate:"required"`
}

// Constants associated with the InstanceGroupMembership.Status property.
// The status of the instance group membership
// - `deleting`: Membership is deleting dependent resources
// - `failed`: Membership was unable to maintain dependent resources
// - `healthy`: Membership is active and serving in the group
// - `pending`: Membership is waiting for dependent resources
// - `unhealthy`: Membership has unhealthy dependent resources.
const (
	InstanceGroupMembershipStatusDeletingConst  = "deleting"
	InstanceGroupMembershipStatusFailedConst    = "failed"
	InstanceGroupMembershipStatusHealthyConst   = "healthy"
	InstanceGroupMembershipStatusPendingConst   = "pending"
	InstanceGroupMembershipStatusUnhealthyConst = "unhealthy"
)

// UnmarshalInstanceGroupMembership unmarshals an instance of InstanceGroupMembership from the specified map of raw messages.
func UnmarshalInstanceGroupMembership(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupMembership)
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "delete_instance_on_membership_delete", &obj.DeleteInstanceOnMembershipDelete)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "instance", &obj.Instance, UnmarshalInstanceReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "instance_template", &obj.InstanceTemplate, UnmarshalInstanceTemplateReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "pool_member", &obj.PoolMember, UnmarshalLoadBalancerPoolMemberReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "status", &obj.Status)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupMembershipCollection : InstanceGroupMembershipCollection struct
type InstanceGroupMembershipCollection struct {
	// A link to the first page of resources.
	First *InstanceGroupMembershipCollectionFirst `json:"first" validate:"required"`

	// The maximum number of resources that can be returned by the request.
	Limit *int64 `json:"limit" validate:"required"`

	// Collection of instance group memberships.
	Memberships []InstanceGroupMembership `json:"memberships" validate:"required"`

	// A link to the next page of resources. This property is present for all pages
	// except the last page.
	Next *InstanceGroupMembershipCollectionNext `json:"next,omitempty"`

	// The total number of resources across all pages.
	TotalCount *int64 `json:"total_count" validate:"required"`
}

// UnmarshalInstanceGroupMembershipCollection unmarshals an instance of InstanceGroupMembershipCollection from the specified map of raw messages.
func UnmarshalInstanceGroupMembershipCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupMembershipCollection)
	err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalInstanceGroupMembershipCollectionFirst)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "memberships", &obj.Memberships, UnmarshalInstanceGroupMembership)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalInstanceGroupMembershipCollectionNext)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupMembershipCollectionFirst : A link to the first page of resources.
type InstanceGroupMembershipCollectionFirst struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalInstanceGroupMembershipCollectionFirst unmarshals an instance of InstanceGroupMembershipCollectionFirst from the specified map of raw messages.
func UnmarshalInstanceGroupMembershipCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupMembershipCollectionFirst)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupMembershipCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
type InstanceGroupMembershipCollectionNext struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalInstanceGroupMembershipCollectionNext unmarshals an instance of InstanceGroupMembershipCollectionNext from the specified map of raw messages.
func UnmarshalInstanceGroupMembershipCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupMembershipCollectionNext)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupMembershipPatch : InstanceGroupMembershipPatch struct
type InstanceGroupMembershipPatch struct {
	// The user-defined name for this instance group membership. Names must be unique within the instance group.
	Name *string `json:"name,omitempty"`
}

// UnmarshalInstanceGroupMembershipPatch unmarshals an instance of InstanceGroupMembershipPatch from the specified map of raw messages.
func UnmarshalInstanceGroupMembershipPatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupMembershipPatch)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the InstanceGroupMembershipPatch
func (instanceGroupMembershipPatch *InstanceGroupMembershipPatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(instanceGroupMembershipPatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// InstanceGroupPatch : To add or update load balancer specification for an instance group the `membership_count` must first be set to 0.
type InstanceGroupPatch struct {
	// Required if specifying a load balancer pool only. Used by the instance group when scaling up instances to supply the
	// port for the load balancer pool member.
	ApplicationPort *int64 `json:"application_port,omitempty"`

	// Instance template to use when creating new instances.
	InstanceTemplate InstanceTemplateIdentityIntf `json:"instance_template,omitempty"`

	// The load balancer that the load balancer pool used by this group
	// is in. Must be supplied when using a load balancer pool.
	LoadBalancer LoadBalancerIdentityIntf `json:"load_balancer,omitempty"`

	// When specified, the load balancer pool will be managed by this
	// group. Instances created by this group will have a new load
	// balancer pool member in that pool created. Must be used with
	// `application_port`.
	LoadBalancerPool LoadBalancerPoolIdentityIntf `json:"load_balancer_pool,omitempty"`

	// The number of instances in the instance group.
	MembershipCount *int64 `json:"membership_count,omitempty"`

	// The user-defined name for this instance group.
	Name *string `json:"name,omitempty"`

	// Array of identities to subnets to use when creating new instances.
	Subnets []SubnetIdentityIntf `json:"subnets,omitempty"`
}

// UnmarshalInstanceGroupPatch unmarshals an instance of InstanceGroupPatch from the specified map of raw messages.
func UnmarshalInstanceGroupPatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupPatch)
	err = core.UnmarshalPrimitive(m, "application_port", &obj.ApplicationPort)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "instance_template", &obj.InstanceTemplate, UnmarshalInstanceTemplateIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "load_balancer", &obj.LoadBalancer, UnmarshalLoadBalancerIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "load_balancer_pool", &obj.LoadBalancerPool, UnmarshalLoadBalancerPoolIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "membership_count", &obj.MembershipCount)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "subnets", &obj.Subnets, UnmarshalSubnetIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the InstanceGroupPatch
func (instanceGroupPatch *InstanceGroupPatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(instanceGroupPatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// InstanceGroupReference : InstanceGroupReference struct
type InstanceGroupReference struct {
	// The CRN for this instance group.
	CRN *string `json:"crn" validate:"required"`

	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *InstanceGroupReferenceDeleted `json:"deleted,omitempty"`

	// The URL for this instance group.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this instance group.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this instance group.
	Name *string `json:"name" validate:"required"`
}

// UnmarshalInstanceGroupReference unmarshals an instance of InstanceGroupReference from the specified map of raw messages.
func UnmarshalInstanceGroupReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupReference)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalInstanceGroupReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type InstanceGroupReferenceDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalInstanceGroupReferenceDeleted unmarshals an instance of InstanceGroupReferenceDeleted from the specified map of raw messages.
func UnmarshalInstanceGroupReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupReferenceDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceInitialization : InstanceInitialization struct
type InstanceInitialization struct {
	// Collection of references to public SSH keys used at instance initialization.
	Keys []KeyReferenceInstanceInitializationContextIntf `json:"keys" validate:"required"`

	Password *InstanceInitializationPassword `json:"password,omitempty"`
}

// UnmarshalInstanceInitialization unmarshals an instance of InstanceInitialization from the specified map of raw messages.
func UnmarshalInstanceInitialization(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceInitialization)
	err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyReferenceInstanceInitializationContext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "password", &obj.Password, UnmarshalInstanceInitializationPassword)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceInitializationPassword : InstanceInitializationPassword struct
type InstanceInitializationPassword struct {
	// The administrator password at initialization, encrypted using `encryption_key`, and returned base64-encoded.
	EncryptedPassword *[]byte `json:"encrypted_password" validate:"required"`

	// The reference to the public SSH key used to encrypt the administrator password.
	EncryptionKey KeyReferenceInstanceInitializationContextIntf `json:"encryption_key" validate:"required"`
}

// UnmarshalInstanceInitializationPassword unmarshals an instance of InstanceInitializationPassword from the specified map of raw messages.
func UnmarshalInstanceInitializationPassword(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceInitializationPassword)
	err = core.UnmarshalPrimitive(m, "encrypted_password", &obj.EncryptedPassword)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalKeyReferenceInstanceInitializationContext)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstancePatch : InstancePatch struct
type InstancePatch struct {
	// The user-defined name for this virtual server instance (and default system hostname).
	Name *string `json:"name,omitempty"`

	// The profile to use for this virtual server instance. For the profile to be changed,
	// the instance `status` must be `stopping` or `stopped`. In addition, the requested
	// profile must:
	// - Match the current profile's instance disk support. (Note: If the current profile
	//   supports instance storage disks, the requested profile can have a different
	//   instance storage disk configuration.)
	// - Be compatible with any `placement_target` constraints. For example, if the
	//   instance is placed on a dedicated host, the requested profile `family` must be
	//   the same as the dedicated host `family`.
	Profile InstancePatchProfileIntf `json:"profile,omitempty"`
}

// UnmarshalInstancePatch unmarshals an instance of InstancePatch from the specified map of raw messages.
func UnmarshalInstancePatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstancePatch)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstancePatchProfile)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the InstancePatch
func (instancePatch *InstancePatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(instancePatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// InstancePatchProfile : The profile to use for this virtual server instance. For the profile to be changed, the instance `status` must be
// `stopping` or `stopped`. In addition, the requested profile must:
// - Match the current profile's instance disk support. (Note: If the current profile
//   supports instance storage disks, the requested profile can have a different
//   instance storage disk configuration.)
// - Be compatible with any `placement_target` constraints. For example, if the
//   instance is placed on a dedicated host, the requested profile `family` must be
//   the same as the dedicated host `family`.
// Models which "extend" this model:
// - InstancePatchProfileInstanceProfileIdentityByName
// - InstancePatchProfileInstanceProfileIdentityByHref
type InstancePatchProfile struct {
	// The globally unique name for this virtual server instance profile.
	Name *string `json:"name,omitempty"`

	// The URL for this virtual server instance profile.
	Href *string `json:"href,omitempty"`
}

func (*InstancePatchProfile) isaInstancePatchProfile() bool {
	return true
}

type InstancePatchProfileIntf interface {
	isaInstancePatchProfile() bool
}

// UnmarshalInstancePatchProfile unmarshals an instance of InstancePatchProfile from the specified map of raw messages.
func UnmarshalInstancePatchProfile(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstancePatchProfile)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstancePlacementTargetPrototype : InstancePlacementTargetPrototype struct
// Models which "extend" this model:
// - InstancePlacementTargetPrototypeDedicatedHostIdentity
// - InstancePlacementTargetPrototypeDedicatedHostGroupIdentity
type InstancePlacementTargetPrototype struct {
	// The unique identifier for this dedicated host.
	ID *string `json:"id,omitempty"`

	// The CRN for this dedicated host.
	CRN *string `json:"crn,omitempty"`

	// The URL for this dedicated host.
	Href *string `json:"href,omitempty"`
}

func (*InstancePlacementTargetPrototype) isaInstancePlacementTargetPrototype() bool {
	return true
}

type InstancePlacementTargetPrototypeIntf interface {
	isaInstancePlacementTargetPrototype() bool
}

// UnmarshalInstancePlacementTargetPrototype unmarshals an instance of InstancePlacementTargetPrototype from the specified map of raw messages.
func UnmarshalInstancePlacementTargetPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstancePlacementTargetPrototype)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfile : InstanceProfile struct
type InstanceProfile struct {
	Bandwidth InstanceProfileBandwidthIntf `json:"bandwidth" validate:"required"`

	// Collection of the instance profile's disks.
	Disks []InstanceProfileDisk `json:"disks" validate:"required"`

	// The product family this virtual server instance profile belongs to.
	Family *string `json:"family,omitempty"`

	// The URL for this virtual server instance profile.
	Href *string `json:"href" validate:"required"`

	Memory InstanceProfileMemoryIntf `json:"memory" validate:"required"`

	// The globally unique name for this virtual server instance profile.
	Name *string `json:"name" validate:"required"`

	OsArchitecture *InstanceProfileOsArchitecture `json:"os_architecture" validate:"required"`

	PortSpeed InstanceProfilePortSpeedIntf `json:"port_speed" validate:"required"`

	VcpuArchitecture *InstanceProfileVcpuArchitecture `json:"vcpu_architecture" validate:"required"`

	VcpuCount InstanceProfileVcpuIntf `json:"vcpu_count" validate:"required"`
}

// UnmarshalInstanceProfile unmarshals an instance of InstanceProfile from the specified map of raw messages.
func UnmarshalInstanceProfile(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfile)
	err = core.UnmarshalModel(m, "bandwidth", &obj.Bandwidth, UnmarshalInstanceProfileBandwidth)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "disks", &obj.Disks, UnmarshalInstanceProfileDisk)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "family", &obj.Family)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "memory", &obj.Memory, UnmarshalInstanceProfileMemory)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "os_architecture", &obj.OsArchitecture, UnmarshalInstanceProfileOsArchitecture)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "port_speed", &obj.PortSpeed, UnmarshalInstanceProfilePortSpeed)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "vcpu_architecture", &obj.VcpuArchitecture, UnmarshalInstanceProfileVcpuArchitecture)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "vcpu_count", &obj.VcpuCount, UnmarshalInstanceProfileVcpu)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfileBandwidth : InstanceProfileBandwidth struct
// Models which "extend" this model:
// - InstanceProfileBandwidthFixed
// - InstanceProfileBandwidthRange
// - InstanceProfileBandwidthEnum
// - InstanceProfileBandwidthDependent
type InstanceProfileBandwidth struct {
	// The type for this profile field.
	Type *string `json:"type,omitempty"`

	// The value for this profile field.
	Value *int64 `json:"value,omitempty"`

	// The default value for this profile field.
	Default *int64 `json:"default,omitempty"`

	// The maximum value for this profile field.
	Max *int64 `json:"max,omitempty"`

	// The minimum value for this profile field.
	Min *int64 `json:"min,omitempty"`

	// The increment step value for this profile field.
	Step *int64 `json:"step,omitempty"`

	// The permitted values for this profile field.
	Values []int64 `json:"values,omitempty"`
}

// Constants associated with the InstanceProfileBandwidth.Type property.
// The type for this profile field.
const (
	InstanceProfileBandwidthTypeFixedConst = "fixed"
)

func (*InstanceProfileBandwidth) isaInstanceProfileBandwidth() bool {
	return true
}

type InstanceProfileBandwidthIntf interface {
	isaInstanceProfileBandwidth() bool
}

// UnmarshalInstanceProfileBandwidth unmarshals an instance of InstanceProfileBandwidth from the specified map of raw messages.
func UnmarshalInstanceProfileBandwidth(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfileBandwidth)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "value", &obj.Value)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "default", &obj.Default)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "max", &obj.Max)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "min", &obj.Min)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "step", &obj.Step)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "values", &obj.Values)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfileCollection : InstanceProfileCollection struct
type InstanceProfileCollection struct {
	// Collection of virtual server instance profiles.
	Profiles []InstanceProfile `json:"profiles" validate:"required"`
}

// UnmarshalInstanceProfileCollection unmarshals an instance of InstanceProfileCollection from the specified map of raw messages.
func UnmarshalInstanceProfileCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfileCollection)
	err = core.UnmarshalModel(m, "profiles", &obj.Profiles, UnmarshalInstanceProfile)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfileDisk : Disks provided by this profile.
type InstanceProfileDisk struct {
	Quantity InstanceProfileDiskQuantityIntf `json:"quantity" validate:"required"`

	Size InstanceProfileDiskSizeIntf `json:"size" validate:"required"`

	SupportedInterfaceTypes *InstanceProfileDiskSupportedInterfaces `json:"supported_interface_types" validate:"required"`
}

// UnmarshalInstanceProfileDisk unmarshals an instance of InstanceProfileDisk from the specified map of raw messages.
func UnmarshalInstanceProfileDisk(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfileDisk)
	err = core.UnmarshalModel(m, "quantity", &obj.Quantity, UnmarshalInstanceProfileDiskQuantity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "size", &obj.Size, UnmarshalInstanceProfileDiskSize)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "supported_interface_types", &obj.SupportedInterfaceTypes, UnmarshalInstanceProfileDiskSupportedInterfaces)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfileDiskQuantity : InstanceProfileDiskQuantity struct
// Models which "extend" this model:
// - InstanceProfileDiskQuantityFixed
// - InstanceProfileDiskQuantityRange
// - InstanceProfileDiskQuantityEnum
// - InstanceProfileDiskQuantityDependent
type InstanceProfileDiskQuantity struct {
	// The type for this profile field.
	Type *string `json:"type,omitempty"`

	// The value for this profile field.
	Value *int64 `json:"value,omitempty"`

	// The default value for this profile field.
	Default *int64 `json:"default,omitempty"`

	// The maximum value for this profile field.
	Max *int64 `json:"max,omitempty"`

	// The minimum value for this profile field.
	Min *int64 `json:"min,omitempty"`

	// The increment step value for this profile field.
	Step *int64 `json:"step,omitempty"`

	// The permitted values for this profile field.
	Values []int64 `json:"values,omitempty"`
}

// Constants associated with the InstanceProfileDiskQuantity.Type property.
// The type for this profile field.
const (
	InstanceProfileDiskQuantityTypeFixedConst = "fixed"
)

func (*InstanceProfileDiskQuantity) isaInstanceProfileDiskQuantity() bool {
	return true
}

type InstanceProfileDiskQuantityIntf interface {
	isaInstanceProfileDiskQuantity() bool
}

// UnmarshalInstanceProfileDiskQuantity unmarshals an instance of InstanceProfileDiskQuantity from the specified map of raw messages.
func UnmarshalInstanceProfileDiskQuantity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfileDiskQuantity)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "value", &obj.Value)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "default", &obj.Default)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "max", &obj.Max)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "min", &obj.Min)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "step", &obj.Step)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "values", &obj.Values)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfileDiskSize : InstanceProfileDiskSize struct
// Models which "extend" this model:
// - InstanceProfileDiskSizeFixed
// - InstanceProfileDiskSizeRange
// - InstanceProfileDiskSizeEnum
// - InstanceProfileDiskSizeDependent
type InstanceProfileDiskSize struct {
	// The type for this profile field.
	Type *string `json:"type,omitempty"`

	// The value for this profile field.
	Value *int64 `json:"value,omitempty"`

	// The default value for this profile field.
	Default *int64 `json:"default,omitempty"`

	// The maximum value for this profile field.
	Max *int64 `json:"max,omitempty"`

	// The minimum value for this profile field.
	Min *int64 `json:"min,omitempty"`

	// The increment step value for this profile field.
	Step *int64 `json:"step,omitempty"`

	// The permitted values for this profile field.
	Values []int64 `json:"values,omitempty"`
}

// Constants associated with the InstanceProfileDiskSize.Type property.
// The type for this profile field.
const (
	InstanceProfileDiskSizeTypeFixedConst = "fixed"
)

func (*InstanceProfileDiskSize) isaInstanceProfileDiskSize() bool {
	return true
}

type InstanceProfileDiskSizeIntf interface {
	isaInstanceProfileDiskSize() bool
}

// UnmarshalInstanceProfileDiskSize unmarshals an instance of InstanceProfileDiskSize from the specified map of raw messages.
func UnmarshalInstanceProfileDiskSize(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfileDiskSize)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "value", &obj.Value)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "default", &obj.Default)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "max", &obj.Max)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "min", &obj.Min)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "step", &obj.Step)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "values", &obj.Values)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfileDiskSupportedInterfaces : InstanceProfileDiskSupportedInterfaces struct
type InstanceProfileDiskSupportedInterfaces struct {
	// The disk interface used for attaching the disk.
	//
	// The enumerated values for this property are expected to expand in the future. When processing this property, check
	// for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the
	// unexpected property value was encountered.
	Default *string `json:"default" validate:"required"`

	// The type for this profile field.
	Type *string `json:"type" validate:"required"`

	// The supported disk interfaces used for attaching the disk.
	Values []string `json:"values" validate:"required"`
}

// Constants associated with the InstanceProfileDiskSupportedInterfaces.Default property.
// The disk interface used for attaching the disk.
//
// The enumerated values for this property are expected to expand in the future. When processing this property, check
// for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the
// unexpected property value was encountered.
const (
	InstanceProfileDiskSupportedInterfacesDefaultNvmeConst      = "nvme"
	InstanceProfileDiskSupportedInterfacesDefaultVirtioBlkConst = "virtio_blk"
)

// Constants associated with the InstanceProfileDiskSupportedInterfaces.Type property.
// The type for this profile field.
const (
	InstanceProfileDiskSupportedInterfacesTypeEnumConst = "enum"
)

// Constants associated with the InstanceProfileDiskSupportedInterfaces.Values property.
// The disk interface used for attaching the disk.
//
// The enumerated values for this property are expected to expand in the future. When processing this property, check
// for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the
// unexpected property value was encountered.
const (
	InstanceProfileDiskSupportedInterfacesValuesNvmeConst      = "nvme"
	InstanceProfileDiskSupportedInterfacesValuesVirtioBlkConst = "virtio_blk"
)

// UnmarshalInstanceProfileDiskSupportedInterfaces unmarshals an instance of InstanceProfileDiskSupportedInterfaces from the specified map of raw messages.
func UnmarshalInstanceProfileDiskSupportedInterfaces(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfileDiskSupportedInterfaces)
	err = core.UnmarshalPrimitive(m, "default", &obj.Default)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "values", &obj.Values)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfileIdentity : Identifies an instance profile by a unique property.
// Models which "extend" this model:
// - InstanceProfileIdentityByName
// - InstanceProfileIdentityByHref
type InstanceProfileIdentity struct {
	// The globally unique name for this virtual server instance profile.
	Name *string `json:"name,omitempty"`

	// The URL for this virtual server instance profile.
	Href *string `json:"href,omitempty"`
}

func (*InstanceProfileIdentity) isaInstanceProfileIdentity() bool {
	return true
}

type InstanceProfileIdentityIntf interface {
	isaInstanceProfileIdentity() bool
}

// UnmarshalInstanceProfileIdentity unmarshals an instance of InstanceProfileIdentity from the specified map of raw messages.
func UnmarshalInstanceProfileIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfileIdentity)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfileMemory : InstanceProfileMemory struct
// Models which "extend" this model:
// - InstanceProfileMemoryFixed
// - InstanceProfileMemoryRange
// - InstanceProfileMemoryEnum
// - InstanceProfileMemoryDependent
type InstanceProfileMemory struct {
	// The type for this profile field.
	Type *string `json:"type,omitempty"`

	// The value for this profile field.
	Value *int64 `json:"value,omitempty"`

	// The default value for this profile field.
	Default *int64 `json:"default,omitempty"`

	// The maximum value for this profile field.
	Max *int64 `json:"max,omitempty"`

	// The minimum value for this profile field.
	Min *int64 `json:"min,omitempty"`

	// The increment step value for this profile field.
	Step *int64 `json:"step,omitempty"`

	// The permitted values for this profile field.
	Values []int64 `json:"values,omitempty"`
}

// Constants associated with the InstanceProfileMemory.Type property.
// The type for this profile field.
const (
	InstanceProfileMemoryTypeFixedConst = "fixed"
)

func (*InstanceProfileMemory) isaInstanceProfileMemory() bool {
	return true
}

type InstanceProfileMemoryIntf interface {
	isaInstanceProfileMemory() bool
}

// UnmarshalInstanceProfileMemory unmarshals an instance of InstanceProfileMemory from the specified map of raw messages.
func UnmarshalInstanceProfileMemory(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfileMemory)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "value", &obj.Value)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "default", &obj.Default)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "max", &obj.Max)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "min", &obj.Min)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "step", &obj.Step)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "values", &obj.Values)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfileOsArchitecture : InstanceProfileOsArchitecture struct
type InstanceProfileOsArchitecture struct {
	// The default OS architecture for an instance with this profile.
	Default *string `json:"default" validate:"required"`

	// The type for this profile field.
	Type *string `json:"type" validate:"required"`

	// The supported OS architecture(s) for an instance with this profile.
	Values []string `json:"values" validate:"required"`
}

// Constants associated with the InstanceProfileOsArchitecture.Type property.
// The type for this profile field.
const (
	InstanceProfileOsArchitectureTypeEnumConst = "enum"
)

// UnmarshalInstanceProfileOsArchitecture unmarshals an instance of InstanceProfileOsArchitecture from the specified map of raw messages.
func UnmarshalInstanceProfileOsArchitecture(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfileOsArchitecture)
	err = core.UnmarshalPrimitive(m, "default", &obj.Default)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "values", &obj.Values)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfilePortSpeed : InstanceProfilePortSpeed struct
// Models which "extend" this model:
// - InstanceProfilePortSpeedFixed
// - InstanceProfilePortSpeedDependent
type InstanceProfilePortSpeed struct {
	// The type for this profile field.
	Type *string `json:"type,omitempty"`

	// The value for this profile field.
	Value *int64 `json:"value,omitempty"`
}

// Constants associated with the InstanceProfilePortSpeed.Type property.
// The type for this profile field.
const (
	InstanceProfilePortSpeedTypeFixedConst = "fixed"
)

func (*InstanceProfilePortSpeed) isaInstanceProfilePortSpeed() bool {
	return true
}

type InstanceProfilePortSpeedIntf interface {
	isaInstanceProfilePortSpeed() bool
}

// UnmarshalInstanceProfilePortSpeed unmarshals an instance of InstanceProfilePortSpeed from the specified map of raw messages.
func UnmarshalInstanceProfilePortSpeed(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfilePortSpeed)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "value", &obj.Value)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfileReference : InstanceProfileReference struct
type InstanceProfileReference struct {
	// The URL for this virtual server instance profile.
	Href *string `json:"href" validate:"required"`

	// The globally unique name for this virtual server instance profile.
	Name *string `json:"name" validate:"required"`
}

// UnmarshalInstanceProfileReference unmarshals an instance of InstanceProfileReference from the specified map of raw messages.
func UnmarshalInstanceProfileReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfileReference)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfileVcpu : InstanceProfileVcpu struct
// Models which "extend" this model:
// - InstanceProfileVcpuFixed
// - InstanceProfileVcpuRange
// - InstanceProfileVcpuEnum
// - InstanceProfileVcpuDependent
type InstanceProfileVcpu struct {
	// The type for this profile field.
	Type *string `json:"type,omitempty"`

	// The value for this profile field.
	Value *int64 `json:"value,omitempty"`

	// The default value for this profile field.
	Default *int64 `json:"default,omitempty"`

	// The maximum value for this profile field.
	Max *int64 `json:"max,omitempty"`

	// The minimum value for this profile field.
	Min *int64 `json:"min,omitempty"`

	// The increment step value for this profile field.
	Step *int64 `json:"step,omitempty"`

	// The permitted values for this profile field.
	Values []int64 `json:"values,omitempty"`
}

// Constants associated with the InstanceProfileVcpu.Type property.
// The type for this profile field.
const (
	InstanceProfileVcpuTypeFixedConst = "fixed"
)

func (*InstanceProfileVcpu) isaInstanceProfileVcpu() bool {
	return true
}

type InstanceProfileVcpuIntf interface {
	isaInstanceProfileVcpu() bool
}

// UnmarshalInstanceProfileVcpu unmarshals an instance of InstanceProfileVcpu from the specified map of raw messages.
func UnmarshalInstanceProfileVcpu(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfileVcpu)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "value", &obj.Value)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "default", &obj.Default)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "max", &obj.Max)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "min", &obj.Min)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "step", &obj.Step)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "values", &obj.Values)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfileVcpuArchitecture : InstanceProfileVcpuArchitecture struct
type InstanceProfileVcpuArchitecture struct {
	// The default VCPU architecture for an instance with this profile.
	Default *string `json:"default,omitempty"`

	// The type for this profile field.
	Type *string `json:"type" validate:"required"`

	// The VCPU architecture for an instance with this profile.
	Value *string `json:"value" validate:"required"`
}

// Constants associated with the InstanceProfileVcpuArchitecture.Type property.
// The type for this profile field.
const (
	InstanceProfileVcpuArchitectureTypeFixedConst = "fixed"
)

// UnmarshalInstanceProfileVcpuArchitecture unmarshals an instance of InstanceProfileVcpuArchitecture from the specified map of raw messages.
func UnmarshalInstanceProfileVcpuArchitecture(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfileVcpuArchitecture)
	err = core.UnmarshalPrimitive(m, "default", &obj.Default)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "value", &obj.Value)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstancePrototype : InstancePrototype struct
// Models which "extend" this model:
// - InstancePrototypeInstanceByImage
// - InstancePrototypeInstanceBySourceTemplate
type InstancePrototype struct {
	// The public SSH keys for the administrative user of the virtual server instance. Up to 10 keys may be provided; if no
	// keys are provided the instance will be inaccessible unless the image used provides another means of access. For
	// Windows instances, one of the keys will be used to encrypt the administrator password.
	//
	// Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled images,
	// these keys will also be added as SSH authorized keys for the administrative user.
	Keys []KeyIdentityIntf `json:"keys,omitempty"`

	// The unique user-defined name for this virtual server instance (and default system hostname). If unspecified, the
	// name will be a hyphenated list of randomly-selected words.
	Name *string `json:"name,omitempty"`

	// Collection of additional network interfaces to create for the virtual server instance.
	NetworkInterfaces []NetworkInterfacePrototype `json:"network_interfaces,omitempty"`

	// The placement restrictions to use for the virtual server instance.
	PlacementTarget InstancePlacementTargetPrototypeIntf `json:"placement_target,omitempty"`

	// The profile to use for this virtual server instance.
	Profile InstanceProfileIdentityIntf `json:"profile,omitempty"`

	// The resource group to use. If unspecified, the account's [default resource
	// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
	ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`

	// User data to be made available when setting up the virtual server instance.
	UserData *string `json:"user_data,omitempty"`

	// Collection of volume attachments.
	VolumeAttachments []VolumeAttachmentPrototypeInstanceContext `json:"volume_attachments,omitempty"`

	// The VPC the virtual server instance is to be a part of. If provided, must match the
	// VPC tied to the subnets of the instance's network interfaces.
	VPC VPCIdentityIntf `json:"vpc,omitempty"`

	// The boot volume attachment for the virtual server instance.
	BootVolumeAttachment *VolumeAttachmentPrototypeInstanceByImageContext `json:"boot_volume_attachment,omitempty"`

	// The identity of the image to use when provisioning the virtual server instance.
	Image ImageIdentityIntf `json:"image,omitempty"`

	// Primary network interface.
	PrimaryNetworkInterface *NetworkInterfacePrototype `json:"primary_network_interface,omitempty"`

	// The zone this virtual server instance will reside in.
	Zone ZoneIdentityIntf `json:"zone,omitempty"`

	// Identifies an instance template by a unique property.
	SourceTemplate InstanceTemplateIdentityIntf `json:"source_template,omitempty"`
}

func (*InstancePrototype) isaInstancePrototype() bool {
	return true
}

type InstancePrototypeIntf interface {
	isaInstancePrototype() bool
}

// UnmarshalInstancePrototype unmarshals an instance of InstancePrototype from the specified map of raw messages.
func UnmarshalInstancePrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstancePrototype)
	err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototypeInstanceContext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "source_template", &obj.SourceTemplate, UnmarshalInstanceTemplateIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceReference : InstanceReference struct
type InstanceReference struct {
	// The CRN for this virtual server instance.
	CRN *string `json:"crn" validate:"required"`

	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *InstanceReferenceDeleted `json:"deleted,omitempty"`

	// The URL for this virtual server instance.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this virtual server instance.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this virtual server instance (and default system hostname).
	Name *string `json:"name" validate:"required"`
}

// UnmarshalInstanceReference unmarshals an instance of InstanceReference from the specified map of raw messages.
func UnmarshalInstanceReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceReference)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalInstanceReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type InstanceReferenceDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalInstanceReferenceDeleted unmarshals an instance of InstanceReferenceDeleted from the specified map of raw messages.
func UnmarshalInstanceReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceReferenceDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceStatusReason : InstanceStatusReason struct
type InstanceStatusReason struct {
	// A snake case string succinctly identifying the status reason.
	Code *string `json:"code" validate:"required"`

	// An explanation of the status reason.
	Message *string `json:"message" validate:"required"`

	// Link to documentation about this status reason.
	MoreInfo *string `json:"more_info,omitempty"`
}

// Constants associated with the InstanceStatusReason.Code property.
// A snake case string succinctly identifying the status reason.
const (
	InstanceStatusReasonCodeCannotStartConst          = "cannot_start"
	InstanceStatusReasonCodeCannotStartCapacityConst  = "cannot_start_capacity"
	InstanceStatusReasonCodeCannotStartComputeConst   = "cannot_start_compute"
	InstanceStatusReasonCodeCannotStartIPAddressConst = "cannot_start_ip_address"
	InstanceStatusReasonCodeCannotStartNetworkConst   = "cannot_start_network"
	InstanceStatusReasonCodeCannotStartStorageConst   = "cannot_start_storage"
	InstanceStatusReasonCodeEncryptionKeyDeletedConst = "encryption_key_deleted"
)

// UnmarshalInstanceStatusReason unmarshals an instance of InstanceStatusReason from the specified map of raw messages.
func UnmarshalInstanceStatusReason(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceStatusReason)
	err = core.UnmarshalPrimitive(m, "code", &obj.Code)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "message", &obj.Message)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceTemplate : InstanceTemplate struct
// Models which "extend" this model:
// - InstanceTemplateInstanceByImage
// - InstanceTemplateInstanceBySourceTemplate
type InstanceTemplate struct {
	// The date and time that the instance template was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The CRN for this instance template.
	CRN *string `json:"crn" validate:"required"`

	// The URL for this instance template.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this instance template.
	ID *string `json:"id" validate:"required"`

	// The public SSH keys for the administrative user of the virtual server instance. Up to 10 keys may be provided; if no
	// keys are provided the instance will be inaccessible unless the image used provides another means of access. For
	// Windows instances, one of the keys will be used to encrypt the administrator password.
	//
	// Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled images,
	// these keys will also be added as SSH authorized keys for the administrative user.
	Keys []KeyIdentityIntf `json:"keys,omitempty"`

	// The unique user-defined name for this instance template.
	Name *string `json:"name" validate:"required"`

	// Collection of additional network interfaces to create for the virtual server instance.
	NetworkInterfaces []NetworkInterfacePrototype `json:"network_interfaces,omitempty"`

	// The placement restrictions to use for the virtual server instance.
	PlacementTarget InstancePlacementTargetPrototypeIntf `json:"placement_target,omitempty"`

	// The profile to use for this virtual server instance.
	Profile InstanceProfileIdentityIntf `json:"profile,omitempty"`

	// The resource group for this instance template.
	ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`

	// User data to be made available when setting up the virtual server instance.
	UserData *string `json:"user_data,omitempty"`

	// Collection of volume attachments.
	VolumeAttachments []VolumeAttachmentPrototypeInstanceContext `json:"volume_attachments,omitempty"`

	// The VPC the virtual server instance is to be a part of. If provided, must match the
	// VPC tied to the subnets of the instance's network interfaces.
	VPC VPCIdentityIntf `json:"vpc,omitempty"`

	// The boot volume attachment for the virtual server instance.
	BootVolumeAttachment *VolumeAttachmentPrototypeInstanceByImageContext `json:"boot_volume_attachment,omitempty"`

	// The identity of the image to use when provisioning the virtual server instance.
	Image ImageIdentityIntf `json:"image,omitempty"`

	// Primary network interface.
	PrimaryNetworkInterface *NetworkInterfacePrototype `json:"primary_network_interface,omitempty"`

	// The zone this virtual server instance will reside in.
	Zone ZoneIdentityIntf `json:"zone,omitempty"`

	// Identifies an instance template by a unique property.
	SourceTemplate InstanceTemplateIdentityIntf `json:"source_template,omitempty"`
}

func (*InstanceTemplate) isaInstanceTemplate() bool {
	return true
}

type InstanceTemplateIntf interface {
	isaInstanceTemplate() bool
}

// UnmarshalInstanceTemplate unmarshals an instance of InstanceTemplate from the specified map of raw messages.
func UnmarshalInstanceTemplate(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceTemplate)
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototypeInstanceContext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "source_template", &obj.SourceTemplate, UnmarshalInstanceTemplateIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceTemplateCollection : InstanceTemplateCollection struct
type InstanceTemplateCollection struct {
	// A link to the first page of resources.
	First *InstanceTemplateCollectionFirst `json:"first" validate:"required"`

	// The maximum number of resources that can be returned by the request.
	Limit *int64 `json:"limit" validate:"required"`

	// A link to the next page of resources. This property is present for all pages
	// except the last page.
	Next *InstanceTemplateCollectionNext `json:"next,omitempty"`

	// Collection of instance templates.
	Templates []InstanceTemplateIntf `json:"templates" validate:"required"`

	// The total number of resources across all pages.
	TotalCount *int64 `json:"total_count" validate:"required"`
}

// UnmarshalInstanceTemplateCollection unmarshals an instance of InstanceTemplateCollection from the specified map of raw messages.
func UnmarshalInstanceTemplateCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceTemplateCollection)
	err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalInstanceTemplateCollectionFirst)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalInstanceTemplateCollectionNext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "templates", &obj.Templates, UnmarshalInstanceTemplate)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceTemplateCollectionFirst : A link to the first page of resources.
type InstanceTemplateCollectionFirst struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalInstanceTemplateCollectionFirst unmarshals an instance of InstanceTemplateCollectionFirst from the specified map of raw messages.
func UnmarshalInstanceTemplateCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceTemplateCollectionFirst)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceTemplateCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
type InstanceTemplateCollectionNext struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalInstanceTemplateCollectionNext unmarshals an instance of InstanceTemplateCollectionNext from the specified map of raw messages.
func UnmarshalInstanceTemplateCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceTemplateCollectionNext)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceTemplateIdentity : Identifies an instance template by a unique property.
// Models which "extend" this model:
// - InstanceTemplateIdentityByID
// - InstanceTemplateIdentityByHref
// - InstanceTemplateIdentityByCRN
type InstanceTemplateIdentity struct {
	// The unique identifier for this instance template.
	ID *string `json:"id,omitempty"`

	// The URL for this instance template.
	Href *string `json:"href,omitempty"`

	// The CRN for this instance template.
	CRN *string `json:"crn,omitempty"`
}

func (*InstanceTemplateIdentity) isaInstanceTemplateIdentity() bool {
	return true
}

type InstanceTemplateIdentityIntf interface {
	isaInstanceTemplateIdentity() bool
}

// UnmarshalInstanceTemplateIdentity unmarshals an instance of InstanceTemplateIdentity from the specified map of raw messages.
func UnmarshalInstanceTemplateIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceTemplateIdentity)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceTemplatePatch : InstanceTemplatePatch struct
type InstanceTemplatePatch struct {
	// The unique user-defined name for this instance template.
	Name *string `json:"name,omitempty"`
}

// UnmarshalInstanceTemplatePatch unmarshals an instance of InstanceTemplatePatch from the specified map of raw messages.
func UnmarshalInstanceTemplatePatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceTemplatePatch)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the InstanceTemplatePatch
func (instanceTemplatePatch *InstanceTemplatePatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(instanceTemplatePatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// InstanceTemplatePrototype : InstanceTemplatePrototype struct
// Models which "extend" this model:
// - InstanceTemplatePrototypeInstanceByImage
// - InstanceTemplatePrototypeInstanceBySourceTemplate
type InstanceTemplatePrototype struct {
	// The public SSH keys for the administrative user of the virtual server instance. Up to 10 keys may be provided; if no
	// keys are provided the instance will be inaccessible unless the image used provides another means of access. For
	// Windows instances, one of the keys will be used to encrypt the administrator password.
	//
	// Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled images,
	// these keys will also be added as SSH authorized keys for the administrative user.
	Keys []KeyIdentityIntf `json:"keys,omitempty"`

	// The unique user-defined name for this virtual server instance (and default system hostname). If unspecified, the
	// name will be a hyphenated list of randomly-selected words.
	Name *string `json:"name,omitempty"`

	// Collection of additional network interfaces to create for the virtual server instance.
	NetworkInterfaces []NetworkInterfacePrototype `json:"network_interfaces,omitempty"`

	// The placement restrictions to use for the virtual server instance.
	PlacementTarget InstancePlacementTargetPrototypeIntf `json:"placement_target,omitempty"`

	// The profile to use for this virtual server instance.
	Profile InstanceProfileIdentityIntf `json:"profile,omitempty"`

	// The resource group to use. If unspecified, the account's [default resource
	// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
	ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`

	// User data to be made available when setting up the virtual server instance.
	UserData *string `json:"user_data,omitempty"`

	// Collection of volume attachments.
	VolumeAttachments []VolumeAttachmentPrototypeInstanceContext `json:"volume_attachments,omitempty"`

	// The VPC the virtual server instance is to be a part of. If provided, must match the
	// VPC tied to the subnets of the instance's network interfaces.
	VPC VPCIdentityIntf `json:"vpc,omitempty"`

	// The boot volume attachment for the virtual server instance.
	BootVolumeAttachment *VolumeAttachmentPrototypeInstanceByImageContext `json:"boot_volume_attachment,omitempty"`

	// The identity of the image to use when provisioning the virtual server instance.
	Image ImageIdentityIntf `json:"image,omitempty"`

	// Primary network interface.
	PrimaryNetworkInterface *NetworkInterfacePrototype `json:"primary_network_interface,omitempty"`

	// The zone this virtual server instance will reside in.
	Zone ZoneIdentityIntf `json:"zone,omitempty"`

	// Identifies an instance template by a unique property.
	SourceTemplate InstanceTemplateIdentityIntf `json:"source_template,omitempty"`
}

func (*InstanceTemplatePrototype) isaInstanceTemplatePrototype() bool {
	return true
}

type InstanceTemplatePrototypeIntf interface {
	isaInstanceTemplatePrototype() bool
}

// UnmarshalInstanceTemplatePrototype unmarshals an instance of InstanceTemplatePrototype from the specified map of raw messages.
func UnmarshalInstanceTemplatePrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceTemplatePrototype)
	err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototypeInstanceContext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "source_template", &obj.SourceTemplate, UnmarshalInstanceTemplateIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceTemplateReference : InstanceTemplateReference struct
type InstanceTemplateReference struct {
	// The CRN for this instance template.
	CRN *string `json:"crn" validate:"required"`

	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *InstanceTemplateReferenceDeleted `json:"deleted,omitempty"`

	// The URL for this instance template.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this instance template.
	ID *string `json:"id" validate:"required"`

	// The unique user-defined name for this instance template.
	Name *string `json:"name" validate:"required"`
}

// UnmarshalInstanceTemplateReference unmarshals an instance of InstanceTemplateReference from the specified map of raw messages.
func UnmarshalInstanceTemplateReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceTemplateReference)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalInstanceTemplateReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceTemplateReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type InstanceTemplateReferenceDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalInstanceTemplateReferenceDeleted unmarshals an instance of InstanceTemplateReferenceDeleted from the specified map of raw messages.
func UnmarshalInstanceTemplateReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceTemplateReferenceDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceVcpu : The virtual server instance VCPU configuration.
type InstanceVcpu struct {
	// The VCPU architecture.
	Architecture *string `json:"architecture" validate:"required"`

	// The number of VCPUs assigned.
	Count *int64 `json:"count" validate:"required"`
}

// UnmarshalInstanceVcpu unmarshals an instance of InstanceVcpu from the specified map of raw messages.
func UnmarshalInstanceVcpu(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceVcpu)
	err = core.UnmarshalPrimitive(m, "architecture", &obj.Architecture)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "count", &obj.Count)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// Key : Key struct
type Key struct {
	// The date and time that the key was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The CRN for this key.
	CRN *string `json:"crn" validate:"required"`

	// The fingerprint for this key.  The value is returned base64-encoded and prefixed with the hash algorithm (always
	// `SHA256`).
	Fingerprint *string `json:"fingerprint" validate:"required"`

	// The URL for this key.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this key.
	ID *string `json:"id" validate:"required"`

	// The length of this key (in bits).
	Length *int64 `json:"length" validate:"required"`

	// The unique user-defined name for this key. If unspecified, the name will be a hyphenated list of randomly-selected
	// words.
	Name *string `json:"name" validate:"required"`

	// The public SSH key.
	PublicKey *string `json:"public_key" validate:"required"`

	// The resource group for this key.
	ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`

	// The crypto-system used by this key.
	Type *string `json:"type" validate:"required"`
}

// Constants associated with the Key.Type property.
// The crypto-system used by this key.
const (
	KeyTypeRsaConst = "rsa"
)

// UnmarshalKey unmarshals an instance of Key from the specified map of raw messages.
func UnmarshalKey(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(Key)
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "fingerprint", &obj.Fingerprint)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "length", &obj.Length)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "public_key", &obj.PublicKey)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// KeyCollection : KeyCollection struct
type KeyCollection struct {
	// Collection of keys.
	Keys []Key `json:"keys" validate:"required"`
}

// UnmarshalKeyCollection unmarshals an instance of KeyCollection from the specified map of raw messages.
func UnmarshalKeyCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(KeyCollection)
	err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKey)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// KeyIdentity : Identifies a key by a unique property.
// Models which "extend" this model:
// - KeyIdentityByID
// - KeyIdentityByCRN
// - KeyIdentityByHref
// - KeyIdentityKeyIdentityByFingerprint
type KeyIdentity struct {
	// The unique identifier for this key.
	ID *string `json:"id,omitempty"`

	// The CRN for this key.
	CRN *string `json:"crn,omitempty"`

	// The URL for this key.
	Href *string `json:"href,omitempty"`

	// The fingerprint for this key.  The value is returned base64-encoded and prefixed with the hash algorithm (always
	// `SHA256`).
	Fingerprint *string `json:"fingerprint,omitempty"`
}

func (*KeyIdentity) isaKeyIdentity() bool {
	return true
}

type KeyIdentityIntf interface {
	isaKeyIdentity() bool
}

// UnmarshalKeyIdentity unmarshals an instance of KeyIdentity from the specified map of raw messages.
func UnmarshalKeyIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(KeyIdentity)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "fingerprint", &obj.Fingerprint)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// KeyPatch : KeyPatch struct
type KeyPatch struct {
	// The user-defined name for this key.
	Name *string `json:"name,omitempty"`
}

// UnmarshalKeyPatch unmarshals an instance of KeyPatch from the specified map of raw messages.
func UnmarshalKeyPatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(KeyPatch)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the KeyPatch
func (keyPatch *KeyPatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(keyPatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// KeyReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type KeyReferenceDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalKeyReferenceDeleted unmarshals an instance of KeyReferenceDeleted from the specified map of raw messages.
func UnmarshalKeyReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(KeyReferenceDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// KeyReferenceInstanceInitializationContext : KeyReferenceInstanceInitializationContext struct
// Models which "extend" this model:
// - KeyReferenceInstanceInitializationContextKeyReference
// - KeyReferenceInstanceInitializationContextKeyIdentityByFingerprint
type KeyReferenceInstanceInitializationContext struct {
	// The CRN for this key.
	CRN *string `json:"crn,omitempty"`

	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *KeyReferenceDeleted `json:"deleted,omitempty"`

	// The fingerprint for this key.  The value is returned base64-encoded and prefixed with the hash algorithm (always
	// `SHA256`).
	Fingerprint *string `json:"fingerprint,omitempty"`

	// The URL for this key.
	Href *string `json:"href,omitempty"`

	// The unique identifier for this key.
	ID *string `json:"id,omitempty"`

	// The user-defined name for this key.
	Name *string `json:"name,omitempty"`
}

func (*KeyReferenceInstanceInitializationContext) isaKeyReferenceInstanceInitializationContext() bool {
	return true
}

type KeyReferenceInstanceInitializationContextIntf interface {
	isaKeyReferenceInstanceInitializationContext() bool
}

// UnmarshalKeyReferenceInstanceInitializationContext unmarshals an instance of KeyReferenceInstanceInitializationContext from the specified map of raw messages.
func UnmarshalKeyReferenceInstanceInitializationContext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(KeyReferenceInstanceInitializationContext)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalKeyReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "fingerprint", &obj.Fingerprint)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ListDedicatedHostDisksOptions : The ListDedicatedHostDisks options.
type ListDedicatedHostDisksOptions struct {
	// The dedicated host identifier.
	DedicatedHostID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListDedicatedHostDisksOptions : Instantiate ListDedicatedHostDisksOptions
func (*VpcV1) NewListDedicatedHostDisksOptions(dedicatedHostID string) *ListDedicatedHostDisksOptions {
	return &ListDedicatedHostDisksOptions{
		DedicatedHostID: core.StringPtr(dedicatedHostID),
	}
}

// SetDedicatedHostID : Allow user to set DedicatedHostID
func (options *ListDedicatedHostDisksOptions) SetDedicatedHostID(dedicatedHostID string) *ListDedicatedHostDisksOptions {
	options.DedicatedHostID = core.StringPtr(dedicatedHostID)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListDedicatedHostDisksOptions) SetHeaders(param map[string]string) *ListDedicatedHostDisksOptions {
	options.Headers = param
	return options
}

// ListDedicatedHostGroupsOptions : The ListDedicatedHostGroups options.
type ListDedicatedHostGroupsOptions struct {
	// A server-supplied token determining what resource to start the page on.
	Start *string

	// The number of resources to return on a page.
	Limit *int64

	// Filters the collection to resources within one of the resource groups identified in a comma-separated list of
	// resource group identifiers.
	ResourceGroupID *string

	// Filters the collection to resources in the zone with the exact specified name.
	ZoneName *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListDedicatedHostGroupsOptions : Instantiate ListDedicatedHostGroupsOptions
func (*VpcV1) NewListDedicatedHostGroupsOptions() *ListDedicatedHostGroupsOptions {
	return &ListDedicatedHostGroupsOptions{}
}

// SetStart : Allow user to set Start
func (options *ListDedicatedHostGroupsOptions) SetStart(start string) *ListDedicatedHostGroupsOptions {
	options.Start = core.StringPtr(start)
	return options
}

// SetLimit : Allow user to set Limit
func (options *ListDedicatedHostGroupsOptions) SetLimit(limit int64) *ListDedicatedHostGroupsOptions {
	options.Limit = core.Int64Ptr(limit)
	return options
}

// SetResourceGroupID : Allow user to set ResourceGroupID
func (options *ListDedicatedHostGroupsOptions) SetResourceGroupID(resourceGroupID string) *ListDedicatedHostGroupsOptions {
	options.ResourceGroupID = core.StringPtr(resourceGroupID)
	return options
}

// SetZoneName : Allow user to set ZoneName
func (options *ListDedicatedHostGroupsOptions) SetZoneName(zoneName string) *ListDedicatedHostGroupsOptions {
	options.ZoneName = core.StringPtr(zoneName)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListDedicatedHostGroupsOptions) SetHeaders(param map[string]string) *ListDedicatedHostGroupsOptions {
	options.Headers = param
	return options
}

// ListDedicatedHostProfilesOptions : The ListDedicatedHostProfiles options.
type ListDedicatedHostProfilesOptions struct {
	// A server-supplied token determining what resource to start the page on.
	Start *string

	// The number of resources to return on a page.
	Limit *int64

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListDedicatedHostProfilesOptions : Instantiate ListDedicatedHostProfilesOptions
func (*VpcV1) NewListDedicatedHostProfilesOptions() *ListDedicatedHostProfilesOptions {
	return &ListDedicatedHostProfilesOptions{}
}

// SetStart : Allow user to set Start
func (options *ListDedicatedHostProfilesOptions) SetStart(start string) *ListDedicatedHostProfilesOptions {
	options.Start = core.StringPtr(start)
	return options
}

// SetLimit : Allow user to set Limit
func (options *ListDedicatedHostProfilesOptions) SetLimit(limit int64) *ListDedicatedHostProfilesOptions {
	options.Limit = core.Int64Ptr(limit)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListDedicatedHostProfilesOptions) SetHeaders(param map[string]string) *ListDedicatedHostProfilesOptions {
	options.Headers = param
	return options
}

// ListDedicatedHostsOptions : The ListDedicatedHosts options.
type ListDedicatedHostsOptions struct {
	// Filters the collection to dedicated host groups with the specified identifier.
	DedicatedHostGroupID *string

	// A server-supplied token determining what resource to start the page on.
	Start *string

	// The number of resources to return on a page.
	Limit *int64

	// Filters the collection to resources within one of the resource groups identified in a comma-separated list of
	// resource group identifiers.
	ResourceGroupID *string

	// Filters the collection to resources in the zone with the exact specified name.
	ZoneName *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListDedicatedHostsOptions : Instantiate ListDedicatedHostsOptions
func (*VpcV1) NewListDedicatedHostsOptions() *ListDedicatedHostsOptions {
	return &ListDedicatedHostsOptions{}
}

// SetDedicatedHostGroupID : Allow user to set DedicatedHostGroupID
func (options *ListDedicatedHostsOptions) SetDedicatedHostGroupID(dedicatedHostGroupID string) *ListDedicatedHostsOptions {
	options.DedicatedHostGroupID = core.StringPtr(dedicatedHostGroupID)
	return options
}

// SetStart : Allow user to set Start
func (options *ListDedicatedHostsOptions) SetStart(start string) *ListDedicatedHostsOptions {
	options.Start = core.StringPtr(start)
	return options
}

// SetLimit : Allow user to set Limit
func (options *ListDedicatedHostsOptions) SetLimit(limit int64) *ListDedicatedHostsOptions {
	options.Limit = core.Int64Ptr(limit)
	return options
}

// SetResourceGroupID : Allow user to set ResourceGroupID
func (options *ListDedicatedHostsOptions) SetResourceGroupID(resourceGroupID string) *ListDedicatedHostsOptions {
	options.ResourceGroupID = core.StringPtr(resourceGroupID)
	return options
}

// SetZoneName : Allow user to set ZoneName
func (options *ListDedicatedHostsOptions) SetZoneName(zoneName string) *ListDedicatedHostsOptions {
	options.ZoneName = core.StringPtr(zoneName)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListDedicatedHostsOptions) SetHeaders(param map[string]string) *ListDedicatedHostsOptions {
	options.Headers = param
	return options
}

// ListEndpointGatewayIpsOptions : The ListEndpointGatewayIps options.
type ListEndpointGatewayIpsOptions struct {
	// The endpoint gateway identifier.
	EndpointGatewayID *string `validate:"required,ne="`

	// A server-supplied token determining what resource to start the page on.
	Start *string

	// The number of resources to return on a page.
	Limit *int64

	// Sorts the returned collection by the specified field name in ascending order. A `-` may be prepended to the field
	// name to sort in descending order. For example, the value
	// `-created_at` sorts the collection by the `created_at` field in descending order, and the value `name` sorts it by
	// the `name` field in ascending order.
	Sort *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

// Constants associated with the ListEndpointGatewayIpsOptions.Sort property.
// Sorts the returned collection by the specified field name in ascending order. A `-` may be prepended to the field
// name to sort in descending order. For example, the value
// `-created_at` sorts the collection by the `created_at` field in descending order, and the value `name` sorts it by
// the `name` field in ascending order.
const (
	ListEndpointGatewayIpsOptionsSortAddressConst   = "address"
	ListEndpointGatewayIpsOptionsSortCreatedAtConst = "created_at"
	ListEndpointGatewayIpsOptionsSortNameConst      = "name"
)

// NewListEndpointGatewayIpsOptions : Instantiate ListEndpointGatewayIpsOptions
func (*VpcV1) NewListEndpointGatewayIpsOptions(endpointGatewayID string) *ListEndpointGatewayIpsOptions {
	return &ListEndpointGatewayIpsOptions{
		EndpointGatewayID: core.StringPtr(endpointGatewayID),
	}
}

// SetEndpointGatewayID : Allow user to set EndpointGatewayID
func (options *ListEndpointGatewayIpsOptions) SetEndpointGatewayID(endpointGatewayID string) *ListEndpointGatewayIpsOptions {
	options.EndpointGatewayID = core.StringPtr(endpointGatewayID)
	return options
}

// SetStart : Allow user to set Start
func (options *ListEndpointGatewayIpsOptions) SetStart(start string) *ListEndpointGatewayIpsOptions {
	options.Start = core.StringPtr(start)
	return options
}

// SetLimit : Allow user to set Limit
func (options *ListEndpointGatewayIpsOptions) SetLimit(limit int64) *ListEndpointGatewayIpsOptions {
	options.Limit = core.Int64Ptr(limit)
	return options
}

// SetSort : Allow user to set Sort
func (options *ListEndpointGatewayIpsOptions) SetSort(sort string) *ListEndpointGatewayIpsOptions {
	options.Sort = core.StringPtr(sort)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListEndpointGatewayIpsOptions) SetHeaders(param map[string]string) *ListEndpointGatewayIpsOptions {
	options.Headers = param
	return options
}

// ListEndpointGatewaysOptions : The ListEndpointGateways options.
type ListEndpointGatewaysOptions struct {
	// Filters the collection to resources with the exact specified name.
	Name *string

	// A server-supplied token determining what resource to start the page on.
	Start *string

	// The number of resources to return on a page.
	Limit *int64

	// Filters the collection to resources within one of the resource groups identified in a comma-separated list of
	// resource group identifiers.
	ResourceGroupID *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListEndpointGatewaysOptions : Instantiate ListEndpointGatewaysOptions
func (*VpcV1) NewListEndpointGatewaysOptions() *ListEndpointGatewaysOptions {
	return &ListEndpointGatewaysOptions{}
}

// SetName : Allow user to set Name
func (options *ListEndpointGatewaysOptions) SetName(name string) *ListEndpointGatewaysOptions {
	options.Name = core.StringPtr(name)
	return options
}

// SetStart : Allow user to set Start
func (options *ListEndpointGatewaysOptions) SetStart(start string) *ListEndpointGatewaysOptions {
	options.Start = core.StringPtr(start)
	return options
}

// SetLimit : Allow user to set Limit
func (options *ListEndpointGatewaysOptions) SetLimit(limit int64) *ListEndpointGatewaysOptions {
	options.Limit = core.Int64Ptr(limit)
	return options
}

// SetResourceGroupID : Allow user to set ResourceGroupID
func (options *ListEndpointGatewaysOptions) SetResourceGroupID(resourceGroupID string) *ListEndpointGatewaysOptions {
	options.ResourceGroupID = core.StringPtr(resourceGroupID)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListEndpointGatewaysOptions) SetHeaders(param map[string]string) *ListEndpointGatewaysOptions {
	options.Headers = param
	return options
}

// ListFloatingIpsOptions : The ListFloatingIps options.
type ListFloatingIpsOptions struct {
	// A server-supplied token determining what resource to start the page on.
	Start *string

	// The number of resources to return on a page.
	Limit *int64

	// Filters the collection to resources within one of the resource groups identified in a comma-separated list of
	// resource group identifiers.
	ResourceGroupID *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListFloatingIpsOptions : Instantiate ListFloatingIpsOptions
func (*VpcV1) NewListFloatingIpsOptions() *ListFloatingIpsOptions {
	return &ListFloatingIpsOptions{}
}

// SetStart : Allow user to set Start
func (options *ListFloatingIpsOptions) SetStart(start string) *ListFloatingIpsOptions {
	options.Start = core.StringPtr(start)
	return options
}

// SetLimit : Allow user to set Limit
func (options *ListFloatingIpsOptions) SetLimit(limit int64) *ListFloatingIpsOptions {
	options.Limit = core.Int64Ptr(limit)
	return options
}

// SetResourceGroupID : Allow user to set ResourceGroupID
func (options *ListFloatingIpsOptions) SetResourceGroupID(resourceGroupID string) *ListFloatingIpsOptions {
	options.ResourceGroupID = core.StringPtr(resourceGroupID)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListFloatingIpsOptions) SetHeaders(param map[string]string) *ListFloatingIpsOptions {
	options.Headers = param
	return options
}

// ListFlowLogCollectorsOptions : The ListFlowLogCollectors options.
type ListFlowLogCollectorsOptions struct {
	// A server-supplied token determining what resource to start the page on.
	Start *string

	// The number of resources to return on a page.
	Limit *int64

	// Filters the collection to resources within one of the resource groups identified in a comma-separated list of
	// resource group identifiers.
	ResourceGroupID *string

	// Filters the collection to resources with the exact specified name.
	Name *string

	// Filters the collection to resources in the VPC with the specified identifier.
	VPCID *string

	// Filters the collection to resources in the VPC with the specified CRN.
	VPCCRN *string

	// Filters the collection to resources in the VPC with the exact specified name.
	VPCName *string

	// Filters the collection to flow log collectors that target the specified resource.
	TargetID *string

	// Filters the collection to flow log collectors that target the specified resource type.
	TargetResourceType *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

// Constants associated with the ListFlowLogCollectorsOptions.TargetResourceType property.
// Filters the collection to flow log collectors that target the specified resource type.
const (
	ListFlowLogCollectorsOptionsTargetResourceTypeInstanceConst         = "instance"
	ListFlowLogCollectorsOptionsTargetResourceTypeNetworkInterfaceConst = "network_interface"
	ListFlowLogCollectorsOptionsTargetResourceTypeSubnetConst           = "subnet"
	ListFlowLogCollectorsOptionsTargetResourceTypeVPCConst              = "vpc"
)

// NewListFlowLogCollectorsOptions : Instantiate ListFlowLogCollectorsOptions
func (*VpcV1) NewListFlowLogCollectorsOptions() *ListFlowLogCollectorsOptions {
	return &ListFlowLogCollectorsOptions{}
}

// SetStart : Allow user to set Start
func (options *ListFlowLogCollectorsOptions) SetStart(start string) *ListFlowLogCollectorsOptions {
	options.Start = core.StringPtr(start)
	return options
}

// SetLimit : Allow user to set Limit
func (options *ListFlowLogCollectorsOptions) SetLimit(limit int64) *ListFlowLogCollectorsOptions {
	options.Limit = core.Int64Ptr(limit)
	return options
}

// SetResourceGroupID : Allow user to set ResourceGroupID
func (options *ListFlowLogCollectorsOptions) SetResourceGroupID(resourceGroupID string) *ListFlowLogCollectorsOptions {
	options.ResourceGroupID = core.StringPtr(resourceGroupID)
	return options
}

// SetName : Allow user to set Name
func (options *ListFlowLogCollectorsOptions) SetName(name string) *ListFlowLogCollectorsOptions {
	options.Name = core.StringPtr(name)
	return options
}

// SetVPCID : Allow user to set VPCID
func (options *ListFlowLogCollectorsOptions) SetVPCID(vpcID string) *ListFlowLogCollectorsOptions {
	options.VPCID = core.StringPtr(vpcID)
	return options
}

// SetVPCCRN : Allow user to set VPCCRN
func (options *ListFlowLogCollectorsOptions) SetVPCCRN(vpcCRN string) *ListFlowLogCollectorsOptions {
	options.VPCCRN = core.StringPtr(vpcCRN)
	return options
}

// SetVPCName : Allow user to set VPCName
func (options *ListFlowLogCollectorsOptions) SetVPCName(vpcName string) *ListFlowLogCollectorsOptions {
	options.VPCName = core.StringPtr(vpcName)
	return options
}

// SetTargetID : Allow user to set TargetID
func (options *ListFlowLogCollectorsOptions) SetTargetID(targetID string) *ListFlowLogCollectorsOptions {
	options.TargetID = core.StringPtr(targetID)
	return options
}

// SetTargetResourceType : Allow user to set TargetResourceType
func (options *ListFlowLogCollectorsOptions) SetTargetResourceType(targetResourceType string) *ListFlowLogCollectorsOptions {
	options.TargetResourceType = core.StringPtr(targetResourceType)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListFlowLogCollectorsOptions) SetHeaders(param map[string]string) *ListFlowLogCollectorsOptions {
	options.Headers = param
	return options
}

// ListIkePoliciesOptions : The ListIkePolicies options.
type ListIkePoliciesOptions struct {
	// A server-supplied token determining what resource to start the page on.
	Start *string

	// The number of resources to return on a page.
	Limit *int64

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListIkePoliciesOptions : Instantiate ListIkePoliciesOptions
func (*VpcV1) NewListIkePoliciesOptions() *ListIkePoliciesOptions {
	return &ListIkePoliciesOptions{}
}

// SetStart : Allow user to set Start
func (options *ListIkePoliciesOptions) SetStart(start string) *ListIkePoliciesOptions {
	options.Start = core.StringPtr(start)
	return options
}

// SetLimit : Allow user to set Limit
func (options *ListIkePoliciesOptions) SetLimit(limit int64) *ListIkePoliciesOptions {
	options.Limit = core.Int64Ptr(limit)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListIkePoliciesOptions) SetHeaders(param map[string]string) *ListIkePoliciesOptions {
	options.Headers = param
	return options
}

// ListIkePolicyConnectionsOptions : The ListIkePolicyConnections options.
type ListIkePolicyConnectionsOptions struct {
	// The IKE policy identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListIkePolicyConnectionsOptions : Instantiate ListIkePolicyConnectionsOptions
func (*VpcV1) NewListIkePolicyConnectionsOptions(id string) *ListIkePolicyConnectionsOptions {
	return &ListIkePolicyConnectionsOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *ListIkePolicyConnectionsOptions) SetID(id string) *ListIkePolicyConnectionsOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListIkePolicyConnectionsOptions) SetHeaders(param map[string]string) *ListIkePolicyConnectionsOptions {
	options.Headers = param
	return options
}

// ListImagesOptions : The ListImages options.
type ListImagesOptions struct {
	// A server-supplied token determining what resource to start the page on.
	Start *string

	// The number of resources to return on a page.
	Limit *int64

	// Filters the collection to resources within one of the resource groups identified in a comma-separated list of
	// resource group identifiers.
	ResourceGroupID *string

	// Filters the collection to resources with the exact specified name.
	Name *string

	// Filters the collection to images with the specified `visibility`.
	Visibility *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

// Constants associated with the ListImagesOptions.Visibility property.
// Filters the collection to images with the specified `visibility`.
const (
	ListImagesOptionsVisibilityPrivateConst = "private"
	ListImagesOptionsVisibilityPublicConst  = "public"
)

// NewListImagesOptions : Instantiate ListImagesOptions
func (*VpcV1) NewListImagesOptions() *ListImagesOptions {
	return &ListImagesOptions{}
}

// SetStart : Allow user to set Start
func (options *ListImagesOptions) SetStart(start string) *ListImagesOptions {
	options.Start = core.StringPtr(start)
	return options
}

// SetLimit : Allow user to set Limit
func (options *ListImagesOptions) SetLimit(limit int64) *ListImagesOptions {
	options.Limit = core.Int64Ptr(limit)
	return options
}

// SetResourceGroupID : Allow user to set ResourceGroupID
func (options *ListImagesOptions) SetResourceGroupID(resourceGroupID string) *ListImagesOptions {
	options.ResourceGroupID = core.StringPtr(resourceGroupID)
	return options
}

// SetName : Allow user to set Name
func (options *ListImagesOptions) SetName(name string) *ListImagesOptions {
	options.Name = core.StringPtr(name)
	return options
}

// SetVisibility : Allow user to set Visibility
func (options *ListImagesOptions) SetVisibility(visibility string) *ListImagesOptions {
	options.Visibility = core.StringPtr(visibility)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListImagesOptions) SetHeaders(param map[string]string) *ListImagesOptions {
	options.Headers = param
	return options
}

// ListInstanceDisksOptions : The ListInstanceDisks options.
type ListInstanceDisksOptions struct {
	// The instance identifier.
	InstanceID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListInstanceDisksOptions : Instantiate ListInstanceDisksOptions
func (*VpcV1) NewListInstanceDisksOptions(instanceID string) *ListInstanceDisksOptions {
	return &ListInstanceDisksOptions{
		InstanceID: core.StringPtr(instanceID),
	}
}

// SetInstanceID : Allow user to set InstanceID
func (options *ListInstanceDisksOptions) SetInstanceID(instanceID string) *ListInstanceDisksOptions {
	options.InstanceID = core.StringPtr(instanceID)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListInstanceDisksOptions) SetHeaders(param map[string]string) *ListInstanceDisksOptions {
	options.Headers = param
	return options
}

// ListInstanceGroupManagerActionsOptions : The ListInstanceGroupManagerActions options.
type ListInstanceGroupManagerActionsOptions struct {
	// The instance group identifier.
	InstanceGroupID *string `validate:"required,ne="`

	// The instance group manager identifier.
	InstanceGroupManagerID *string `validate:"required,ne="`

	// A server-supplied token determining what resource to start the page on.
	Start *string

	// The number of resources to return on a page.
	Limit *int64

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListInstanceGroupManagerActionsOptions : Instantiate ListInstanceGroupManagerActionsOptions
func (*VpcV1) NewListInstanceGroupManagerActionsOptions(instanceGroupID string, instanceGroupManagerID string) *ListInstanceGroupManagerActionsOptions {
	return &ListInstanceGroupManagerActionsOptions{
		InstanceGroupID:        core.StringPtr(instanceGroupID),
		InstanceGroupManagerID: core.StringPtr(instanceGroupManagerID),
	}
}

// SetInstanceGroupID : Allow user to set InstanceGroupID
func (options *ListInstanceGroupManagerActionsOptions) SetInstanceGroupID(instanceGroupID string) *ListInstanceGroupManagerActionsOptions {
	options.InstanceGroupID = core.StringPtr(instanceGroupID)
	return options
}

// SetInstanceGroupManagerID : Allow user to set InstanceGroupManagerID
func (options *ListInstanceGroupManagerActionsOptions) SetInstanceGroupManagerID(instanceGroupManagerID string) *ListInstanceGroupManagerActionsOptions {
	options.InstanceGroupManagerID = core.StringPtr(instanceGroupManagerID)
	return options
}

// SetStart : Allow user to set Start
func (options *ListInstanceGroupManagerActionsOptions) SetStart(start string) *ListInstanceGroupManagerActionsOptions {
	options.Start = core.StringPtr(start)
	return options
}

// SetLimit : Allow user to set Limit
func (options *ListInstanceGroupManagerActionsOptions) SetLimit(limit int64) *ListInstanceGroupManagerActionsOptions {
	options.Limit = core.Int64Ptr(limit)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListInstanceGroupManagerActionsOptions) SetHeaders(param map[string]string) *ListInstanceGroupManagerActionsOptions {
	options.Headers = param
	return options
}

// ListInstanceGroupManagerPoliciesOptions : The ListInstanceGroupManagerPolicies options.
type ListInstanceGroupManagerPoliciesOptions struct {
	// The instance group identifier.
	InstanceGroupID *string `validate:"required,ne="`

	// The instance group manager identifier.
	InstanceGroupManagerID *string `validate:"required,ne="`

	// A server-supplied token determining what resource to start the page on.
	Start *string

	// The number of resources to return on a page.
	Limit *int64

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListInstanceGroupManagerPoliciesOptions : Instantiate ListInstanceGroupManagerPoliciesOptions
func (*VpcV1) NewListInstanceGroupManagerPoliciesOptions(instanceGroupID string, instanceGroupManagerID string) *ListInstanceGroupManagerPoliciesOptions {
	return &ListInstanceGroupManagerPoliciesOptions{
		InstanceGroupID:        core.StringPtr(instanceGroupID),
		InstanceGroupManagerID: core.StringPtr(instanceGroupManagerID),
	}
}

// SetInstanceGroupID : Allow user to set InstanceGroupID
func (options *ListInstanceGroupManagerPoliciesOptions) SetInstanceGroupID(instanceGroupID string) *ListInstanceGroupManagerPoliciesOptions {
	options.InstanceGroupID = core.StringPtr(instanceGroupID)
	return options
}

// SetInstanceGroupManagerID : Allow user to set InstanceGroupManagerID
func (options *ListInstanceGroupManagerPoliciesOptions) SetInstanceGroupManagerID(instanceGroupManagerID string) *ListInstanceGroupManagerPoliciesOptions {
	options.InstanceGroupManagerID = core.StringPtr(instanceGroupManagerID)
	return options
}

// SetStart : Allow user to set Start
func (options *ListInstanceGroupManagerPoliciesOptions) SetStart(start string) *ListInstanceGroupManagerPoliciesOptions {
	options.Start = core.StringPtr(start)
	return options
}

// SetLimit : Allow user to set Limit
func (options *ListInstanceGroupManagerPoliciesOptions) SetLimit(limit int64) *ListInstanceGroupManagerPoliciesOptions {
	options.Limit = core.Int64Ptr(limit)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListInstanceGroupManagerPoliciesOptions) SetHeaders(param map[string]string) *ListInstanceGroupManagerPoliciesOptions {
	options.Headers = param
	return options
}

// ListInstanceGroupManagersOptions : The ListInstanceGroupManagers options.
type ListInstanceGroupManagersOptions struct {
	// The instance group identifier.
	InstanceGroupID *string `validate:"required,ne="`

	// A server-supplied token determining what resource to start the page on.
	Start *string

	// The number of resources to return on a page.
	Limit *int64

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListInstanceGroupManagersOptions : Instantiate ListInstanceGroupManagersOptions
func (*VpcV1) NewListInstanceGroupManagersOptions(instanceGroupID string) *ListInstanceGroupManagersOptions {
	return &ListInstanceGroupManagersOptions{
		InstanceGroupID: core.StringPtr(instanceGroupID),
	}
}

// SetInstanceGroupID : Allow user to set InstanceGroupID
func (options *ListInstanceGroupManagersOptions) SetInstanceGroupID(instanceGroupID string) *ListInstanceGroupManagersOptions {
	options.InstanceGroupID = core.StringPtr(instanceGroupID)
	return options
}

// SetStart : Allow user to set Start
func (options *ListInstanceGroupManagersOptions) SetStart(start string) *ListInstanceGroupManagersOptions {
	options.Start = core.StringPtr(start)
	return options
}

// SetLimit : Allow user to set Limit
func (options *ListInstanceGroupManagersOptions) SetLimit(limit int64) *ListInstanceGroupManagersOptions {
	options.Limit = core.Int64Ptr(limit)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListInstanceGroupManagersOptions) SetHeaders(param map[string]string) *ListInstanceGroupManagersOptions {
	options.Headers = param
	return options
}

// ListInstanceGroupMembershipsOptions : The ListInstanceGroupMemberships options.
type ListInstanceGroupMembershipsOptions struct {
	// The instance group identifier.
	InstanceGroupID *string `validate:"required,ne="`

	// A server-supplied token determining what resource to start the page on.
	Start *string

	// The number of resources to return on a page.
	Limit *int64

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListInstanceGroupMembershipsOptions : Instantiate ListInstanceGroupMembershipsOptions
func (*VpcV1) NewListInstanceGroupMembershipsOptions(instanceGroupID string) *ListInstanceGroupMembershipsOptions {
	return &ListInstanceGroupMembershipsOptions{
		InstanceGroupID: core.StringPtr(instanceGroupID),
	}
}

// SetInstanceGroupID : Allow user to set InstanceGroupID
func (options *ListInstanceGroupMembershipsOptions) SetInstanceGroupID(instanceGroupID string) *ListInstanceGroupMembershipsOptions {
	options.InstanceGroupID = core.StringPtr(instanceGroupID)
	return options
}

// SetStart : Allow user to set Start
func (options *ListInstanceGroupMembershipsOptions) SetStart(start string) *ListInstanceGroupMembershipsOptions {
	options.Start = core.StringPtr(start)
	return options
}

// SetLimit : Allow user to set Limit
func (options *ListInstanceGroupMembershipsOptions) SetLimit(limit int64) *ListInstanceGroupMembershipsOptions {
	options.Limit = core.Int64Ptr(limit)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListInstanceGroupMembershipsOptions) SetHeaders(param map[string]string) *ListInstanceGroupMembershipsOptions {
	options.Headers = param
	return options
}

// ListInstanceGroupsOptions : The ListInstanceGroups options.
type ListInstanceGroupsOptions struct {
	// A server-supplied token determining what resource to start the page on.
	Start *string

	// The number of resources to return on a page.
	Limit *int64

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListInstanceGroupsOptions : Instantiate ListInstanceGroupsOptions
func (*VpcV1) NewListInstanceGroupsOptions() *ListInstanceGroupsOptions {
	return &ListInstanceGroupsOptions{}
}

// SetStart : Allow user to set Start
func (options *ListInstanceGroupsOptions) SetStart(start string) *ListInstanceGroupsOptions {
	options.Start = core.StringPtr(start)
	return options
}

// SetLimit : Allow user to set Limit
func (options *ListInstanceGroupsOptions) SetLimit(limit int64) *ListInstanceGroupsOptions {
	options.Limit = core.Int64Ptr(limit)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListInstanceGroupsOptions) SetHeaders(param map[string]string) *ListInstanceGroupsOptions {
	options.Headers = param
	return options
}

// ListInstanceNetworkInterfaceFloatingIpsOptions : The ListInstanceNetworkInterfaceFloatingIps options.
type ListInstanceNetworkInterfaceFloatingIpsOptions struct {
	// The instance identifier.
	InstanceID *string `validate:"required,ne="`

	// The network interface identifier.
	NetworkInterfaceID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListInstanceNetworkInterfaceFloatingIpsOptions : Instantiate ListInstanceNetworkInterfaceFloatingIpsOptions
func (*VpcV1) NewListInstanceNetworkInterfaceFloatingIpsOptions(instanceID string, networkInterfaceID string) *ListInstanceNetworkInterfaceFloatingIpsOptions {
	return &ListInstanceNetworkInterfaceFloatingIpsOptions{
		InstanceID:         core.StringPtr(instanceID),
		NetworkInterfaceID: core.StringPtr(networkInterfaceID),
	}
}

// SetInstanceID : Allow user to set InstanceID
func (options *ListInstanceNetworkInterfaceFloatingIpsOptions) SetInstanceID(instanceID string) *ListInstanceNetworkInterfaceFloatingIpsOptions {
	options.InstanceID = core.StringPtr(instanceID)
	return options
}

// SetNetworkInterfaceID : Allow user to set NetworkInterfaceID
func (options *ListInstanceNetworkInterfaceFloatingIpsOptions) SetNetworkInterfaceID(networkInterfaceID string) *ListInstanceNetworkInterfaceFloatingIpsOptions {
	options.NetworkInterfaceID = core.StringPtr(networkInterfaceID)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListInstanceNetworkInterfaceFloatingIpsOptions) SetHeaders(param map[string]string) *ListInstanceNetworkInterfaceFloatingIpsOptions {
	options.Headers = param
	return options
}

// ListInstanceNetworkInterfacesOptions : The ListInstanceNetworkInterfaces options.
type ListInstanceNetworkInterfacesOptions struct {
	// The instance identifier.
	InstanceID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListInstanceNetworkInterfacesOptions : Instantiate ListInstanceNetworkInterfacesOptions
func (*VpcV1) NewListInstanceNetworkInterfacesOptions(instanceID string) *ListInstanceNetworkInterfacesOptions {
	return &ListInstanceNetworkInterfacesOptions{
		InstanceID: core.StringPtr(instanceID),
	}
}

// SetInstanceID : Allow user to set InstanceID
func (options *ListInstanceNetworkInterfacesOptions) SetInstanceID(instanceID string) *ListInstanceNetworkInterfacesOptions {
	options.InstanceID = core.StringPtr(instanceID)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListInstanceNetworkInterfacesOptions) SetHeaders(param map[string]string) *ListInstanceNetworkInterfacesOptions {
	options.Headers = param
	return options
}

// ListInstanceProfilesOptions : The ListInstanceProfiles options.
type ListInstanceProfilesOptions struct {

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListInstanceProfilesOptions : Instantiate ListInstanceProfilesOptions
func (*VpcV1) NewListInstanceProfilesOptions() *ListInstanceProfilesOptions {
	return &ListInstanceProfilesOptions{}
}

// SetHeaders : Allow user to set Headers
func (options *ListInstanceProfilesOptions) SetHeaders(param map[string]string) *ListInstanceProfilesOptions {
	options.Headers = param
	return options
}

// ListInstanceTemplatesOptions : The ListInstanceTemplates options.
type ListInstanceTemplatesOptions struct {

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListInstanceTemplatesOptions : Instantiate ListInstanceTemplatesOptions
func (*VpcV1) NewListInstanceTemplatesOptions() *ListInstanceTemplatesOptions {
	return &ListInstanceTemplatesOptions{}
}

// SetHeaders : Allow user to set Headers
func (options *ListInstanceTemplatesOptions) SetHeaders(param map[string]string) *ListInstanceTemplatesOptions {
	options.Headers = param
	return options
}

// ListInstanceVolumeAttachmentsOptions : The ListInstanceVolumeAttachments options.
type ListInstanceVolumeAttachmentsOptions struct {
	// The instance identifier.
	InstanceID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListInstanceVolumeAttachmentsOptions : Instantiate ListInstanceVolumeAttachmentsOptions
func (*VpcV1) NewListInstanceVolumeAttachmentsOptions(instanceID string) *ListInstanceVolumeAttachmentsOptions {
	return &ListInstanceVolumeAttachmentsOptions{
		InstanceID: core.StringPtr(instanceID),
	}
}

// SetInstanceID : Allow user to set InstanceID
func (options *ListInstanceVolumeAttachmentsOptions) SetInstanceID(instanceID string) *ListInstanceVolumeAttachmentsOptions {
	options.InstanceID = core.StringPtr(instanceID)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListInstanceVolumeAttachmentsOptions) SetHeaders(param map[string]string) *ListInstanceVolumeAttachmentsOptions {
	options.Headers = param
	return options
}

// ListInstancesOptions : The ListInstances options.
type ListInstancesOptions struct {
	// A server-supplied token determining what resource to start the page on.
	Start *string

	// The number of resources to return on a page.
	Limit *int64

	// Filters the collection to resources within one of the resource groups identified in a comma-separated list of
	// resource group identifiers.
	ResourceGroupID *string

	// Filters the collection to resources with the exact specified name.
	Name *string

	// Filters the collection to resources in the VPC with the specified identifier.
	VPCID *string

	// Filters the collection to resources in the VPC with the specified CRN.
	VPCCRN *string

	// Filters the collection to resources in the VPC with the exact specified name.
	VPCName *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListInstancesOptions : Instantiate ListInstancesOptions
func (*VpcV1) NewListInstancesOptions() *ListInstancesOptions {
	return &ListInstancesOptions{}
}

// SetStart : Allow user to set Start
func (options *ListInstancesOptions) SetStart(start string) *ListInstancesOptions {
	options.Start = core.StringPtr(start)
	return options
}

// SetLimit : Allow user to set Limit
func (options *ListInstancesOptions) SetLimit(limit int64) *ListInstancesOptions {
	options.Limit = core.Int64Ptr(limit)
	return options
}

// SetResourceGroupID : Allow user to set ResourceGroupID
func (options *ListInstancesOptions) SetResourceGroupID(resourceGroupID string) *ListInstancesOptions {
	options.ResourceGroupID = core.StringPtr(resourceGroupID)
	return options
}

// SetName : Allow user to set Name
func (options *ListInstancesOptions) SetName(name string) *ListInstancesOptions {
	options.Name = core.StringPtr(name)
	return options
}

// SetVPCID : Allow user to set VPCID
func (options *ListInstancesOptions) SetVPCID(vpcID string) *ListInstancesOptions {
	options.VPCID = core.StringPtr(vpcID)
	return options
}

// SetVPCCRN : Allow user to set VPCCRN
func (options *ListInstancesOptions) SetVPCCRN(vpcCRN string) *ListInstancesOptions {
	options.VPCCRN = core.StringPtr(vpcCRN)
	return options
}

// SetVPCName : Allow user to set VPCName
func (options *ListInstancesOptions) SetVPCName(vpcName string) *ListInstancesOptions {
	options.VPCName = core.StringPtr(vpcName)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListInstancesOptions) SetHeaders(param map[string]string) *ListInstancesOptions {
	options.Headers = param
	return options
}

// ListIpsecPoliciesOptions : The ListIpsecPolicies options.
type ListIpsecPoliciesOptions struct {
	// A server-supplied token determining what resource to start the page on.
	Start *string

	// The number of resources to return on a page.
	Limit *int64

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListIpsecPoliciesOptions : Instantiate ListIpsecPoliciesOptions
func (*VpcV1) NewListIpsecPoliciesOptions() *ListIpsecPoliciesOptions {
	return &ListIpsecPoliciesOptions{}
}

// SetStart : Allow user to set Start
func (options *ListIpsecPoliciesOptions) SetStart(start string) *ListIpsecPoliciesOptions {
	options.Start = core.StringPtr(start)
	return options
}

// SetLimit : Allow user to set Limit
func (options *ListIpsecPoliciesOptions) SetLimit(limit int64) *ListIpsecPoliciesOptions {
	options.Limit = core.Int64Ptr(limit)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListIpsecPoliciesOptions) SetHeaders(param map[string]string) *ListIpsecPoliciesOptions {
	options.Headers = param
	return options
}

// ListIpsecPolicyConnectionsOptions : The ListIpsecPolicyConnections options.
type ListIpsecPolicyConnectionsOptions struct {
	// The IPsec policy identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListIpsecPolicyConnectionsOptions : Instantiate ListIpsecPolicyConnectionsOptions
func (*VpcV1) NewListIpsecPolicyConnectionsOptions(id string) *ListIpsecPolicyConnectionsOptions {
	return &ListIpsecPolicyConnectionsOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *ListIpsecPolicyConnectionsOptions) SetID(id string) *ListIpsecPolicyConnectionsOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListIpsecPolicyConnectionsOptions) SetHeaders(param map[string]string) *ListIpsecPolicyConnectionsOptions {
	options.Headers = param
	return options
}

// ListKeysOptions : The ListKeys options.
type ListKeysOptions struct {
	// Filters the collection to resources within one of the resource groups identified in a comma-separated list of
	// resource group identifiers.
	ResourceGroupID *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListKeysOptions : Instantiate ListKeysOptions
func (*VpcV1) NewListKeysOptions() *ListKeysOptions {
	return &ListKeysOptions{}
}

// SetResourceGroupID : Allow user to set ResourceGroupID
func (options *ListKeysOptions) SetResourceGroupID(resourceGroupID string) *ListKeysOptions {
	options.ResourceGroupID = core.StringPtr(resourceGroupID)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListKeysOptions) SetHeaders(param map[string]string) *ListKeysOptions {
	options.Headers = param
	return options
}

// ListLoadBalancerListenerPoliciesOptions : The ListLoadBalancerListenerPolicies options.
type ListLoadBalancerListenerPoliciesOptions struct {
	// The load balancer identifier.
	LoadBalancerID *string `validate:"required,ne="`

	// The listener identifier.
	ListenerID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListLoadBalancerListenerPoliciesOptions : Instantiate ListLoadBalancerListenerPoliciesOptions
func (*VpcV1) NewListLoadBalancerListenerPoliciesOptions(loadBalancerID string, listenerID string) *ListLoadBalancerListenerPoliciesOptions {
	return &ListLoadBalancerListenerPoliciesOptions{
		LoadBalancerID: core.StringPtr(loadBalancerID),
		ListenerID:     core.StringPtr(listenerID),
	}
}

// SetLoadBalancerID : Allow user to set LoadBalancerID
func (options *ListLoadBalancerListenerPoliciesOptions) SetLoadBalancerID(loadBalancerID string) *ListLoadBalancerListenerPoliciesOptions {
	options.LoadBalancerID = core.StringPtr(loadBalancerID)
	return options
}

// SetListenerID : Allow user to set ListenerID
func (options *ListLoadBalancerListenerPoliciesOptions) SetListenerID(listenerID string) *ListLoadBalancerListenerPoliciesOptions {
	options.ListenerID = core.StringPtr(listenerID)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListLoadBalancerListenerPoliciesOptions) SetHeaders(param map[string]string) *ListLoadBalancerListenerPoliciesOptions {
	options.Headers = param
	return options
}

// ListLoadBalancerListenerPolicyRulesOptions : The ListLoadBalancerListenerPolicyRules options.
type ListLoadBalancerListenerPolicyRulesOptions struct {
	// The load balancer identifier.
	LoadBalancerID *string `validate:"required,ne="`

	// The listener identifier.
	ListenerID *string `validate:"required,ne="`

	// The policy identifier.
	PolicyID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListLoadBalancerListenerPolicyRulesOptions : Instantiate ListLoadBalancerListenerPolicyRulesOptions
func (*VpcV1) NewListLoadBalancerListenerPolicyRulesOptions(loadBalancerID string, listenerID string, policyID string) *ListLoadBalancerListenerPolicyRulesOptions {
	return &ListLoadBalancerListenerPolicyRulesOptions{
		LoadBalancerID: core.StringPtr(loadBalancerID),
		ListenerID:     core.StringPtr(listenerID),
		PolicyID:       core.StringPtr(policyID),
	}
}

// SetLoadBalancerID : Allow user to set LoadBalancerID
func (options *ListLoadBalancerListenerPolicyRulesOptions) SetLoadBalancerID(loadBalancerID string) *ListLoadBalancerListenerPolicyRulesOptions {
	options.LoadBalancerID = core.StringPtr(loadBalancerID)
	return options
}

// SetListenerID : Allow user to set ListenerID
func (options *ListLoadBalancerListenerPolicyRulesOptions) SetListenerID(listenerID string) *ListLoadBalancerListenerPolicyRulesOptions {
	options.ListenerID = core.StringPtr(listenerID)
	return options
}

// SetPolicyID : Allow user to set PolicyID
func (options *ListLoadBalancerListenerPolicyRulesOptions) SetPolicyID(policyID string) *ListLoadBalancerListenerPolicyRulesOptions {
	options.PolicyID = core.StringPtr(policyID)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListLoadBalancerListenerPolicyRulesOptions) SetHeaders(param map[string]string) *ListLoadBalancerListenerPolicyRulesOptions {
	options.Headers = param
	return options
}

// ListLoadBalancerListenersOptions : The ListLoadBalancerListeners options.
type ListLoadBalancerListenersOptions struct {
	// The load balancer identifier.
	LoadBalancerID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListLoadBalancerListenersOptions : Instantiate ListLoadBalancerListenersOptions
func (*VpcV1) NewListLoadBalancerListenersOptions(loadBalancerID string) *ListLoadBalancerListenersOptions {
	return &ListLoadBalancerListenersOptions{
		LoadBalancerID: core.StringPtr(loadBalancerID),
	}
}

// SetLoadBalancerID : Allow user to set LoadBalancerID
func (options *ListLoadBalancerListenersOptions) SetLoadBalancerID(loadBalancerID string) *ListLoadBalancerListenersOptions {
	options.LoadBalancerID = core.StringPtr(loadBalancerID)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListLoadBalancerListenersOptions) SetHeaders(param map[string]string) *ListLoadBalancerListenersOptions {
	options.Headers = param
	return options
}

// ListLoadBalancerPoolMembersOptions : The ListLoadBalancerPoolMembers options.
type ListLoadBalancerPoolMembersOptions struct {
	// The load balancer identifier.
	LoadBalancerID *string `validate:"required,ne="`

	// The pool identifier.
	PoolID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListLoadBalancerPoolMembersOptions : Instantiate ListLoadBalancerPoolMembersOptions
func (*VpcV1) NewListLoadBalancerPoolMembersOptions(loadBalancerID string, poolID string) *ListLoadBalancerPoolMembersOptions {
	return &ListLoadBalancerPoolMembersOptions{
		LoadBalancerID: core.StringPtr(loadBalancerID),
		PoolID:         core.StringPtr(poolID),
	}
}

// SetLoadBalancerID : Allow user to set LoadBalancerID
func (options *ListLoadBalancerPoolMembersOptions) SetLoadBalancerID(loadBalancerID string) *ListLoadBalancerPoolMembersOptions {
	options.LoadBalancerID = core.StringPtr(loadBalancerID)
	return options
}

// SetPoolID : Allow user to set PoolID
func (options *ListLoadBalancerPoolMembersOptions) SetPoolID(poolID string) *ListLoadBalancerPoolMembersOptions {
	options.PoolID = core.StringPtr(poolID)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListLoadBalancerPoolMembersOptions) SetHeaders(param map[string]string) *ListLoadBalancerPoolMembersOptions {
	options.Headers = param
	return options
}

// ListLoadBalancerPoolsOptions : The ListLoadBalancerPools options.
type ListLoadBalancerPoolsOptions struct {
	// The load balancer identifier.
	LoadBalancerID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListLoadBalancerPoolsOptions : Instantiate ListLoadBalancerPoolsOptions
func (*VpcV1) NewListLoadBalancerPoolsOptions(loadBalancerID string) *ListLoadBalancerPoolsOptions {
	return &ListLoadBalancerPoolsOptions{
		LoadBalancerID: core.StringPtr(loadBalancerID),
	}
}

// SetLoadBalancerID : Allow user to set LoadBalancerID
func (options *ListLoadBalancerPoolsOptions) SetLoadBalancerID(loadBalancerID string) *ListLoadBalancerPoolsOptions {
	options.LoadBalancerID = core.StringPtr(loadBalancerID)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListLoadBalancerPoolsOptions) SetHeaders(param map[string]string) *ListLoadBalancerPoolsOptions {
	options.Headers = param
	return options
}

// ListLoadBalancerProfilesOptions : The ListLoadBalancerProfiles options.
type ListLoadBalancerProfilesOptions struct {
	// A server-supplied token determining what resource to start the page on.
	Start *string

	// The number of resources to return on a page.
	Limit *int64

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListLoadBalancerProfilesOptions : Instantiate ListLoadBalancerProfilesOptions
func (*VpcV1) NewListLoadBalancerProfilesOptions() *ListLoadBalancerProfilesOptions {
	return &ListLoadBalancerProfilesOptions{}
}

// SetStart : Allow user to set Start
func (options *ListLoadBalancerProfilesOptions) SetStart(start string) *ListLoadBalancerProfilesOptions {
	options.Start = core.StringPtr(start)
	return options
}

// SetLimit : Allow user to set Limit
func (options *ListLoadBalancerProfilesOptions) SetLimit(limit int64) *ListLoadBalancerProfilesOptions {
	options.Limit = core.Int64Ptr(limit)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListLoadBalancerProfilesOptions) SetHeaders(param map[string]string) *ListLoadBalancerProfilesOptions {
	options.Headers = param
	return options
}

// ListLoadBalancersOptions : The ListLoadBalancers options.
type ListLoadBalancersOptions struct {

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListLoadBalancersOptions : Instantiate ListLoadBalancersOptions
func (*VpcV1) NewListLoadBalancersOptions() *ListLoadBalancersOptions {
	return &ListLoadBalancersOptions{}
}

// SetHeaders : Allow user to set Headers
func (options *ListLoadBalancersOptions) SetHeaders(param map[string]string) *ListLoadBalancersOptions {
	options.Headers = param
	return options
}

// ListNetworkACLRulesOptions : The ListNetworkACLRules options.
type ListNetworkACLRulesOptions struct {
	// The network ACL identifier.
	NetworkACLID *string `validate:"required,ne="`

	// A server-supplied token determining what resource to start the page on.
	Start *string

	// The number of resources to return on a page.
	Limit *int64

	// Filters the collection to rules with the specified direction.
	Direction *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

// Constants associated with the ListNetworkACLRulesOptions.Direction property.
// Filters the collection to rules with the specified direction.
const (
	ListNetworkACLRulesOptionsDirectionInboundConst  = "inbound"
	ListNetworkACLRulesOptionsDirectionOutboundConst = "outbound"
)

// NewListNetworkACLRulesOptions : Instantiate ListNetworkACLRulesOptions
func (*VpcV1) NewListNetworkACLRulesOptions(networkACLID string) *ListNetworkACLRulesOptions {
	return &ListNetworkACLRulesOptions{
		NetworkACLID: core.StringPtr(networkACLID),
	}
}

// SetNetworkACLID : Allow user to set NetworkACLID
func (options *ListNetworkACLRulesOptions) SetNetworkACLID(networkACLID string) *ListNetworkACLRulesOptions {
	options.NetworkACLID = core.StringPtr(networkACLID)
	return options
}

// SetStart : Allow user to set Start
func (options *ListNetworkACLRulesOptions) SetStart(start string) *ListNetworkACLRulesOptions {
	options.Start = core.StringPtr(start)
	return options
}

// SetLimit : Allow user to set Limit
func (options *ListNetworkACLRulesOptions) SetLimit(limit int64) *ListNetworkACLRulesOptions {
	options.Limit = core.Int64Ptr(limit)
	return options
}

// SetDirection : Allow user to set Direction
func (options *ListNetworkACLRulesOptions) SetDirection(direction string) *ListNetworkACLRulesOptions {
	options.Direction = core.StringPtr(direction)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListNetworkACLRulesOptions) SetHeaders(param map[string]string) *ListNetworkACLRulesOptions {
	options.Headers = param
	return options
}

// ListNetworkAclsOptions : The ListNetworkAcls options.
type ListNetworkAclsOptions struct {
	// A server-supplied token determining what resource to start the page on.
	Start *string

	// The number of resources to return on a page.
	Limit *int64

	// Filters the collection to resources within one of the resource groups identified in a comma-separated list of
	// resource group identifiers.
	ResourceGroupID *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListNetworkAclsOptions : Instantiate ListNetworkAclsOptions
func (*VpcV1) NewListNetworkAclsOptions() *ListNetworkAclsOptions {
	return &ListNetworkAclsOptions{}
}

// SetStart : Allow user to set Start
func (options *ListNetworkAclsOptions) SetStart(start string) *ListNetworkAclsOptions {
	options.Start = core.StringPtr(start)
	return options
}

// SetLimit : Allow user to set Limit
func (options *ListNetworkAclsOptions) SetLimit(limit int64) *ListNetworkAclsOptions {
	options.Limit = core.Int64Ptr(limit)
	return options
}

// SetResourceGroupID : Allow user to set ResourceGroupID
func (options *ListNetworkAclsOptions) SetResourceGroupID(resourceGroupID string) *ListNetworkAclsOptions {
	options.ResourceGroupID = core.StringPtr(resourceGroupID)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListNetworkAclsOptions) SetHeaders(param map[string]string) *ListNetworkAclsOptions {
	options.Headers = param
	return options
}

// ListOperatingSystemsOptions : The ListOperatingSystems options.
type ListOperatingSystemsOptions struct {
	// A server-supplied token determining what resource to start the page on.
	Start *string

	// The number of resources to return on a page.
	Limit *int64

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListOperatingSystemsOptions : Instantiate ListOperatingSystemsOptions
func (*VpcV1) NewListOperatingSystemsOptions() *ListOperatingSystemsOptions {
	return &ListOperatingSystemsOptions{}
}

// SetStart : Allow user to set Start
func (options *ListOperatingSystemsOptions) SetStart(start string) *ListOperatingSystemsOptions {
	options.Start = core.StringPtr(start)
	return options
}

// SetLimit : Allow user to set Limit
func (options *ListOperatingSystemsOptions) SetLimit(limit int64) *ListOperatingSystemsOptions {
	options.Limit = core.Int64Ptr(limit)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListOperatingSystemsOptions) SetHeaders(param map[string]string) *ListOperatingSystemsOptions {
	options.Headers = param
	return options
}

// ListPublicGatewaysOptions : The ListPublicGateways options.
type ListPublicGatewaysOptions struct {
	// A server-supplied token determining what resource to start the page on.
	Start *string

	// The number of resources to return on a page.
	Limit *int64

	// Filters the collection to resources within one of the resource groups identified in a comma-separated list of
	// resource group identifiers.
	ResourceGroupID *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListPublicGatewaysOptions : Instantiate ListPublicGatewaysOptions
func (*VpcV1) NewListPublicGatewaysOptions() *ListPublicGatewaysOptions {
	return &ListPublicGatewaysOptions{}
}

// SetStart : Allow user to set Start
func (options *ListPublicGatewaysOptions) SetStart(start string) *ListPublicGatewaysOptions {
	options.Start = core.StringPtr(start)
	return options
}

// SetLimit : Allow user to set Limit
func (options *ListPublicGatewaysOptions) SetLimit(limit int64) *ListPublicGatewaysOptions {
	options.Limit = core.Int64Ptr(limit)
	return options
}

// SetResourceGroupID : Allow user to set ResourceGroupID
func (options *ListPublicGatewaysOptions) SetResourceGroupID(resourceGroupID string) *ListPublicGatewaysOptions {
	options.ResourceGroupID = core.StringPtr(resourceGroupID)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListPublicGatewaysOptions) SetHeaders(param map[string]string) *ListPublicGatewaysOptions {
	options.Headers = param
	return options
}

// ListRegionZonesOptions : The ListRegionZones options.
type ListRegionZonesOptions struct {
	// The region name.
	RegionName *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListRegionZonesOptions : Instantiate ListRegionZonesOptions
func (*VpcV1) NewListRegionZonesOptions(regionName string) *ListRegionZonesOptions {
	return &ListRegionZonesOptions{
		RegionName: core.StringPtr(regionName),
	}
}

// SetRegionName : Allow user to set RegionName
func (options *ListRegionZonesOptions) SetRegionName(regionName string) *ListRegionZonesOptions {
	options.RegionName = core.StringPtr(regionName)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListRegionZonesOptions) SetHeaders(param map[string]string) *ListRegionZonesOptions {
	options.Headers = param
	return options
}

// ListRegionsOptions : The ListRegions options.
type ListRegionsOptions struct {

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListRegionsOptions : Instantiate ListRegionsOptions
func (*VpcV1) NewListRegionsOptions() *ListRegionsOptions {
	return &ListRegionsOptions{}
}

// SetHeaders : Allow user to set Headers
func (options *ListRegionsOptions) SetHeaders(param map[string]string) *ListRegionsOptions {
	options.Headers = param
	return options
}

// ListSecurityGroupNetworkInterfacesOptions : The ListSecurityGroupNetworkInterfaces options.
type ListSecurityGroupNetworkInterfacesOptions struct {
	// The security group identifier.
	SecurityGroupID *string `validate:"required,ne="`

	// A server-supplied token determining what resource to start the page on.
	Start *string

	// The number of resources to return on a page.
	Limit *int64

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListSecurityGroupNetworkInterfacesOptions : Instantiate ListSecurityGroupNetworkInterfacesOptions
func (*VpcV1) NewListSecurityGroupNetworkInterfacesOptions(securityGroupID string) *ListSecurityGroupNetworkInterfacesOptions {
	return &ListSecurityGroupNetworkInterfacesOptions{
		SecurityGroupID: core.StringPtr(securityGroupID),
	}
}

// SetSecurityGroupID : Allow user to set SecurityGroupID
func (options *ListSecurityGroupNetworkInterfacesOptions) SetSecurityGroupID(securityGroupID string) *ListSecurityGroupNetworkInterfacesOptions {
	options.SecurityGroupID = core.StringPtr(securityGroupID)
	return options
}

// SetStart : Allow user to set Start
func (options *ListSecurityGroupNetworkInterfacesOptions) SetStart(start string) *ListSecurityGroupNetworkInterfacesOptions {
	options.Start = core.StringPtr(start)
	return options
}

// SetLimit : Allow user to set Limit
func (options *ListSecurityGroupNetworkInterfacesOptions) SetLimit(limit int64) *ListSecurityGroupNetworkInterfacesOptions {
	options.Limit = core.Int64Ptr(limit)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListSecurityGroupNetworkInterfacesOptions) SetHeaders(param map[string]string) *ListSecurityGroupNetworkInterfacesOptions {
	options.Headers = param
	return options
}

// ListSecurityGroupRulesOptions : The ListSecurityGroupRules options.
type ListSecurityGroupRulesOptions struct {
	// The security group identifier.
	SecurityGroupID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListSecurityGroupRulesOptions : Instantiate ListSecurityGroupRulesOptions
func (*VpcV1) NewListSecurityGroupRulesOptions(securityGroupID string) *ListSecurityGroupRulesOptions {
	return &ListSecurityGroupRulesOptions{
		SecurityGroupID: core.StringPtr(securityGroupID),
	}
}

// SetSecurityGroupID : Allow user to set SecurityGroupID
func (options *ListSecurityGroupRulesOptions) SetSecurityGroupID(securityGroupID string) *ListSecurityGroupRulesOptions {
	options.SecurityGroupID = core.StringPtr(securityGroupID)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListSecurityGroupRulesOptions) SetHeaders(param map[string]string) *ListSecurityGroupRulesOptions {
	options.Headers = param
	return options
}

// ListSecurityGroupTargetsOptions : The ListSecurityGroupTargets options.
type ListSecurityGroupTargetsOptions struct {
	// The security group identifier.
	SecurityGroupID *string `validate:"required,ne="`

	// A server-supplied token determining what resource to start the page on.
	Start *string

	// The number of resources to return on a page.
	Limit *int64

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListSecurityGroupTargetsOptions : Instantiate ListSecurityGroupTargetsOptions
func (*VpcV1) NewListSecurityGroupTargetsOptions(securityGroupID string) *ListSecurityGroupTargetsOptions {
	return &ListSecurityGroupTargetsOptions{
		SecurityGroupID: core.StringPtr(securityGroupID),
	}
}

// SetSecurityGroupID : Allow user to set SecurityGroupID
func (options *ListSecurityGroupTargetsOptions) SetSecurityGroupID(securityGroupID string) *ListSecurityGroupTargetsOptions {
	options.SecurityGroupID = core.StringPtr(securityGroupID)
	return options
}

// SetStart : Allow user to set Start
func (options *ListSecurityGroupTargetsOptions) SetStart(start string) *ListSecurityGroupTargetsOptions {
	options.Start = core.StringPtr(start)
	return options
}

// SetLimit : Allow user to set Limit
func (options *ListSecurityGroupTargetsOptions) SetLimit(limit int64) *ListSecurityGroupTargetsOptions {
	options.Limit = core.Int64Ptr(limit)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListSecurityGroupTargetsOptions) SetHeaders(param map[string]string) *ListSecurityGroupTargetsOptions {
	options.Headers = param
	return options
}

// ListSecurityGroupsOptions : The ListSecurityGroups options.
type ListSecurityGroupsOptions struct {
	// A server-supplied token determining what resource to start the page on.
	Start *string

	// The number of resources to return on a page.
	Limit *int64

	// Filters the collection to resources within one of the resource groups identified in a comma-separated list of
	// resource group identifiers.
	ResourceGroupID *string

	// Filters the collection to resources in the VPC with the specified identifier.
	VPCID *string

	// Filters the collection to resources in the VPC with the specified CRN.
	VPCCRN *string

	// Filters the collection to resources in the VPC with the exact specified name.
	VPCName *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListSecurityGroupsOptions : Instantiate ListSecurityGroupsOptions
func (*VpcV1) NewListSecurityGroupsOptions() *ListSecurityGroupsOptions {
	return &ListSecurityGroupsOptions{}
}

// SetStart : Allow user to set Start
func (options *ListSecurityGroupsOptions) SetStart(start string) *ListSecurityGroupsOptions {
	options.Start = core.StringPtr(start)
	return options
}

// SetLimit : Allow user to set Limit
func (options *ListSecurityGroupsOptions) SetLimit(limit int64) *ListSecurityGroupsOptions {
	options.Limit = core.Int64Ptr(limit)
	return options
}

// SetResourceGroupID : Allow user to set ResourceGroupID
func (options *ListSecurityGroupsOptions) SetResourceGroupID(resourceGroupID string) *ListSecurityGroupsOptions {
	options.ResourceGroupID = core.StringPtr(resourceGroupID)
	return options
}

// SetVPCID : Allow user to set VPCID
func (options *ListSecurityGroupsOptions) SetVPCID(vpcID string) *ListSecurityGroupsOptions {
	options.VPCID = core.StringPtr(vpcID)
	return options
}

// SetVPCCRN : Allow user to set VPCCRN
func (options *ListSecurityGroupsOptions) SetVPCCRN(vpcCRN string) *ListSecurityGroupsOptions {
	options.VPCCRN = core.StringPtr(vpcCRN)
	return options
}

// SetVPCName : Allow user to set VPCName
func (options *ListSecurityGroupsOptions) SetVPCName(vpcName string) *ListSecurityGroupsOptions {
	options.VPCName = core.StringPtr(vpcName)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListSecurityGroupsOptions) SetHeaders(param map[string]string) *ListSecurityGroupsOptions {
	options.Headers = param
	return options
}

// ListSubnetReservedIpsOptions : The ListSubnetReservedIps options.
type ListSubnetReservedIpsOptions struct {
	// The subnet identifier.
	SubnetID *string `validate:"required,ne="`

	// A server-supplied token determining what resource to start the page on.
	Start *string

	// The number of resources to return on a page.
	Limit *int64

	// Sorts the returned collection by the specified field name in ascending order. A `-` may be prepended to the field
	// name to sort in descending order. For example, the value
	// `-created_at` sorts the collection by the `created_at` field in descending order, and the value `name` sorts it by
	// the `name` field in ascending order.
	Sort *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

// Constants associated with the ListSubnetReservedIpsOptions.Sort property.
// Sorts the returned collection by the specified field name in ascending order. A `-` may be prepended to the field
// name to sort in descending order. For example, the value
// `-created_at` sorts the collection by the `created_at` field in descending order, and the value `name` sorts it by
// the `name` field in ascending order.
const (
	ListSubnetReservedIpsOptionsSortAddressConst   = "address"
	ListSubnetReservedIpsOptionsSortCreatedAtConst = "created_at"
	ListSubnetReservedIpsOptionsSortNameConst      = "name"
)

// NewListSubnetReservedIpsOptions : Instantiate ListSubnetReservedIpsOptions
func (*VpcV1) NewListSubnetReservedIpsOptions(subnetID string) *ListSubnetReservedIpsOptions {
	return &ListSubnetReservedIpsOptions{
		SubnetID: core.StringPtr(subnetID),
	}
}

// SetSubnetID : Allow user to set SubnetID
func (options *ListSubnetReservedIpsOptions) SetSubnetID(subnetID string) *ListSubnetReservedIpsOptions {
	options.SubnetID = core.StringPtr(subnetID)
	return options
}

// SetStart : Allow user to set Start
func (options *ListSubnetReservedIpsOptions) SetStart(start string) *ListSubnetReservedIpsOptions {
	options.Start = core.StringPtr(start)
	return options
}

// SetLimit : Allow user to set Limit
func (options *ListSubnetReservedIpsOptions) SetLimit(limit int64) *ListSubnetReservedIpsOptions {
	options.Limit = core.Int64Ptr(limit)
	return options
}

// SetSort : Allow user to set Sort
func (options *ListSubnetReservedIpsOptions) SetSort(sort string) *ListSubnetReservedIpsOptions {
	options.Sort = core.StringPtr(sort)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListSubnetReservedIpsOptions) SetHeaders(param map[string]string) *ListSubnetReservedIpsOptions {
	options.Headers = param
	return options
}

// ListSubnetsOptions : The ListSubnets options.
type ListSubnetsOptions struct {
	// A server-supplied token determining what resource to start the page on.
	Start *string

	// The number of resources to return on a page.
	Limit *int64

	// Filters the collection to resources within one of the resource groups identified in a comma-separated list of
	// resource group identifiers.
	ResourceGroupID *string

	// Filters the collection to subnets attached to the routing table with the specified identifier.
	RoutingTableID *string

	// Filters the collection to subnets attached to the routing table with the specified name.
	RoutingTableName *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListSubnetsOptions : Instantiate ListSubnetsOptions
func (*VpcV1) NewListSubnetsOptions() *ListSubnetsOptions {
	return &ListSubnetsOptions{}
}

// SetStart : Allow user to set Start
func (options *ListSubnetsOptions) SetStart(start string) *ListSubnetsOptions {
	options.Start = core.StringPtr(start)
	return options
}

// SetLimit : Allow user to set Limit
func (options *ListSubnetsOptions) SetLimit(limit int64) *ListSubnetsOptions {
	options.Limit = core.Int64Ptr(limit)
	return options
}

// SetResourceGroupID : Allow user to set ResourceGroupID
func (options *ListSubnetsOptions) SetResourceGroupID(resourceGroupID string) *ListSubnetsOptions {
	options.ResourceGroupID = core.StringPtr(resourceGroupID)
	return options
}

// SetRoutingTableID : Allow user to set RoutingTableID
func (options *ListSubnetsOptions) SetRoutingTableID(routingTableID string) *ListSubnetsOptions {
	options.RoutingTableID = core.StringPtr(routingTableID)
	return options
}

// SetRoutingTableName : Allow user to set RoutingTableName
func (options *ListSubnetsOptions) SetRoutingTableName(routingTableName string) *ListSubnetsOptions {
	options.RoutingTableName = core.StringPtr(routingTableName)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListSubnetsOptions) SetHeaders(param map[string]string) *ListSubnetsOptions {
	options.Headers = param
	return options
}

// ListVolumeProfilesOptions : The ListVolumeProfiles options.
type ListVolumeProfilesOptions struct {
	// A server-supplied token determining what resource to start the page on.
	Start *string

	// The number of resources to return on a page.
	Limit *int64

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListVolumeProfilesOptions : Instantiate ListVolumeProfilesOptions
func (*VpcV1) NewListVolumeProfilesOptions() *ListVolumeProfilesOptions {
	return &ListVolumeProfilesOptions{}
}

// SetStart : Allow user to set Start
func (options *ListVolumeProfilesOptions) SetStart(start string) *ListVolumeProfilesOptions {
	options.Start = core.StringPtr(start)
	return options
}

// SetLimit : Allow user to set Limit
func (options *ListVolumeProfilesOptions) SetLimit(limit int64) *ListVolumeProfilesOptions {
	options.Limit = core.Int64Ptr(limit)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListVolumeProfilesOptions) SetHeaders(param map[string]string) *ListVolumeProfilesOptions {
	options.Headers = param
	return options
}

// ListVolumesOptions : The ListVolumes options.
type ListVolumesOptions struct {
	// A server-supplied token determining what resource to start the page on.
	Start *string

	// The number of resources to return on a page.
	Limit *int64

	// Filters the collection to resources with the exact specified name.
	Name *string

	// Filters the collection to resources in the zone with the exact specified name.
	ZoneName *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListVolumesOptions : Instantiate ListVolumesOptions
func (*VpcV1) NewListVolumesOptions() *ListVolumesOptions {
	return &ListVolumesOptions{}
}

// SetStart : Allow user to set Start
func (options *ListVolumesOptions) SetStart(start string) *ListVolumesOptions {
	options.Start = core.StringPtr(start)
	return options
}

// SetLimit : Allow user to set Limit
func (options *ListVolumesOptions) SetLimit(limit int64) *ListVolumesOptions {
	options.Limit = core.Int64Ptr(limit)
	return options
}

// SetName : Allow user to set Name
func (options *ListVolumesOptions) SetName(name string) *ListVolumesOptions {
	options.Name = core.StringPtr(name)
	return options
}

// SetZoneName : Allow user to set ZoneName
func (options *ListVolumesOptions) SetZoneName(zoneName string) *ListVolumesOptions {
	options.ZoneName = core.StringPtr(zoneName)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListVolumesOptions) SetHeaders(param map[string]string) *ListVolumesOptions {
	options.Headers = param
	return options
}

// ListVPCAddressPrefixesOptions : The ListVPCAddressPrefixes options.
type ListVPCAddressPrefixesOptions struct {
	// The VPC identifier.
	VPCID *string `validate:"required,ne="`

	// A server-supplied token determining what resource to start the page on.
	Start *string

	// The number of resources to return on a page.
	Limit *int64

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListVPCAddressPrefixesOptions : Instantiate ListVPCAddressPrefixesOptions
func (*VpcV1) NewListVPCAddressPrefixesOptions(vpcID string) *ListVPCAddressPrefixesOptions {
	return &ListVPCAddressPrefixesOptions{
		VPCID: core.StringPtr(vpcID),
	}
}

// SetVPCID : Allow user to set VPCID
func (options *ListVPCAddressPrefixesOptions) SetVPCID(vpcID string) *ListVPCAddressPrefixesOptions {
	options.VPCID = core.StringPtr(vpcID)
	return options
}

// SetStart : Allow user to set Start
func (options *ListVPCAddressPrefixesOptions) SetStart(start string) *ListVPCAddressPrefixesOptions {
	options.Start = core.StringPtr(start)
	return options
}

// SetLimit : Allow user to set Limit
func (options *ListVPCAddressPrefixesOptions) SetLimit(limit int64) *ListVPCAddressPrefixesOptions {
	options.Limit = core.Int64Ptr(limit)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListVPCAddressPrefixesOptions) SetHeaders(param map[string]string) *ListVPCAddressPrefixesOptions {
	options.Headers = param
	return options
}

// ListVPCRoutesOptions : The ListVPCRoutes options.
type ListVPCRoutesOptions struct {
	// The VPC identifier.
	VPCID *string `validate:"required,ne="`

	// Filters the collection to resources in the zone with the exact specified name.
	ZoneName *string

	// A server-supplied token determining what resource to start the page on.
	Start *string

	// The number of resources to return on a page.
	Limit *int64

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListVPCRoutesOptions : Instantiate ListVPCRoutesOptions
func (*VpcV1) NewListVPCRoutesOptions(vpcID string) *ListVPCRoutesOptions {
	return &ListVPCRoutesOptions{
		VPCID: core.StringPtr(vpcID),
	}
}

// SetVPCID : Allow user to set VPCID
func (options *ListVPCRoutesOptions) SetVPCID(vpcID string) *ListVPCRoutesOptions {
	options.VPCID = core.StringPtr(vpcID)
	return options
}

// SetZoneName : Allow user to set ZoneName
func (options *ListVPCRoutesOptions) SetZoneName(zoneName string) *ListVPCRoutesOptions {
	options.ZoneName = core.StringPtr(zoneName)
	return options
}

// SetStart : Allow user to set Start
func (options *ListVPCRoutesOptions) SetStart(start string) *ListVPCRoutesOptions {
	options.Start = core.StringPtr(start)
	return options
}

// SetLimit : Allow user to set Limit
func (options *ListVPCRoutesOptions) SetLimit(limit int64) *ListVPCRoutesOptions {
	options.Limit = core.Int64Ptr(limit)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListVPCRoutesOptions) SetHeaders(param map[string]string) *ListVPCRoutesOptions {
	options.Headers = param
	return options
}

// ListVPCRoutingTableRoutesOptions : The ListVPCRoutingTableRoutes options.
type ListVPCRoutingTableRoutesOptions struct {
	// The VPC identifier.
	VPCID *string `validate:"required,ne="`

	// The routing table identifier.
	RoutingTableID *string `validate:"required,ne="`

	// A server-supplied token determining what resource to start the page on.
	Start *string

	// The number of resources to return on a page.
	Limit *int64

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListVPCRoutingTableRoutesOptions : Instantiate ListVPCRoutingTableRoutesOptions
func (*VpcV1) NewListVPCRoutingTableRoutesOptions(vpcID string, routingTableID string) *ListVPCRoutingTableRoutesOptions {
	return &ListVPCRoutingTableRoutesOptions{
		VPCID:          core.StringPtr(vpcID),
		RoutingTableID: core.StringPtr(routingTableID),
	}
}

// SetVPCID : Allow user to set VPCID
func (options *ListVPCRoutingTableRoutesOptions) SetVPCID(vpcID string) *ListVPCRoutingTableRoutesOptions {
	options.VPCID = core.StringPtr(vpcID)
	return options
}

// SetRoutingTableID : Allow user to set RoutingTableID
func (options *ListVPCRoutingTableRoutesOptions) SetRoutingTableID(routingTableID string) *ListVPCRoutingTableRoutesOptions {
	options.RoutingTableID = core.StringPtr(routingTableID)
	return options
}

// SetStart : Allow user to set Start
func (options *ListVPCRoutingTableRoutesOptions) SetStart(start string) *ListVPCRoutingTableRoutesOptions {
	options.Start = core.StringPtr(start)
	return options
}

// SetLimit : Allow user to set Limit
func (options *ListVPCRoutingTableRoutesOptions) SetLimit(limit int64) *ListVPCRoutingTableRoutesOptions {
	options.Limit = core.Int64Ptr(limit)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListVPCRoutingTableRoutesOptions) SetHeaders(param map[string]string) *ListVPCRoutingTableRoutesOptions {
	options.Headers = param
	return options
}

// ListVPCRoutingTablesOptions : The ListVPCRoutingTables options.
type ListVPCRoutingTablesOptions struct {
	// The VPC identifier.
	VPCID *string `validate:"required,ne="`

	// A server-supplied token determining what resource to start the page on.
	Start *string

	// The number of resources to return on a page.
	Limit *int64

	// If the supplied value is `true`, filters the routing table collection to only the default routing table. If the
	// supplied value is `false`, filters the routing table collection to exclude the default routing table.
	IsDefault *bool

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListVPCRoutingTablesOptions : Instantiate ListVPCRoutingTablesOptions
func (*VpcV1) NewListVPCRoutingTablesOptions(vpcID string) *ListVPCRoutingTablesOptions {
	return &ListVPCRoutingTablesOptions{
		VPCID: core.StringPtr(vpcID),
	}
}

// SetVPCID : Allow user to set VPCID
func (options *ListVPCRoutingTablesOptions) SetVPCID(vpcID string) *ListVPCRoutingTablesOptions {
	options.VPCID = core.StringPtr(vpcID)
	return options
}

// SetStart : Allow user to set Start
func (options *ListVPCRoutingTablesOptions) SetStart(start string) *ListVPCRoutingTablesOptions {
	options.Start = core.StringPtr(start)
	return options
}

// SetLimit : Allow user to set Limit
func (options *ListVPCRoutingTablesOptions) SetLimit(limit int64) *ListVPCRoutingTablesOptions {
	options.Limit = core.Int64Ptr(limit)
	return options
}

// SetIsDefault : Allow user to set IsDefault
func (options *ListVPCRoutingTablesOptions) SetIsDefault(isDefault bool) *ListVPCRoutingTablesOptions {
	options.IsDefault = core.BoolPtr(isDefault)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListVPCRoutingTablesOptions) SetHeaders(param map[string]string) *ListVPCRoutingTablesOptions {
	options.Headers = param
	return options
}

// ListVpcsOptions : The ListVpcs options.
type ListVpcsOptions struct {
	// A server-supplied token determining what resource to start the page on.
	Start *string

	// The number of resources to return on a page.
	Limit *int64

	// Filters the collection to resources within one of the resource groups identified in a comma-separated list of
	// resource group identifiers.
	ResourceGroupID *string

	// The `classic_access` parameter filters the returned collection by the supplied field. If the supplied field is
	// `true`, only Classic Access VPCs will be returned. If the supplied field is `false`, only VPCs without Classic
	// Access will be returned.
	ClassicAccess *bool

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListVpcsOptions : Instantiate ListVpcsOptions
func (*VpcV1) NewListVpcsOptions() *ListVpcsOptions {
	return &ListVpcsOptions{}
}

// SetStart : Allow user to set Start
func (options *ListVpcsOptions) SetStart(start string) *ListVpcsOptions {
	options.Start = core.StringPtr(start)
	return options
}

// SetLimit : Allow user to set Limit
func (options *ListVpcsOptions) SetLimit(limit int64) *ListVpcsOptions {
	options.Limit = core.Int64Ptr(limit)
	return options
}

// SetResourceGroupID : Allow user to set ResourceGroupID
func (options *ListVpcsOptions) SetResourceGroupID(resourceGroupID string) *ListVpcsOptions {
	options.ResourceGroupID = core.StringPtr(resourceGroupID)
	return options
}

// SetClassicAccess : Allow user to set ClassicAccess
func (options *ListVpcsOptions) SetClassicAccess(classicAccess bool) *ListVpcsOptions {
	options.ClassicAccess = core.BoolPtr(classicAccess)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListVpcsOptions) SetHeaders(param map[string]string) *ListVpcsOptions {
	options.Headers = param
	return options
}

// ListVPNGatewayConnectionLocalCIDRsOptions : The ListVPNGatewayConnectionLocalCIDRs options.
type ListVPNGatewayConnectionLocalCIDRsOptions struct {
	// The VPN gateway identifier.
	VPNGatewayID *string `validate:"required,ne="`

	// The VPN gateway connection identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListVPNGatewayConnectionLocalCIDRsOptions : Instantiate ListVPNGatewayConnectionLocalCIDRsOptions
func (*VpcV1) NewListVPNGatewayConnectionLocalCIDRsOptions(vpnGatewayID string, id string) *ListVPNGatewayConnectionLocalCIDRsOptions {
	return &ListVPNGatewayConnectionLocalCIDRsOptions{
		VPNGatewayID: core.StringPtr(vpnGatewayID),
		ID:           core.StringPtr(id),
	}
}

// SetVPNGatewayID : Allow user to set VPNGatewayID
func (options *ListVPNGatewayConnectionLocalCIDRsOptions) SetVPNGatewayID(vpnGatewayID string) *ListVPNGatewayConnectionLocalCIDRsOptions {
	options.VPNGatewayID = core.StringPtr(vpnGatewayID)
	return options
}

// SetID : Allow user to set ID
func (options *ListVPNGatewayConnectionLocalCIDRsOptions) SetID(id string) *ListVPNGatewayConnectionLocalCIDRsOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListVPNGatewayConnectionLocalCIDRsOptions) SetHeaders(param map[string]string) *ListVPNGatewayConnectionLocalCIDRsOptions {
	options.Headers = param
	return options
}

// ListVPNGatewayConnectionPeerCIDRsOptions : The ListVPNGatewayConnectionPeerCIDRs options.
type ListVPNGatewayConnectionPeerCIDRsOptions struct {
	// The VPN gateway identifier.
	VPNGatewayID *string `validate:"required,ne="`

	// The VPN gateway connection identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListVPNGatewayConnectionPeerCIDRsOptions : Instantiate ListVPNGatewayConnectionPeerCIDRsOptions
func (*VpcV1) NewListVPNGatewayConnectionPeerCIDRsOptions(vpnGatewayID string, id string) *ListVPNGatewayConnectionPeerCIDRsOptions {
	return &ListVPNGatewayConnectionPeerCIDRsOptions{
		VPNGatewayID: core.StringPtr(vpnGatewayID),
		ID:           core.StringPtr(id),
	}
}

// SetVPNGatewayID : Allow user to set VPNGatewayID
func (options *ListVPNGatewayConnectionPeerCIDRsOptions) SetVPNGatewayID(vpnGatewayID string) *ListVPNGatewayConnectionPeerCIDRsOptions {
	options.VPNGatewayID = core.StringPtr(vpnGatewayID)
	return options
}

// SetID : Allow user to set ID
func (options *ListVPNGatewayConnectionPeerCIDRsOptions) SetID(id string) *ListVPNGatewayConnectionPeerCIDRsOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListVPNGatewayConnectionPeerCIDRsOptions) SetHeaders(param map[string]string) *ListVPNGatewayConnectionPeerCIDRsOptions {
	options.Headers = param
	return options
}

// ListVPNGatewayConnectionsOptions : The ListVPNGatewayConnections options.
type ListVPNGatewayConnectionsOptions struct {
	// The VPN gateway identifier.
	VPNGatewayID *string `validate:"required,ne="`

	// Filters the collection to VPN gateway connections with the specified status.
	Status *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewListVPNGatewayConnectionsOptions : Instantiate ListVPNGatewayConnectionsOptions
func (*VpcV1) NewListVPNGatewayConnectionsOptions(vpnGatewayID string) *ListVPNGatewayConnectionsOptions {
	return &ListVPNGatewayConnectionsOptions{
		VPNGatewayID: core.StringPtr(vpnGatewayID),
	}
}

// SetVPNGatewayID : Allow user to set VPNGatewayID
func (options *ListVPNGatewayConnectionsOptions) SetVPNGatewayID(vpnGatewayID string) *ListVPNGatewayConnectionsOptions {
	options.VPNGatewayID = core.StringPtr(vpnGatewayID)
	return options
}

// SetStatus : Allow user to set Status
func (options *ListVPNGatewayConnectionsOptions) SetStatus(status string) *ListVPNGatewayConnectionsOptions {
	options.Status = core.StringPtr(status)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListVPNGatewayConnectionsOptions) SetHeaders(param map[string]string) *ListVPNGatewayConnectionsOptions {
	options.Headers = param
	return options
}

// ListVPNGatewaysOptions : The ListVPNGateways options.
type ListVPNGatewaysOptions struct {
	// A server-supplied token determining what resource to start the page on.
	Start *string

	// The number of resources to return on a page.
	Limit *int64

	// Filters the collection to resources within one of the resource groups identified in a comma-separated list of
	// resource group identifiers.
	ResourceGroupID *string

	// Filters the collection to VPN gateways with the specified mode.
	Mode *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

// Constants associated with the ListVPNGatewaysOptions.Mode property.
// Filters the collection to VPN gateways with the specified mode.
const (
	ListVPNGatewaysOptionsModePolicyConst = "policy"
	ListVPNGatewaysOptionsModeRouteConst  = "route"
)

// NewListVPNGatewaysOptions : Instantiate ListVPNGatewaysOptions
func (*VpcV1) NewListVPNGatewaysOptions() *ListVPNGatewaysOptions {
	return &ListVPNGatewaysOptions{}
}

// SetStart : Allow user to set Start
func (options *ListVPNGatewaysOptions) SetStart(start string) *ListVPNGatewaysOptions {
	options.Start = core.StringPtr(start)
	return options
}

// SetLimit : Allow user to set Limit
func (options *ListVPNGatewaysOptions) SetLimit(limit int64) *ListVPNGatewaysOptions {
	options.Limit = core.Int64Ptr(limit)
	return options
}

// SetResourceGroupID : Allow user to set ResourceGroupID
func (options *ListVPNGatewaysOptions) SetResourceGroupID(resourceGroupID string) *ListVPNGatewaysOptions {
	options.ResourceGroupID = core.StringPtr(resourceGroupID)
	return options
}

// SetMode : Allow user to set Mode
func (options *ListVPNGatewaysOptions) SetMode(mode string) *ListVPNGatewaysOptions {
	options.Mode = core.StringPtr(mode)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ListVPNGatewaysOptions) SetHeaders(param map[string]string) *ListVPNGatewaysOptions {
	options.Headers = param
	return options
}

// LoadBalancer : LoadBalancer struct
type LoadBalancer struct {
	// The date and time that this load balancer was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The load balancer's CRN.
	CRN *string `json:"crn" validate:"required"`

	// Fully qualified domain name assigned to this load balancer.
	Hostname *string `json:"hostname" validate:"required"`

	// The load balancer's canonical URL.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this load balancer.
	ID *string `json:"id" validate:"required"`

	// The type of this load balancer, public or private.
	IsPublic *bool `json:"is_public" validate:"required"`

	// The listeners of this load balancer.
	Listeners []LoadBalancerListenerReference `json:"listeners" validate:"required"`

	// The logging configuration for this load balancer.
	Logging *LoadBalancerLogging `json:"logging" validate:"required"`

	// The unique user-defined name for this load balancer.
	Name *string `json:"name" validate:"required"`

	// The operating status of this load balancer.
	OperatingStatus *string `json:"operating_status" validate:"required"`

	// The pools of this load balancer.
	Pools []LoadBalancerPoolReference `json:"pools" validate:"required"`

	// The private IP addresses assigned to this load balancer.
	PrivateIps []IP `json:"private_ips" validate:"required"`

	// The profile to use for this load balancer.
	Profile *LoadBalancerProfileReference `json:"profile" validate:"required"`

	// The provisioning status of this load balancer.
	ProvisioningStatus *string `json:"provisioning_status" validate:"required"`

	// The public IP addresses assigned to this load balancer.
	//
	// Applicable only for public load balancers.
	PublicIps []IP `json:"public_ips" validate:"required"`

	// The resource group for this load balancer.
	ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`

	// The security groups targeting this load balancer.
	//
	// Applicable only for load balancers that support security groups.
	SecurityGroups []SecurityGroupReference `json:"security_groups" validate:"required"`

	// Indicates whether this load balancer supports security groups.
	SecurityGroupsSupported *bool `json:"security_groups_supported" validate:"required"`

	// The subnets this load balancer is part of.
	Subnets []SubnetReference `json:"subnets" validate:"required"`
}

// Constants associated with the LoadBalancer.OperatingStatus property.
// The operating status of this load balancer.
const (
	LoadBalancerOperatingStatusOfflineConst = "offline"
	LoadBalancerOperatingStatusOnlineConst  = "online"
)

// Constants associated with the LoadBalancer.ProvisioningStatus property.
// The provisioning status of this load balancer.
const (
	LoadBalancerProvisioningStatusActiveConst             = "active"
	LoadBalancerProvisioningStatusCreatePendingConst      = "create_pending"
	LoadBalancerProvisioningStatusDeletePendingConst      = "delete_pending"
	LoadBalancerProvisioningStatusFailedConst             = "failed"
	LoadBalancerProvisioningStatusMaintenancePendingConst = "maintenance_pending"
	LoadBalancerProvisioningStatusUpdatePendingConst      = "update_pending"
)

// UnmarshalLoadBalancer unmarshals an instance of LoadBalancer from the specified map of raw messages.
func UnmarshalLoadBalancer(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancer)
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "hostname", &obj.Hostname)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "is_public", &obj.IsPublic)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "listeners", &obj.Listeners, UnmarshalLoadBalancerListenerReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "logging", &obj.Logging, UnmarshalLoadBalancerLogging)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "operating_status", &obj.OperatingStatus)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "pools", &obj.Pools, UnmarshalLoadBalancerPoolReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "private_ips", &obj.PrivateIps, UnmarshalIP)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalLoadBalancerProfileReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "provisioning_status", &obj.ProvisioningStatus)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "public_ips", &obj.PublicIps, UnmarshalIP)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "security_groups_supported", &obj.SecurityGroupsSupported)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "subnets", &obj.Subnets, UnmarshalSubnetReference)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerCollection : LoadBalancerCollection struct
type LoadBalancerCollection struct {
	// Collection of load balancers.
	LoadBalancers []LoadBalancer `json:"load_balancers" validate:"required"`
}

// UnmarshalLoadBalancerCollection unmarshals an instance of LoadBalancerCollection from the specified map of raw messages.
func UnmarshalLoadBalancerCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerCollection)
	err = core.UnmarshalModel(m, "load_balancers", &obj.LoadBalancers, UnmarshalLoadBalancer)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerIdentity : Identifies a load balancer by a unique property.
// Models which "extend" this model:
// - LoadBalancerIdentityByID
// - LoadBalancerIdentityByCRN
// - LoadBalancerIdentityByHref
type LoadBalancerIdentity struct {
	// The unique identifier for this load balancer.
	ID *string `json:"id,omitempty"`

	// The load balancer's CRN.
	CRN *string `json:"crn,omitempty"`

	// The load balancer's canonical URL.
	Href *string `json:"href,omitempty"`
}

func (*LoadBalancerIdentity) isaLoadBalancerIdentity() bool {
	return true
}

type LoadBalancerIdentityIntf interface {
	isaLoadBalancerIdentity() bool
}

// UnmarshalLoadBalancerIdentity unmarshals an instance of LoadBalancerIdentity from the specified map of raw messages.
func UnmarshalLoadBalancerIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerIdentity)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerListener : LoadBalancerListener struct
type LoadBalancerListener struct {
	// If set to `true`, this listener will accept and forward PROXY protocol information. Supported by load balancers in
	// the `application` family (otherwise always `false`).
	AcceptProxyProtocol *bool `json:"accept_proxy_protocol" validate:"required"`

	// The certificate instance used for SSL termination. It is applicable only to `https`
	// protocol.
	CertificateInstance *CertificateInstanceReference `json:"certificate_instance,omitempty"`

	// The connection limit of the listener.
	ConnectionLimit *int64 `json:"connection_limit,omitempty"`

	// The date and time that this listener was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The default pool associated with the listener.
	DefaultPool *LoadBalancerPoolReference `json:"default_pool,omitempty"`

	// The listener's canonical URL.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this load balancer listener.
	ID *string `json:"id" validate:"required"`

	// An array of policies for this listener.
	Policies []LoadBalancerListenerPolicyReference `json:"policies,omitempty"`

	// The listener port number, or the inclusive lower bound of the port range. Each listener in the load balancer must
	// have a unique `port` and `protocol` combination.
	Port *int64 `json:"port" validate:"required"`

	// The listener protocol. Load balancers in the `network` family support `tcp`. Load balancers in the `application`
	// family support `tcp`, `http`, and `https`. Each listener in the load balancer must have a unique `port` and
	// `protocol` combination.
	Protocol *string `json:"protocol" validate:"required"`

	// The provisioning status of this listener.
	ProvisioningStatus *string `json:"provisioning_status" validate:"required"`
}

// Constants associated with the LoadBalancerListener.Protocol property.
// The listener protocol. Load balancers in the `network` family support `tcp`. Load balancers in the `application`
// family support `tcp`, `http`, and `https`. Each listener in the load balancer must have a unique `port` and
// `protocol` combination.
const (
	LoadBalancerListenerProtocolHTTPConst  = "http"
	LoadBalancerListenerProtocolHTTPSConst = "https"
	LoadBalancerListenerProtocolTCPConst   = "tcp"
)

// Constants associated with the LoadBalancerListener.ProvisioningStatus property.
// The provisioning status of this listener.
const (
	LoadBalancerListenerProvisioningStatusActiveConst             = "active"
	LoadBalancerListenerProvisioningStatusCreatePendingConst      = "create_pending"
	LoadBalancerListenerProvisioningStatusDeletePendingConst      = "delete_pending"
	LoadBalancerListenerProvisioningStatusFailedConst             = "failed"
	LoadBalancerListenerProvisioningStatusMaintenancePendingConst = "maintenance_pending"
	LoadBalancerListenerProvisioningStatusUpdatePendingConst      = "update_pending"
)

// UnmarshalLoadBalancerListener unmarshals an instance of LoadBalancerListener from the specified map of raw messages.
func UnmarshalLoadBalancerListener(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerListener)
	err = core.UnmarshalPrimitive(m, "accept_proxy_protocol", &obj.AcceptProxyProtocol)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "certificate_instance", &obj.CertificateInstance, UnmarshalCertificateInstanceReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "connection_limit", &obj.ConnectionLimit)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "default_pool", &obj.DefaultPool, UnmarshalLoadBalancerPoolReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "policies", &obj.Policies, UnmarshalLoadBalancerListenerPolicyReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "port", &obj.Port)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "provisioning_status", &obj.ProvisioningStatus)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerListenerCollection : LoadBalancerListenerCollection struct
type LoadBalancerListenerCollection struct {
	// Collection of listeners.
	Listeners []LoadBalancerListener `json:"listeners" validate:"required"`
}

// UnmarshalLoadBalancerListenerCollection unmarshals an instance of LoadBalancerListenerCollection from the specified map of raw messages.
func UnmarshalLoadBalancerListenerCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerListenerCollection)
	err = core.UnmarshalModel(m, "listeners", &obj.Listeners, UnmarshalLoadBalancerListener)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerListenerPatch : LoadBalancerListenerPatch struct
type LoadBalancerListenerPatch struct {
	// If set to `true`, this listener will accept and forward PROXY protocol information. Supported by load balancers in
	// the `application` family (otherwise always `false`).
	AcceptProxyProtocol *bool `json:"accept_proxy_protocol,omitempty"`

	// The certificate instance used for SSL termination. It is applicable only to `https`
	// protocol.
	CertificateInstance CertificateInstanceIdentityIntf `json:"certificate_instance,omitempty"`

	// The connection limit of the listener.
	ConnectionLimit *int64 `json:"connection_limit,omitempty"`

	// The default pool associated with the listener. The specified pool must:
	//
	// - Belong to this load balancer
	// - Have the same `protocol` as this listener
	// - Not already be the default pool for another listener.
	DefaultPool LoadBalancerPoolIdentityIntf `json:"default_pool,omitempty"`

	// The listener port number, or the inclusive lower bound of the port range. Each listener in the load balancer must
	// have a unique `port` and `protocol` combination.
	Port *int64 `json:"port,omitempty"`

	// The listener protocol. Load balancers in the `network` family support `tcp`. Load balancers in the `application`
	// family support `tcp`, `http`, and `https`. Each listener in the load balancer must have a unique `port` and
	// `protocol` combination.
	Protocol *string `json:"protocol,omitempty"`
}

// Constants associated with the LoadBalancerListenerPatch.Protocol property.
// The listener protocol. Load balancers in the `network` family support `tcp`. Load balancers in the `application`
// family support `tcp`, `http`, and `https`. Each listener in the load balancer must have a unique `port` and
// `protocol` combination.
const (
	LoadBalancerListenerPatchProtocolHTTPConst  = "http"
	LoadBalancerListenerPatchProtocolHTTPSConst = "https"
	LoadBalancerListenerPatchProtocolTCPConst   = "tcp"
)

// UnmarshalLoadBalancerListenerPatch unmarshals an instance of LoadBalancerListenerPatch from the specified map of raw messages.
func UnmarshalLoadBalancerListenerPatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerListenerPatch)
	err = core.UnmarshalPrimitive(m, "accept_proxy_protocol", &obj.AcceptProxyProtocol)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "certificate_instance", &obj.CertificateInstance, UnmarshalCertificateInstanceIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "connection_limit", &obj.ConnectionLimit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "default_pool", &obj.DefaultPool, UnmarshalLoadBalancerPoolIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "port", &obj.Port)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the LoadBalancerListenerPatch
func (loadBalancerListenerPatch *LoadBalancerListenerPatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(loadBalancerListenerPatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// LoadBalancerListenerPolicy : LoadBalancerListenerPolicy struct
type LoadBalancerListenerPolicy struct {
	// The policy action.
	Action *string `json:"action" validate:"required"`

	// The date and time that this policy was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The listener policy's canonical URL.
	Href *string `json:"href" validate:"required"`

	// The policy's unique identifier.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this policy.
	Name *string `json:"name" validate:"required"`

	// Priority of the policy. Lower value indicates higher priority.
	Priority *int64 `json:"priority" validate:"required"`

	// The provisioning status of this policy.
	ProvisioningStatus *string `json:"provisioning_status" validate:"required"`

	// The rules of this policy.
	Rules []LoadBalancerListenerPolicyRuleReference `json:"rules" validate:"required"`

	// `LoadBalancerPoolReference` is in the response if `action` is `forward`.
	// `LoadBalancerListenerPolicyRedirectURL` is in the response if `action` is `redirect`.
	Target LoadBalancerListenerPolicyTargetIntf `json:"target,omitempty"`
}

// Constants associated with the LoadBalancerListenerPolicy.Action property.
// The policy action.
const (
	LoadBalancerListenerPolicyActionForwardConst  = "forward"
	LoadBalancerListenerPolicyActionRedirectConst = "redirect"
	LoadBalancerListenerPolicyActionRejectConst   = "reject"
)

// Constants associated with the LoadBalancerListenerPolicy.ProvisioningStatus property.
// The provisioning status of this policy.
const (
	LoadBalancerListenerPolicyProvisioningStatusActiveConst             = "active"
	LoadBalancerListenerPolicyProvisioningStatusCreatePendingConst      = "create_pending"
	LoadBalancerListenerPolicyProvisioningStatusDeletePendingConst      = "delete_pending"
	LoadBalancerListenerPolicyProvisioningStatusFailedConst             = "failed"
	LoadBalancerListenerPolicyProvisioningStatusMaintenancePendingConst = "maintenance_pending"
	LoadBalancerListenerPolicyProvisioningStatusUpdatePendingConst      = "update_pending"
)

// UnmarshalLoadBalancerListenerPolicy unmarshals an instance of LoadBalancerListenerPolicy from the specified map of raw messages.
func UnmarshalLoadBalancerListenerPolicy(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerListenerPolicy)
	err = core.UnmarshalPrimitive(m, "action", &obj.Action)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "priority", &obj.Priority)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "provisioning_status", &obj.ProvisioningStatus)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "rules", &obj.Rules, UnmarshalLoadBalancerListenerPolicyRuleReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalLoadBalancerListenerPolicyTarget)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerListenerPolicyCollection : LoadBalancerListenerPolicyCollection struct
type LoadBalancerListenerPolicyCollection struct {
	// Collection of policies.
	Policies []LoadBalancerListenerPolicy `json:"policies" validate:"required"`
}

// UnmarshalLoadBalancerListenerPolicyCollection unmarshals an instance of LoadBalancerListenerPolicyCollection from the specified map of raw messages.
func UnmarshalLoadBalancerListenerPolicyCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerListenerPolicyCollection)
	err = core.UnmarshalModel(m, "policies", &obj.Policies, UnmarshalLoadBalancerListenerPolicy)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerListenerPolicyPatch : LoadBalancerListenerPolicyPatch struct
type LoadBalancerListenerPolicyPatch struct {
	// The user-defined name for this policy. Names must be unique within the load balancer listener the policy resides in.
	Name *string `json:"name,omitempty"`

	// Priority of the policy. Lower value indicates higher priority.
	Priority *int64 `json:"priority,omitempty"`

	// When `action` is `forward`, `LoadBalancerPoolIdentity` specifies which pool the load
	// balancer forwards the traffic to. When `action` is `redirect`,
	// `LoadBalancerListenerPolicyRedirectURLPatch` specifies the url and http
	// status code used in the redirect response.
	Target LoadBalancerListenerPolicyTargetPatchIntf `json:"target,omitempty"`
}

// UnmarshalLoadBalancerListenerPolicyPatch unmarshals an instance of LoadBalancerListenerPolicyPatch from the specified map of raw messages.
func UnmarshalLoadBalancerListenerPolicyPatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerListenerPolicyPatch)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "priority", &obj.Priority)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalLoadBalancerListenerPolicyTargetPatch)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the LoadBalancerListenerPolicyPatch
func (loadBalancerListenerPolicyPatch *LoadBalancerListenerPolicyPatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(loadBalancerListenerPolicyPatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// LoadBalancerListenerPolicyPrototype : LoadBalancerListenerPolicyPrototype struct
type LoadBalancerListenerPolicyPrototype struct {
	// The policy action.
	Action *string `json:"action" validate:"required"`

	// The user-defined name for this policy. Names must be unique within the load balancer listener the policy resides in.
	Name *string `json:"name,omitempty"`

	// Priority of the policy. Lower value indicates higher priority.
	Priority *int64 `json:"priority" validate:"required"`

	// An array of rules for this policy.
	Rules []LoadBalancerListenerPolicyRulePrototype `json:"rules,omitempty"`

	// When `action` is `forward`, `LoadBalancerPoolIdentity` is required to specify which
	// pool the load balancer forwards the traffic to. When `action` is `redirect`,
	// `LoadBalancerListenerPolicyRedirectURLPrototype` is required to specify the url and
	// http status code used in the redirect response.
	Target LoadBalancerListenerPolicyTargetPrototypeIntf `json:"target,omitempty"`
}

// Constants associated with the LoadBalancerListenerPolicyPrototype.Action property.
// The policy action.
const (
	LoadBalancerListenerPolicyPrototypeActionForwardConst  = "forward"
	LoadBalancerListenerPolicyPrototypeActionRedirectConst = "redirect"
	LoadBalancerListenerPolicyPrototypeActionRejectConst   = "reject"
)

// NewLoadBalancerListenerPolicyPrototype : Instantiate LoadBalancerListenerPolicyPrototype (Generic Model Constructor)
func (*VpcV1) NewLoadBalancerListenerPolicyPrototype(action string, priority int64) (model *LoadBalancerListenerPolicyPrototype, err error) {
	model = &LoadBalancerListenerPolicyPrototype{
		Action:   core.StringPtr(action),
		Priority: core.Int64Ptr(priority),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

// UnmarshalLoadBalancerListenerPolicyPrototype unmarshals an instance of LoadBalancerListenerPolicyPrototype from the specified map of raw messages.
func UnmarshalLoadBalancerListenerPolicyPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerListenerPolicyPrototype)
	err = core.UnmarshalPrimitive(m, "action", &obj.Action)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "priority", &obj.Priority)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "rules", &obj.Rules, UnmarshalLoadBalancerListenerPolicyRulePrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalLoadBalancerListenerPolicyTargetPrototype)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerListenerPolicyReference : LoadBalancerListenerPolicyReference struct
type LoadBalancerListenerPolicyReference struct {
	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *LoadBalancerListenerPolicyReferenceDeleted `json:"deleted,omitempty"`

	// The listener policy's canonical URL.
	Href *string `json:"href" validate:"required"`

	// The policy's unique identifier.
	ID *string `json:"id" validate:"required"`
}

// UnmarshalLoadBalancerListenerPolicyReference unmarshals an instance of LoadBalancerListenerPolicyReference from the specified map of raw messages.
func UnmarshalLoadBalancerListenerPolicyReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerListenerPolicyReference)
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalLoadBalancerListenerPolicyReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerListenerPolicyReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type LoadBalancerListenerPolicyReferenceDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalLoadBalancerListenerPolicyReferenceDeleted unmarshals an instance of LoadBalancerListenerPolicyReferenceDeleted from the specified map of raw messages.
func UnmarshalLoadBalancerListenerPolicyReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerListenerPolicyReferenceDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerListenerPolicyRule : LoadBalancerListenerPolicyRule struct
type LoadBalancerListenerPolicyRule struct {
	// The condition of the rule.
	Condition *string `json:"condition" validate:"required"`

	// The date and time that this rule was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The field. This is applicable to `header`, `query`, and `body` rule types.
	//
	// If the rule type is `header`, this field is required.
	//
	// If the rule type is `query`, this is optional. If specified and the rule condition is not
	// `matches_regex`, the value must be percent-encoded.
	//
	// If the rule type is `body`, this is optional.
	Field *string `json:"field,omitempty"`

	// The rule's canonical URL.
	Href *string `json:"href" validate:"required"`

	// The rule's unique identifier.
	ID *string `json:"id" validate:"required"`

	// The provisioning status of this rule.
	ProvisioningStatus *string `json:"provisioning_status" validate:"required"`

	// The type of the rule.
	//
	// Body rules are applied to form-encoded request bodies using the `UTF-8` character set.
	Type *string `json:"type" validate:"required"`

	// Value to be matched for rule condition.
	//
	// If the rule type is `query` and the rule condition is not `matches_regex`, the value must be percent-encoded.
	Value *string `json:"value" validate:"required"`
}

// Constants associated with the LoadBalancerListenerPolicyRule.Condition property.
// The condition of the rule.
const (
	LoadBalancerListenerPolicyRuleConditionContainsConst     = "contains"
	LoadBalancerListenerPolicyRuleConditionEqualsConst       = "equals"
	LoadBalancerListenerPolicyRuleConditionMatchesRegexConst = "matches_regex"
)

// Constants associated with the LoadBalancerListenerPolicyRule.ProvisioningStatus property.
// The provisioning status of this rule.
const (
	LoadBalancerListenerPolicyRuleProvisioningStatusActiveConst             = "active"
	LoadBalancerListenerPolicyRuleProvisioningStatusCreatePendingConst      = "create_pending"
	LoadBalancerListenerPolicyRuleProvisioningStatusDeletePendingConst      = "delete_pending"
	LoadBalancerListenerPolicyRuleProvisioningStatusFailedConst             = "failed"
	LoadBalancerListenerPolicyRuleProvisioningStatusMaintenancePendingConst = "maintenance_pending"
	LoadBalancerListenerPolicyRuleProvisioningStatusUpdatePendingConst      = "update_pending"
)

// Constants associated with the LoadBalancerListenerPolicyRule.Type property.
// The type of the rule.
//
// Body rules are applied to form-encoded request bodies using the `UTF-8` character set.
const (
	LoadBalancerListenerPolicyRuleTypeBodyConst     = "body"
	LoadBalancerListenerPolicyRuleTypeHeaderConst   = "header"
	LoadBalancerListenerPolicyRuleTypeHostnameConst = "hostname"
	LoadBalancerListenerPolicyRuleTypePathConst     = "path"
	LoadBalancerListenerPolicyRuleTypeQueryConst    = "query"
)

// UnmarshalLoadBalancerListenerPolicyRule unmarshals an instance of LoadBalancerListenerPolicyRule from the specified map of raw messages.
func UnmarshalLoadBalancerListenerPolicyRule(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerListenerPolicyRule)
	err = core.UnmarshalPrimitive(m, "condition", &obj.Condition)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "field", &obj.Field)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "provisioning_status", &obj.ProvisioningStatus)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "value", &obj.Value)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerListenerPolicyRuleCollection : LoadBalancerListenerPolicyRuleCollection struct
type LoadBalancerListenerPolicyRuleCollection struct {
	// Collection of rules.
	Rules []LoadBalancerListenerPolicyRule `json:"rules" validate:"required"`
}

// UnmarshalLoadBalancerListenerPolicyRuleCollection unmarshals an instance of LoadBalancerListenerPolicyRuleCollection from the specified map of raw messages.
func UnmarshalLoadBalancerListenerPolicyRuleCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerListenerPolicyRuleCollection)
	err = core.UnmarshalModel(m, "rules", &obj.Rules, UnmarshalLoadBalancerListenerPolicyRule)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerListenerPolicyRulePatch : LoadBalancerListenerPolicyRulePatch struct
type LoadBalancerListenerPolicyRulePatch struct {
	// The condition of the rule.
	Condition *string `json:"condition,omitempty"`

	// The field. This is applicable to `header`, `query`, and `body` rule types.
	//
	// If the rule type is `header`, this field is required.
	//
	// If the rule type is `query`, this is optional. If specified and the rule condition is not
	// `matches_regex`, the value must be percent-encoded.
	//
	// If the rule type is `body`, this is optional.
	Field *string `json:"field,omitempty"`

	// The type of the rule.
	//
	// Body rules are applied to form-encoded request bodies using the `UTF-8` character set.
	Type *string `json:"type,omitempty"`

	// Value to be matched for rule condition.
	//
	// If the rule type is `query` and the rule condition is not `matches_regex`, the value must be percent-encoded.
	Value *string `json:"value,omitempty"`
}

// Constants associated with the LoadBalancerListenerPolicyRulePatch.Condition property.
// The condition of the rule.
const (
	LoadBalancerListenerPolicyRulePatchConditionContainsConst     = "contains"
	LoadBalancerListenerPolicyRulePatchConditionEqualsConst       = "equals"
	LoadBalancerListenerPolicyRulePatchConditionMatchesRegexConst = "matches_regex"
)

// Constants associated with the LoadBalancerListenerPolicyRulePatch.Type property.
// The type of the rule.
//
// Body rules are applied to form-encoded request bodies using the `UTF-8` character set.
const (
	LoadBalancerListenerPolicyRulePatchTypeBodyConst     = "body"
	LoadBalancerListenerPolicyRulePatchTypeHeaderConst   = "header"
	LoadBalancerListenerPolicyRulePatchTypeHostnameConst = "hostname"
	LoadBalancerListenerPolicyRulePatchTypePathConst     = "path"
	LoadBalancerListenerPolicyRulePatchTypeQueryConst    = "query"
)

// UnmarshalLoadBalancerListenerPolicyRulePatch unmarshals an instance of LoadBalancerListenerPolicyRulePatch from the specified map of raw messages.
func UnmarshalLoadBalancerListenerPolicyRulePatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerListenerPolicyRulePatch)
	err = core.UnmarshalPrimitive(m, "condition", &obj.Condition)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "field", &obj.Field)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "value", &obj.Value)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the LoadBalancerListenerPolicyRulePatch
func (loadBalancerListenerPolicyRulePatch *LoadBalancerListenerPolicyRulePatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(loadBalancerListenerPolicyRulePatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// LoadBalancerListenerPolicyRulePrototype : LoadBalancerListenerPolicyRulePrototype struct
type LoadBalancerListenerPolicyRulePrototype struct {
	// The condition of the rule.
	Condition *string `json:"condition" validate:"required"`

	// The field. This is applicable to `header`, `query`, and `body` rule types.
	//
	// If the rule type is `header`, this field is required.
	//
	// If the rule type is `query`, this is optional. If specified and the rule condition is not
	// `matches_regex`, the value must be percent-encoded.
	//
	// If the rule type is `body`, this is optional.
	Field *string `json:"field,omitempty"`

	// The type of the rule.
	//
	// Body rules are applied to form-encoded request bodies using the `UTF-8` character set.
	Type *string `json:"type" validate:"required"`

	// Value to be matched for rule condition.
	//
	// If the rule type is `query` and the rule condition is not `matches_regex`, the value must be percent-encoded.
	Value *string `json:"value" validate:"required"`
}

// Constants associated with the LoadBalancerListenerPolicyRulePrototype.Condition property.
// The condition of the rule.
const (
	LoadBalancerListenerPolicyRulePrototypeConditionContainsConst     = "contains"
	LoadBalancerListenerPolicyRulePrototypeConditionEqualsConst       = "equals"
	LoadBalancerListenerPolicyRulePrototypeConditionMatchesRegexConst = "matches_regex"
)

// Constants associated with the LoadBalancerListenerPolicyRulePrototype.Type property.
// The type of the rule.
//
// Body rules are applied to form-encoded request bodies using the `UTF-8` character set.
const (
	LoadBalancerListenerPolicyRulePrototypeTypeBodyConst     = "body"
	LoadBalancerListenerPolicyRulePrototypeTypeHeaderConst   = "header"
	LoadBalancerListenerPolicyRulePrototypeTypeHostnameConst = "hostname"
	LoadBalancerListenerPolicyRulePrototypeTypePathConst     = "path"
	LoadBalancerListenerPolicyRulePrototypeTypeQueryConst    = "query"
)

// NewLoadBalancerListenerPolicyRulePrototype : Instantiate LoadBalancerListenerPolicyRulePrototype (Generic Model Constructor)
func (*VpcV1) NewLoadBalancerListenerPolicyRulePrototype(condition string, typeVar string, value string) (model *LoadBalancerListenerPolicyRulePrototype, err error) {
	model = &LoadBalancerListenerPolicyRulePrototype{
		Condition: core.StringPtr(condition),
		Type:      core.StringPtr(typeVar),
		Value:     core.StringPtr(value),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

// UnmarshalLoadBalancerListenerPolicyRulePrototype unmarshals an instance of LoadBalancerListenerPolicyRulePrototype from the specified map of raw messages.
func UnmarshalLoadBalancerListenerPolicyRulePrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerListenerPolicyRulePrototype)
	err = core.UnmarshalPrimitive(m, "condition", &obj.Condition)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "field", &obj.Field)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "value", &obj.Value)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerListenerPolicyRuleReference : LoadBalancerListenerPolicyRuleReference struct
type LoadBalancerListenerPolicyRuleReference struct {
	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *LoadBalancerListenerPolicyRuleReferenceDeleted `json:"deleted,omitempty"`

	// The rule's canonical URL.
	Href *string `json:"href" validate:"required"`

	// The rule's unique identifier.
	ID *string `json:"id" validate:"required"`
}

// UnmarshalLoadBalancerListenerPolicyRuleReference unmarshals an instance of LoadBalancerListenerPolicyRuleReference from the specified map of raw messages.
func UnmarshalLoadBalancerListenerPolicyRuleReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerListenerPolicyRuleReference)
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalLoadBalancerListenerPolicyRuleReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerListenerPolicyRuleReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type LoadBalancerListenerPolicyRuleReferenceDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalLoadBalancerListenerPolicyRuleReferenceDeleted unmarshals an instance of LoadBalancerListenerPolicyRuleReferenceDeleted from the specified map of raw messages.
func UnmarshalLoadBalancerListenerPolicyRuleReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerListenerPolicyRuleReferenceDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerListenerPolicyTarget : `LoadBalancerPoolReference` is in the response if `action` is `forward`.
// `LoadBalancerListenerPolicyRedirectURL` is in the response if `action` is `redirect`.
// Models which "extend" this model:
// - LoadBalancerListenerPolicyTargetLoadBalancerPoolReference
// - LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL
type LoadBalancerListenerPolicyTarget struct {
	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *LoadBalancerPoolReferenceDeleted `json:"deleted,omitempty"`

	// The pool's canonical URL.
	Href *string `json:"href,omitempty"`

	// The unique identifier for this load balancer pool.
	ID *string `json:"id,omitempty"`

	// The user-defined name for this load balancer pool.
	Name *string `json:"name,omitempty"`

	// The http status code in the redirect response.
	HTTPStatusCode *int64 `json:"http_status_code,omitempty"`

	// The redirect target URL.
	URL *string `json:"url,omitempty"`
}

func (*LoadBalancerListenerPolicyTarget) isaLoadBalancerListenerPolicyTarget() bool {
	return true
}

type LoadBalancerListenerPolicyTargetIntf interface {
	isaLoadBalancerListenerPolicyTarget() bool
}

// UnmarshalLoadBalancerListenerPolicyTarget unmarshals an instance of LoadBalancerListenerPolicyTarget from the specified map of raw messages.
func UnmarshalLoadBalancerListenerPolicyTarget(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerListenerPolicyTarget)
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalLoadBalancerPoolReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "http_status_code", &obj.HTTPStatusCode)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "url", &obj.URL)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerListenerPolicyTargetPatch : When `action` is `forward`, `LoadBalancerPoolIdentity` specifies which pool the load balancer forwards the traffic
// to. When `action` is `redirect`,
// `LoadBalancerListenerPolicyRedirectURLPatch` specifies the url and http status code used in the redirect response.
// Models which "extend" this model:
// - LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity
// - LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch
type LoadBalancerListenerPolicyTargetPatch struct {
	// The unique identifier for this load balancer pool.
	ID *string `json:"id,omitempty"`

	// The pool's canonical URL.
	Href *string `json:"href,omitempty"`

	// The http status code in the redirect response.
	HTTPStatusCode *int64 `json:"http_status_code,omitempty"`

	// The redirect target URL.
	URL *string `json:"url,omitempty"`
}

func (*LoadBalancerListenerPolicyTargetPatch) isaLoadBalancerListenerPolicyTargetPatch() bool {
	return true
}

type LoadBalancerListenerPolicyTargetPatchIntf interface {
	isaLoadBalancerListenerPolicyTargetPatch() bool
}

// UnmarshalLoadBalancerListenerPolicyTargetPatch unmarshals an instance of LoadBalancerListenerPolicyTargetPatch from the specified map of raw messages.
func UnmarshalLoadBalancerListenerPolicyTargetPatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerListenerPolicyTargetPatch)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "http_status_code", &obj.HTTPStatusCode)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "url", &obj.URL)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerListenerPolicyTargetPrototype : When `action` is `forward`, `LoadBalancerPoolIdentity` is required to specify which pool the load balancer forwards
// the traffic to. When `action` is `redirect`,
// `LoadBalancerListenerPolicyRedirectURLPrototype` is required to specify the url and http status code used in the
// redirect response.
// Models which "extend" this model:
// - LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity
// - LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype
type LoadBalancerListenerPolicyTargetPrototype struct {
	// The unique identifier for this load balancer pool.
	ID *string `json:"id,omitempty"`

	// The pool's canonical URL.
	Href *string `json:"href,omitempty"`

	// The http status code in the redirect response.
	HTTPStatusCode *int64 `json:"http_status_code,omitempty"`

	// The redirect target URL.
	URL *string `json:"url,omitempty"`
}

func (*LoadBalancerListenerPolicyTargetPrototype) isaLoadBalancerListenerPolicyTargetPrototype() bool {
	return true
}

type LoadBalancerListenerPolicyTargetPrototypeIntf interface {
	isaLoadBalancerListenerPolicyTargetPrototype() bool
}

// UnmarshalLoadBalancerListenerPolicyTargetPrototype unmarshals an instance of LoadBalancerListenerPolicyTargetPrototype from the specified map of raw messages.
func UnmarshalLoadBalancerListenerPolicyTargetPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerListenerPolicyTargetPrototype)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "http_status_code", &obj.HTTPStatusCode)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "url", &obj.URL)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerListenerPrototypeLoadBalancerContext : LoadBalancerListenerPrototypeLoadBalancerContext struct
type LoadBalancerListenerPrototypeLoadBalancerContext struct {
	// If set to `true`, this listener will accept and forward PROXY protocol information. Supported by load balancers in
	// the `application` family (otherwise always `false`).
	AcceptProxyProtocol *bool `json:"accept_proxy_protocol,omitempty"`

	// The connection limit of the listener.
	ConnectionLimit *int64 `json:"connection_limit,omitempty"`

	// The default pool associated with the listener.
	DefaultPool *LoadBalancerPoolIdentityByName `json:"default_pool,omitempty"`

	// The listener port number, or the inclusive lower bound of the port range. Each listener in the load balancer must
	// have a unique `port` and `protocol` combination.
	Port *int64 `json:"port" validate:"required"`

	// The listener protocol. Load balancers in the `network` family support `tcp`. Load balancers in the `application`
	// family support `tcp`, `http`, and `https`. Each listener in the load balancer must have a unique `port` and
	// `protocol` combination.
	Protocol *string `json:"protocol" validate:"required"`
}

// Constants associated with the LoadBalancerListenerPrototypeLoadBalancerContext.Protocol property.
// The listener protocol. Load balancers in the `network` family support `tcp`. Load balancers in the `application`
// family support `tcp`, `http`, and `https`. Each listener in the load balancer must have a unique `port` and
// `protocol` combination.
const (
	LoadBalancerListenerPrototypeLoadBalancerContextProtocolHTTPConst  = "http"
	LoadBalancerListenerPrototypeLoadBalancerContextProtocolHTTPSConst = "https"
	LoadBalancerListenerPrototypeLoadBalancerContextProtocolTCPConst   = "tcp"
)

// NewLoadBalancerListenerPrototypeLoadBalancerContext : Instantiate LoadBalancerListenerPrototypeLoadBalancerContext (Generic Model Constructor)
func (*VpcV1) NewLoadBalancerListenerPrototypeLoadBalancerContext(port int64, protocol string) (model *LoadBalancerListenerPrototypeLoadBalancerContext, err error) {
	model = &LoadBalancerListenerPrototypeLoadBalancerContext{
		Port:     core.Int64Ptr(port),
		Protocol: core.StringPtr(protocol),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

// UnmarshalLoadBalancerListenerPrototypeLoadBalancerContext unmarshals an instance of LoadBalancerListenerPrototypeLoadBalancerContext from the specified map of raw messages.
func UnmarshalLoadBalancerListenerPrototypeLoadBalancerContext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerListenerPrototypeLoadBalancerContext)
	err = core.UnmarshalPrimitive(m, "accept_proxy_protocol", &obj.AcceptProxyProtocol)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "connection_limit", &obj.ConnectionLimit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "default_pool", &obj.DefaultPool, UnmarshalLoadBalancerPoolIdentityByName)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "port", &obj.Port)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerListenerReference : LoadBalancerListenerReference struct
type LoadBalancerListenerReference struct {
	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *LoadBalancerListenerReferenceDeleted `json:"deleted,omitempty"`

	// The listener's canonical URL.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this load balancer listener.
	ID *string `json:"id" validate:"required"`
}

// UnmarshalLoadBalancerListenerReference unmarshals an instance of LoadBalancerListenerReference from the specified map of raw messages.
func UnmarshalLoadBalancerListenerReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerListenerReference)
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalLoadBalancerListenerReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerListenerReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type LoadBalancerListenerReferenceDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalLoadBalancerListenerReferenceDeleted unmarshals an instance of LoadBalancerListenerReferenceDeleted from the specified map of raw messages.
func UnmarshalLoadBalancerListenerReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerListenerReferenceDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerLogging : The logging configuration for this load balancer.
type LoadBalancerLogging struct {
	// The datapath logging configuration for this load balancer.
	Datapath *LoadBalancerLoggingDatapath `json:"datapath,omitempty"`
}

// UnmarshalLoadBalancerLogging unmarshals an instance of LoadBalancerLogging from the specified map of raw messages.
func UnmarshalLoadBalancerLogging(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerLogging)
	err = core.UnmarshalModel(m, "datapath", &obj.Datapath, UnmarshalLoadBalancerLoggingDatapath)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerLoggingDatapath : The datapath logging configuration for this load balancer.
type LoadBalancerLoggingDatapath struct {
	// If set to `true`, datapath logging is active for this load balancer.
	Active *bool `json:"active" validate:"required"`
}

// NewLoadBalancerLoggingDatapath : Instantiate LoadBalancerLoggingDatapath (Generic Model Constructor)
func (*VpcV1) NewLoadBalancerLoggingDatapath(active bool) (model *LoadBalancerLoggingDatapath, err error) {
	model = &LoadBalancerLoggingDatapath{
		Active: core.BoolPtr(active),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

// UnmarshalLoadBalancerLoggingDatapath unmarshals an instance of LoadBalancerLoggingDatapath from the specified map of raw messages.
func UnmarshalLoadBalancerLoggingDatapath(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerLoggingDatapath)
	err = core.UnmarshalPrimitive(m, "active", &obj.Active)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerPatch : LoadBalancerPatch struct
type LoadBalancerPatch struct {
	// The logging configuration to use for this load balancer.
	//
	// To activate logging, the load balancer profile must support the specified logging type.
	Logging *LoadBalancerLogging `json:"logging,omitempty"`

	// The unique user-defined name for this load balancer.
	Name *string `json:"name,omitempty"`
}

// UnmarshalLoadBalancerPatch unmarshals an instance of LoadBalancerPatch from the specified map of raw messages.
func UnmarshalLoadBalancerPatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerPatch)
	err = core.UnmarshalModel(m, "logging", &obj.Logging, UnmarshalLoadBalancerLogging)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the LoadBalancerPatch
func (loadBalancerPatch *LoadBalancerPatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(loadBalancerPatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// LoadBalancerPool : LoadBalancerPool struct
type LoadBalancerPool struct {
	// The load balancing algorithm.
	Algorithm *string `json:"algorithm" validate:"required"`

	// The date and time that this pool was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The health monitor of this pool.
	HealthMonitor *LoadBalancerPoolHealthMonitor `json:"health_monitor" validate:"required"`

	// The pool's canonical URL.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this load balancer pool.
	ID *string `json:"id" validate:"required"`

	// The instance group that is managing this pool.
	InstanceGroup *InstanceGroupReference `json:"instance_group,omitempty"`

	// The backend server members of the pool.
	Members []LoadBalancerPoolMemberReference `json:"members,omitempty"`

	// The user-defined name for this load balancer pool.
	Name *string `json:"name" validate:"required"`

	// The protocol used for this load balancer pool.
	//
	// The enumerated values for this property are expected to expand in the future. When processing this property, check
	// for and log unknown values. Optionally halt processing and surface the error, or bypass the pool on which the
	// unexpected property value was encountered.
	Protocol *string `json:"protocol" validate:"required"`

	// The provisioning status of this pool.
	ProvisioningStatus *string `json:"provisioning_status" validate:"required"`

	// The PROXY protocol setting for this pool:
	// - `v1`: Enabled with version 1 (human-readable header format)
	// - `v2`: Enabled with version 2 (binary header format)
	// - `disabled`: Disabled
	//
	// Supported by load balancers in the `application` family (otherwise always `disabled`).
	ProxyProtocol *string `json:"proxy_protocol" validate:"required"`

	// The session persistence of this pool.
	//
	// The enumerated values for this property are expected to expand in the future. When
	// processing this property, check for and log unknown values. Optionally halt
	// processing and surface the error, or bypass the pool on which the unexpected
	// property value was encountered.
	SessionPersistence *LoadBalancerPoolSessionPersistence `json:"session_persistence,omitempty"`
}

// Constants associated with the LoadBalancerPool.Algorithm property.
// The load balancing algorithm.
const (
	LoadBalancerPoolAlgorithmLeastConnectionsConst   = "least_connections"
	LoadBalancerPoolAlgorithmRoundRobinConst         = "round_robin"
	LoadBalancerPoolAlgorithmWeightedRoundRobinConst = "weighted_round_robin"
)

// Constants associated with the LoadBalancerPool.Protocol property.
// The protocol used for this load balancer pool.
//
// The enumerated values for this property are expected to expand in the future. When processing this property, check
// for and log unknown values. Optionally halt processing and surface the error, or bypass the pool on which the
// unexpected property value was encountered.
const (
	LoadBalancerPoolProtocolHTTPConst  = "http"
	LoadBalancerPoolProtocolHTTPSConst = "https"
	LoadBalancerPoolProtocolTCPConst   = "tcp"
)

// Constants associated with the LoadBalancerPool.ProvisioningStatus property.
// The provisioning status of this pool.
const (
	LoadBalancerPoolProvisioningStatusActiveConst             = "active"
	LoadBalancerPoolProvisioningStatusCreatePendingConst      = "create_pending"
	LoadBalancerPoolProvisioningStatusDeletePendingConst      = "delete_pending"
	LoadBalancerPoolProvisioningStatusFailedConst             = "failed"
	LoadBalancerPoolProvisioningStatusMaintenancePendingConst = "maintenance_pending"
	LoadBalancerPoolProvisioningStatusUpdatePendingConst      = "update_pending"
)

// Constants associated with the LoadBalancerPool.ProxyProtocol property.
// The PROXY protocol setting for this pool:
// - `v1`: Enabled with version 1 (human-readable header format)
// - `v2`: Enabled with version 2 (binary header format)
// - `disabled`: Disabled
//
// Supported by load balancers in the `application` family (otherwise always `disabled`).
const (
	LoadBalancerPoolProxyProtocolDisabledConst = "disabled"
	LoadBalancerPoolProxyProtocolV1Const       = "v1"
	LoadBalancerPoolProxyProtocolV2Const       = "v2"
)

// UnmarshalLoadBalancerPool unmarshals an instance of LoadBalancerPool from the specified map of raw messages.
func UnmarshalLoadBalancerPool(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerPool)
	err = core.UnmarshalPrimitive(m, "algorithm", &obj.Algorithm)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "health_monitor", &obj.HealthMonitor, UnmarshalLoadBalancerPoolHealthMonitor)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "instance_group", &obj.InstanceGroup, UnmarshalInstanceGroupReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "members", &obj.Members, UnmarshalLoadBalancerPoolMemberReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "provisioning_status", &obj.ProvisioningStatus)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "proxy_protocol", &obj.ProxyProtocol)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "session_persistence", &obj.SessionPersistence, UnmarshalLoadBalancerPoolSessionPersistence)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerPoolCollection : LoadBalancerPoolCollection struct
type LoadBalancerPoolCollection struct {
	// Collection of pools.
	Pools []LoadBalancerPool `json:"pools" validate:"required"`
}

// UnmarshalLoadBalancerPoolCollection unmarshals an instance of LoadBalancerPoolCollection from the specified map of raw messages.
func UnmarshalLoadBalancerPoolCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerPoolCollection)
	err = core.UnmarshalModel(m, "pools", &obj.Pools, UnmarshalLoadBalancerPool)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerPoolHealthMonitor : LoadBalancerPoolHealthMonitor struct
type LoadBalancerPoolHealthMonitor struct {
	// The health check interval in seconds. Interval must be greater than timeout value.
	Delay *int64 `json:"delay" validate:"required"`

	// The health check max retries.
	MaxRetries *int64 `json:"max_retries" validate:"required"`

	// The health check port number. If specified, this overrides the ports specified in the server member resources.
	Port *int64 `json:"port,omitempty"`

	// The health check timeout in seconds.
	Timeout *int64 `json:"timeout" validate:"required"`

	// The protocol type of this load balancer pool health monitor.
	//
	// The enumerated values for this property are expected to expand in the future. When processing this property, check
	// for and log unknown values. Optionally halt processing and surface the error, or bypass the health monitor on which
	// the unexpected property value was encountered.
	Type *string `json:"type" validate:"required"`

	// The health check URL path. Applicable only if the health monitor `type` is `http` or
	// `https`. This value must be in the format of an [origin-form request
	// target](https://tools.ietf.org/html/rfc7230#section-5.3.1).
	URLPath *string `json:"url_path,omitempty"`
}

// Constants associated with the LoadBalancerPoolHealthMonitor.Type property.
// The protocol type of this load balancer pool health monitor.
//
// The enumerated values for this property are expected to expand in the future. When processing this property, check
// for and log unknown values. Optionally halt processing and surface the error, or bypass the health monitor on which
// the unexpected property value was encountered.
const (
	LoadBalancerPoolHealthMonitorTypeHTTPConst  = "http"
	LoadBalancerPoolHealthMonitorTypeHTTPSConst = "https"
	LoadBalancerPoolHealthMonitorTypeTCPConst   = "tcp"
)

// UnmarshalLoadBalancerPoolHealthMonitor unmarshals an instance of LoadBalancerPoolHealthMonitor from the specified map of raw messages.
func UnmarshalLoadBalancerPoolHealthMonitor(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerPoolHealthMonitor)
	err = core.UnmarshalPrimitive(m, "delay", &obj.Delay)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "max_retries", &obj.MaxRetries)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "port", &obj.Port)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "timeout", &obj.Timeout)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "url_path", &obj.URLPath)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerPoolHealthMonitorPatch : LoadBalancerPoolHealthMonitorPatch struct
type LoadBalancerPoolHealthMonitorPatch struct {
	// The health check interval in seconds. Interval must be greater than timeout value.
	Delay *int64 `json:"delay" validate:"required"`

	// The health check max retries.
	MaxRetries *int64 `json:"max_retries" validate:"required"`

	// The health check port number. If specified, this overrides the ports specified in the server member resources.
	// Specify `null` to remove an existing port value.
	Port *int64 `json:"port,omitempty"`

	// The health check timeout in seconds.
	Timeout *int64 `json:"timeout" validate:"required"`

	// The protocol type of this load balancer pool health monitor.
	Type *string `json:"type" validate:"required"`

	// The health check URL path. Applicable only if the health monitor `type` is `http` or
	// `https`. This value must be in the format of an [origin-form request
	// target](https://tools.ietf.org/html/rfc7230#section-5.3.1).
	URLPath *string `json:"url_path,omitempty"`
}

// Constants associated with the LoadBalancerPoolHealthMonitorPatch.Type property.
// The protocol type of this load balancer pool health monitor.
const (
	LoadBalancerPoolHealthMonitorPatchTypeHTTPConst  = "http"
	LoadBalancerPoolHealthMonitorPatchTypeHTTPSConst = "https"
	LoadBalancerPoolHealthMonitorPatchTypeTCPConst   = "tcp"
)

// NewLoadBalancerPoolHealthMonitorPatch : Instantiate LoadBalancerPoolHealthMonitorPatch (Generic Model Constructor)
func (*VpcV1) NewLoadBalancerPoolHealthMonitorPatch(delay int64, maxRetries int64, timeout int64, typeVar string) (model *LoadBalancerPoolHealthMonitorPatch, err error) {
	model = &LoadBalancerPoolHealthMonitorPatch{
		Delay:      core.Int64Ptr(delay),
		MaxRetries: core.Int64Ptr(maxRetries),
		Timeout:    core.Int64Ptr(timeout),
		Type:       core.StringPtr(typeVar),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

// UnmarshalLoadBalancerPoolHealthMonitorPatch unmarshals an instance of LoadBalancerPoolHealthMonitorPatch from the specified map of raw messages.
func UnmarshalLoadBalancerPoolHealthMonitorPatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerPoolHealthMonitorPatch)
	err = core.UnmarshalPrimitive(m, "delay", &obj.Delay)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "max_retries", &obj.MaxRetries)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "port", &obj.Port)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "timeout", &obj.Timeout)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "url_path", &obj.URLPath)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerPoolHealthMonitorPrototype : LoadBalancerPoolHealthMonitorPrototype struct
type LoadBalancerPoolHealthMonitorPrototype struct {
	// The health check interval in seconds. Interval must be greater than timeout value.
	Delay *int64 `json:"delay" validate:"required"`

	// The health check max retries.
	MaxRetries *int64 `json:"max_retries" validate:"required"`

	// The health check port number. If specified, this overrides the ports specified in the server member resources.
	Port *int64 `json:"port,omitempty"`

	// The health check timeout in seconds.
	Timeout *int64 `json:"timeout" validate:"required"`

	// The protocol type of this load balancer pool health monitor.
	Type *string `json:"type" validate:"required"`

	// The health check URL path. Applicable only if the health monitor `type` is `http` or
	// `https`. This value must be in the format of an [origin-form request
	// target](https://tools.ietf.org/html/rfc7230#section-5.3.1).
	URLPath *string `json:"url_path,omitempty"`
}

// Constants associated with the LoadBalancerPoolHealthMonitorPrototype.Type property.
// The protocol type of this load balancer pool health monitor.
const (
	LoadBalancerPoolHealthMonitorPrototypeTypeHTTPConst  = "http"
	LoadBalancerPoolHealthMonitorPrototypeTypeHTTPSConst = "https"
	LoadBalancerPoolHealthMonitorPrototypeTypeTCPConst   = "tcp"
)

// NewLoadBalancerPoolHealthMonitorPrototype : Instantiate LoadBalancerPoolHealthMonitorPrototype (Generic Model Constructor)
func (*VpcV1) NewLoadBalancerPoolHealthMonitorPrototype(delay int64, maxRetries int64, timeout int64, typeVar string) (model *LoadBalancerPoolHealthMonitorPrototype, err error) {
	model = &LoadBalancerPoolHealthMonitorPrototype{
		Delay:      core.Int64Ptr(delay),
		MaxRetries: core.Int64Ptr(maxRetries),
		Timeout:    core.Int64Ptr(timeout),
		Type:       core.StringPtr(typeVar),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

// UnmarshalLoadBalancerPoolHealthMonitorPrototype unmarshals an instance of LoadBalancerPoolHealthMonitorPrototype from the specified map of raw messages.
func UnmarshalLoadBalancerPoolHealthMonitorPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerPoolHealthMonitorPrototype)
	err = core.UnmarshalPrimitive(m, "delay", &obj.Delay)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "max_retries", &obj.MaxRetries)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "port", &obj.Port)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "timeout", &obj.Timeout)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "url_path", &obj.URLPath)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerPoolIdentity : Identifies a load balancer pool by a unique property.
// Models which "extend" this model:
// - LoadBalancerPoolIdentityByID
// - LoadBalancerPoolIdentityByHref
type LoadBalancerPoolIdentity struct {
	// The unique identifier for this load balancer pool.
	ID *string `json:"id,omitempty"`

	// The pool's canonical URL.
	Href *string `json:"href,omitempty"`
}

func (*LoadBalancerPoolIdentity) isaLoadBalancerPoolIdentity() bool {
	return true
}

type LoadBalancerPoolIdentityIntf interface {
	isaLoadBalancerPoolIdentity() bool
}

// UnmarshalLoadBalancerPoolIdentity unmarshals an instance of LoadBalancerPoolIdentity from the specified map of raw messages.
func UnmarshalLoadBalancerPoolIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerPoolIdentity)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerPoolIdentityByName : LoadBalancerPoolIdentityByName struct
type LoadBalancerPoolIdentityByName struct {
	// The user-defined name for this load balancer pool.
	Name *string `json:"name" validate:"required"`
}

// NewLoadBalancerPoolIdentityByName : Instantiate LoadBalancerPoolIdentityByName (Generic Model Constructor)
func (*VpcV1) NewLoadBalancerPoolIdentityByName(name string) (model *LoadBalancerPoolIdentityByName, err error) {
	model = &LoadBalancerPoolIdentityByName{
		Name: core.StringPtr(name),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

// UnmarshalLoadBalancerPoolIdentityByName unmarshals an instance of LoadBalancerPoolIdentityByName from the specified map of raw messages.
func UnmarshalLoadBalancerPoolIdentityByName(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerPoolIdentityByName)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerPoolMember : LoadBalancerPoolMember struct
type LoadBalancerPoolMember struct {
	// The date and time that this member was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// Health of the server member in the pool.
	Health *string `json:"health" validate:"required"`

	// The member's canonical URL.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this load balancer pool member.
	ID *string `json:"id" validate:"required"`

	// The port number of the application running in the server member.
	Port *int64 `json:"port" validate:"required"`

	// The provisioning status of this member.
	ProvisioningStatus *string `json:"provisioning_status" validate:"required"`

	// The pool member target. Load balancers in the `network` family support virtual server
	// instances. Load balancers in the `application` family support IP addresses.
	Target LoadBalancerPoolMemberTargetIntf `json:"target" validate:"required"`

	// Weight of the server member. Applicable only if the pool algorithm is
	// `weighted_round_robin`.
	Weight *int64 `json:"weight,omitempty"`
}

// Constants associated with the LoadBalancerPoolMember.Health property.
// Health of the server member in the pool.
const (
	LoadBalancerPoolMemberHealthFaultedConst = "faulted"
	LoadBalancerPoolMemberHealthOkConst      = "ok"
	LoadBalancerPoolMemberHealthUnknownConst = "unknown"
)

// Constants associated with the LoadBalancerPoolMember.ProvisioningStatus property.
// The provisioning status of this member.
const (
	LoadBalancerPoolMemberProvisioningStatusActiveConst             = "active"
	LoadBalancerPoolMemberProvisioningStatusCreatePendingConst      = "create_pending"
	LoadBalancerPoolMemberProvisioningStatusDeletePendingConst      = "delete_pending"
	LoadBalancerPoolMemberProvisioningStatusFailedConst             = "failed"
	LoadBalancerPoolMemberProvisioningStatusMaintenancePendingConst = "maintenance_pending"
	LoadBalancerPoolMemberProvisioningStatusUpdatePendingConst      = "update_pending"
)

// UnmarshalLoadBalancerPoolMember unmarshals an instance of LoadBalancerPoolMember from the specified map of raw messages.
func UnmarshalLoadBalancerPoolMember(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerPoolMember)
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "health", &obj.Health)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "port", &obj.Port)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "provisioning_status", &obj.ProvisioningStatus)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalLoadBalancerPoolMemberTarget)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "weight", &obj.Weight)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerPoolMemberCollection : LoadBalancerPoolMemberCollection struct
type LoadBalancerPoolMemberCollection struct {
	// Collection of members.
	Members []LoadBalancerPoolMember `json:"members" validate:"required"`
}

// UnmarshalLoadBalancerPoolMemberCollection unmarshals an instance of LoadBalancerPoolMemberCollection from the specified map of raw messages.
func UnmarshalLoadBalancerPoolMemberCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerPoolMemberCollection)
	err = core.UnmarshalModel(m, "members", &obj.Members, UnmarshalLoadBalancerPoolMember)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerPoolMemberPatch : LoadBalancerPoolMemberPatch struct
type LoadBalancerPoolMemberPatch struct {
	// The port number of the application running in the server member.
	Port *int64 `json:"port,omitempty"`

	// The pool member target. Load balancers in the `network` family support virtual server
	// instances. Load balancers in the `application` family support IP addresses.
	Target LoadBalancerPoolMemberTargetPrototypeIntf `json:"target,omitempty"`

	// Weight of the server member. Applicable only if the pool algorithm is
	// `weighted_round_robin`.
	Weight *int64 `json:"weight,omitempty"`
}

// UnmarshalLoadBalancerPoolMemberPatch unmarshals an instance of LoadBalancerPoolMemberPatch from the specified map of raw messages.
func UnmarshalLoadBalancerPoolMemberPatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerPoolMemberPatch)
	err = core.UnmarshalPrimitive(m, "port", &obj.Port)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalLoadBalancerPoolMemberTargetPrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "weight", &obj.Weight)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the LoadBalancerPoolMemberPatch
func (loadBalancerPoolMemberPatch *LoadBalancerPoolMemberPatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(loadBalancerPoolMemberPatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// LoadBalancerPoolMemberPrototype : LoadBalancerPoolMemberPrototype struct
type LoadBalancerPoolMemberPrototype struct {
	// The port number of the application running in the server member.
	Port *int64 `json:"port" validate:"required"`

	// The pool member target. Load balancers in the `network` family support virtual server
	// instances. Load balancers in the `application` family support IP addresses.
	Target LoadBalancerPoolMemberTargetPrototypeIntf `json:"target" validate:"required"`

	// Weight of the server member. Applicable only if the pool algorithm is
	// `weighted_round_robin`.
	Weight *int64 `json:"weight,omitempty"`
}

// NewLoadBalancerPoolMemberPrototype : Instantiate LoadBalancerPoolMemberPrototype (Generic Model Constructor)
func (*VpcV1) NewLoadBalancerPoolMemberPrototype(port int64, target LoadBalancerPoolMemberTargetPrototypeIntf) (model *LoadBalancerPoolMemberPrototype, err error) {
	model = &LoadBalancerPoolMemberPrototype{
		Port:   core.Int64Ptr(port),
		Target: target,
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

// UnmarshalLoadBalancerPoolMemberPrototype unmarshals an instance of LoadBalancerPoolMemberPrototype from the specified map of raw messages.
func UnmarshalLoadBalancerPoolMemberPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerPoolMemberPrototype)
	err = core.UnmarshalPrimitive(m, "port", &obj.Port)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalLoadBalancerPoolMemberTargetPrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "weight", &obj.Weight)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerPoolMemberReference : LoadBalancerPoolMemberReference struct
type LoadBalancerPoolMemberReference struct {
	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *LoadBalancerPoolMemberReferenceDeleted `json:"deleted,omitempty"`

	// The member's canonical URL.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this load balancer pool member.
	ID *string `json:"id" validate:"required"`
}

// UnmarshalLoadBalancerPoolMemberReference unmarshals an instance of LoadBalancerPoolMemberReference from the specified map of raw messages.
func UnmarshalLoadBalancerPoolMemberReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerPoolMemberReference)
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalLoadBalancerPoolMemberReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerPoolMemberReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type LoadBalancerPoolMemberReferenceDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalLoadBalancerPoolMemberReferenceDeleted unmarshals an instance of LoadBalancerPoolMemberReferenceDeleted from the specified map of raw messages.
func UnmarshalLoadBalancerPoolMemberReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerPoolMemberReferenceDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerPoolMemberTarget : The pool member target. Load balancers in the `network` family support virtual server instances. Load balancers in
// the `application` family support IP addresses.
// Models which "extend" this model:
// - LoadBalancerPoolMemberTargetInstanceReference
// - LoadBalancerPoolMemberTargetIP
type LoadBalancerPoolMemberTarget struct {
	// The CRN for this virtual server instance.
	CRN *string `json:"crn,omitempty"`

	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *InstanceReferenceDeleted `json:"deleted,omitempty"`

	// The URL for this virtual server instance.
	Href *string `json:"href,omitempty"`

	// The unique identifier for this virtual server instance.
	ID *string `json:"id,omitempty"`

	// The user-defined name for this virtual server instance (and default system hostname).
	Name *string `json:"name,omitempty"`

	// The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this
	// property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing
	// and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
	Address *string `json:"address,omitempty"`
}

func (*LoadBalancerPoolMemberTarget) isaLoadBalancerPoolMemberTarget() bool {
	return true
}

type LoadBalancerPoolMemberTargetIntf interface {
	isaLoadBalancerPoolMemberTarget() bool
}

// UnmarshalLoadBalancerPoolMemberTarget unmarshals an instance of LoadBalancerPoolMemberTarget from the specified map of raw messages.
func UnmarshalLoadBalancerPoolMemberTarget(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerPoolMemberTarget)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalInstanceReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "address", &obj.Address)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerPoolMemberTargetPrototype : The pool member target. Load balancers in the `network` family support virtual server instances. Load balancers in
// the `application` family support IP addresses.
// Models which "extend" this model:
// - LoadBalancerPoolMemberTargetPrototypeInstanceIdentity
// - LoadBalancerPoolMemberTargetPrototypeIP
type LoadBalancerPoolMemberTargetPrototype struct {
	// The unique identifier for this virtual server instance.
	ID *string `json:"id,omitempty"`

	// The CRN for this virtual server instance.
	CRN *string `json:"crn,omitempty"`

	// The URL for this virtual server instance.
	Href *string `json:"href,omitempty"`

	// The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this
	// property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing
	// and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
	Address *string `json:"address,omitempty"`
}

func (*LoadBalancerPoolMemberTargetPrototype) isaLoadBalancerPoolMemberTargetPrototype() bool {
	return true
}

type LoadBalancerPoolMemberTargetPrototypeIntf interface {
	isaLoadBalancerPoolMemberTargetPrototype() bool
}

// UnmarshalLoadBalancerPoolMemberTargetPrototype unmarshals an instance of LoadBalancerPoolMemberTargetPrototype from the specified map of raw messages.
func UnmarshalLoadBalancerPoolMemberTargetPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerPoolMemberTargetPrototype)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "address", &obj.Address)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerPoolPatch : LoadBalancerPoolPatch struct
type LoadBalancerPoolPatch struct {
	// The load balancing algorithm.
	Algorithm *string `json:"algorithm,omitempty"`

	// The health monitor of this pool.
	HealthMonitor *LoadBalancerPoolHealthMonitorPatch `json:"health_monitor,omitempty"`

	// The user-defined name for this load balancer pool.
	Name *string `json:"name,omitempty"`

	// The protocol used for this load balancer pool.
	//
	// The enumerated values for this property are expected to expand in the future. When processing this property, check
	// for and log unknown values. Optionally halt processing and surface the error, or bypass the pool on which the
	// unexpected property value was encountered.
	Protocol *string `json:"protocol,omitempty"`

	// The PROXY protocol setting for this pool:
	// - `v1`: Enabled with version 1 (human-readable header format)
	// - `v2`: Enabled with version 2 (binary header format)
	// - `disabled`: Disabled
	//
	// Supported by load balancers in the `application` family (otherwise always `disabled`).
	ProxyProtocol *string `json:"proxy_protocol,omitempty"`

	// The session persistence of this pool.
	SessionPersistence *LoadBalancerPoolSessionPersistencePatch `json:"session_persistence,omitempty"`
}

// Constants associated with the LoadBalancerPoolPatch.Algorithm property.
// The load balancing algorithm.
const (
	LoadBalancerPoolPatchAlgorithmLeastConnectionsConst   = "least_connections"
	LoadBalancerPoolPatchAlgorithmRoundRobinConst         = "round_robin"
	LoadBalancerPoolPatchAlgorithmWeightedRoundRobinConst = "weighted_round_robin"
)

// Constants associated with the LoadBalancerPoolPatch.Protocol property.
// The protocol used for this load balancer pool.
//
// The enumerated values for this property are expected to expand in the future. When processing this property, check
// for and log unknown values. Optionally halt processing and surface the error, or bypass the pool on which the
// unexpected property value was encountered.
const (
	LoadBalancerPoolPatchProtocolHTTPConst  = "http"
	LoadBalancerPoolPatchProtocolHTTPSConst = "https"
	LoadBalancerPoolPatchProtocolTCPConst   = "tcp"
)

// Constants associated with the LoadBalancerPoolPatch.ProxyProtocol property.
// The PROXY protocol setting for this pool:
// - `v1`: Enabled with version 1 (human-readable header format)
// - `v2`: Enabled with version 2 (binary header format)
// - `disabled`: Disabled
//
// Supported by load balancers in the `application` family (otherwise always `disabled`).
const (
	LoadBalancerPoolPatchProxyProtocolDisabledConst = "disabled"
	LoadBalancerPoolPatchProxyProtocolV1Const       = "v1"
	LoadBalancerPoolPatchProxyProtocolV2Const       = "v2"
)

// UnmarshalLoadBalancerPoolPatch unmarshals an instance of LoadBalancerPoolPatch from the specified map of raw messages.
func UnmarshalLoadBalancerPoolPatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerPoolPatch)
	err = core.UnmarshalPrimitive(m, "algorithm", &obj.Algorithm)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "health_monitor", &obj.HealthMonitor, UnmarshalLoadBalancerPoolHealthMonitorPatch)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "proxy_protocol", &obj.ProxyProtocol)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "session_persistence", &obj.SessionPersistence, UnmarshalLoadBalancerPoolSessionPersistencePatch)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the LoadBalancerPoolPatch
func (loadBalancerPoolPatch *LoadBalancerPoolPatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(loadBalancerPoolPatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// LoadBalancerPoolPrototype : LoadBalancerPoolPrototype struct
type LoadBalancerPoolPrototype struct {
	// The load balancing algorithm.
	Algorithm *string `json:"algorithm" validate:"required"`

	// The health monitor of this pool.
	HealthMonitor *LoadBalancerPoolHealthMonitorPrototype `json:"health_monitor" validate:"required"`

	// The members for this load balancer pool. For load balancers in the `network` family, the same `port` and `target`
	// tuple cannot be shared by a pool member of any other load balancer in the same VPC.
	Members []LoadBalancerPoolMemberPrototype `json:"members,omitempty"`

	// The user-defined name for this load balancer pool. If unspecified, the name will be a hyphenated list of
	// randomly-selected words.
	Name *string `json:"name,omitempty"`

	// The protocol used for this load balancer pool. Load balancers in the `network` family support `tcp`. Load balancers
	// in the `application` family support `tcp`, `http`, and
	// `https`.
	Protocol *string `json:"protocol" validate:"required"`

	// The PROXY protocol setting for this pool:
	// - `v1`: Enabled with version 1 (human-readable header format)
	// - `v2`: Enabled with version 2 (binary header format)
	// - `disabled`: Disabled
	//
	// Supported by load balancers in the `application` family (otherwise always `disabled`).
	ProxyProtocol *string `json:"proxy_protocol,omitempty"`

	// The session persistence of this pool.
	SessionPersistence *LoadBalancerPoolSessionPersistencePrototype `json:"session_persistence,omitempty"`
}

// Constants associated with the LoadBalancerPoolPrototype.Algorithm property.
// The load balancing algorithm.
const (
	LoadBalancerPoolPrototypeAlgorithmLeastConnectionsConst   = "least_connections"
	LoadBalancerPoolPrototypeAlgorithmRoundRobinConst         = "round_robin"
	LoadBalancerPoolPrototypeAlgorithmWeightedRoundRobinConst = "weighted_round_robin"
)

// Constants associated with the LoadBalancerPoolPrototype.Protocol property.
// The protocol used for this load balancer pool. Load balancers in the `network` family support `tcp`. Load balancers
// in the `application` family support `tcp`, `http`, and
// `https`.
const (
	LoadBalancerPoolPrototypeProtocolHTTPConst  = "http"
	LoadBalancerPoolPrototypeProtocolHTTPSConst = "https"
	LoadBalancerPoolPrototypeProtocolTCPConst   = "tcp"
)

// Constants associated with the LoadBalancerPoolPrototype.ProxyProtocol property.
// The PROXY protocol setting for this pool:
// - `v1`: Enabled with version 1 (human-readable header format)
// - `v2`: Enabled with version 2 (binary header format)
// - `disabled`: Disabled
//
// Supported by load balancers in the `application` family (otherwise always `disabled`).
const (
	LoadBalancerPoolPrototypeProxyProtocolDisabledConst = "disabled"
	LoadBalancerPoolPrototypeProxyProtocolV1Const       = "v1"
	LoadBalancerPoolPrototypeProxyProtocolV2Const       = "v2"
)

// NewLoadBalancerPoolPrototype : Instantiate LoadBalancerPoolPrototype (Generic Model Constructor)
func (*VpcV1) NewLoadBalancerPoolPrototype(algorithm string, healthMonitor *LoadBalancerPoolHealthMonitorPrototype, protocol string) (model *LoadBalancerPoolPrototype, err error) {
	model = &LoadBalancerPoolPrototype{
		Algorithm:     core.StringPtr(algorithm),
		HealthMonitor: healthMonitor,
		Protocol:      core.StringPtr(protocol),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

// UnmarshalLoadBalancerPoolPrototype unmarshals an instance of LoadBalancerPoolPrototype from the specified map of raw messages.
func UnmarshalLoadBalancerPoolPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerPoolPrototype)
	err = core.UnmarshalPrimitive(m, "algorithm", &obj.Algorithm)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "health_monitor", &obj.HealthMonitor, UnmarshalLoadBalancerPoolHealthMonitorPrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "members", &obj.Members, UnmarshalLoadBalancerPoolMemberPrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "proxy_protocol", &obj.ProxyProtocol)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "session_persistence", &obj.SessionPersistence, UnmarshalLoadBalancerPoolSessionPersistencePrototype)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerPoolReference : LoadBalancerPoolReference struct
type LoadBalancerPoolReference struct {
	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *LoadBalancerPoolReferenceDeleted `json:"deleted,omitempty"`

	// The pool's canonical URL.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this load balancer pool.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this load balancer pool.
	Name *string `json:"name" validate:"required"`
}

// UnmarshalLoadBalancerPoolReference unmarshals an instance of LoadBalancerPoolReference from the specified map of raw messages.
func UnmarshalLoadBalancerPoolReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerPoolReference)
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalLoadBalancerPoolReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerPoolReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type LoadBalancerPoolReferenceDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalLoadBalancerPoolReferenceDeleted unmarshals an instance of LoadBalancerPoolReferenceDeleted from the specified map of raw messages.
func UnmarshalLoadBalancerPoolReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerPoolReferenceDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerPoolSessionPersistence : LoadBalancerPoolSessionPersistence struct
type LoadBalancerPoolSessionPersistence struct {
	// The session persistence type.
	Type *string `json:"type" validate:"required"`
}

// Constants associated with the LoadBalancerPoolSessionPersistence.Type property.
// The session persistence type.
const (
	LoadBalancerPoolSessionPersistenceTypeSourceIPConst = "source_ip"
)

// UnmarshalLoadBalancerPoolSessionPersistence unmarshals an instance of LoadBalancerPoolSessionPersistence from the specified map of raw messages.
func UnmarshalLoadBalancerPoolSessionPersistence(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerPoolSessionPersistence)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerPoolSessionPersistencePatch : LoadBalancerPoolSessionPersistencePatch struct
type LoadBalancerPoolSessionPersistencePatch struct {
	// The session persistence type.
	Type *string `json:"type" validate:"required"`
}

// Constants associated with the LoadBalancerPoolSessionPersistencePatch.Type property.
// The session persistence type.
const (
	LoadBalancerPoolSessionPersistencePatchTypeSourceIPConst = "source_ip"
)

// NewLoadBalancerPoolSessionPersistencePatch : Instantiate LoadBalancerPoolSessionPersistencePatch (Generic Model Constructor)
func (*VpcV1) NewLoadBalancerPoolSessionPersistencePatch(typeVar string) (model *LoadBalancerPoolSessionPersistencePatch, err error) {
	model = &LoadBalancerPoolSessionPersistencePatch{
		Type: core.StringPtr(typeVar),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

// UnmarshalLoadBalancerPoolSessionPersistencePatch unmarshals an instance of LoadBalancerPoolSessionPersistencePatch from the specified map of raw messages.
func UnmarshalLoadBalancerPoolSessionPersistencePatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerPoolSessionPersistencePatch)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerPoolSessionPersistencePrototype : LoadBalancerPoolSessionPersistencePrototype struct
type LoadBalancerPoolSessionPersistencePrototype struct {
	// The session persistence type.
	Type *string `json:"type" validate:"required"`
}

// Constants associated with the LoadBalancerPoolSessionPersistencePrototype.Type property.
// The session persistence type.
const (
	LoadBalancerPoolSessionPersistencePrototypeTypeSourceIPConst = "source_ip"
)

// NewLoadBalancerPoolSessionPersistencePrototype : Instantiate LoadBalancerPoolSessionPersistencePrototype (Generic Model Constructor)
func (*VpcV1) NewLoadBalancerPoolSessionPersistencePrototype(typeVar string) (model *LoadBalancerPoolSessionPersistencePrototype, err error) {
	model = &LoadBalancerPoolSessionPersistencePrototype{
		Type: core.StringPtr(typeVar),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

// UnmarshalLoadBalancerPoolSessionPersistencePrototype unmarshals an instance of LoadBalancerPoolSessionPersistencePrototype from the specified map of raw messages.
func UnmarshalLoadBalancerPoolSessionPersistencePrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerPoolSessionPersistencePrototype)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerProfile : LoadBalancerProfile struct
type LoadBalancerProfile struct {
	// The product family this load balancer profile belongs to.
	Family *string `json:"family" validate:"required"`

	// The URL for this load balancer profile.
	Href *string `json:"href" validate:"required"`

	// Indicates which logging type(s) are supported for a load balancer with this profile.
	LoggingSupported *LoadBalancerProfileLoggingSupported `json:"logging_supported" validate:"required"`

	// The globally unique name for this load balancer profile.
	Name *string `json:"name" validate:"required"`

	SecurityGroupsSupported LoadBalancerProfileSecurityGroupsSupportedIntf `json:"security_groups_supported" validate:"required"`
}

// UnmarshalLoadBalancerProfile unmarshals an instance of LoadBalancerProfile from the specified map of raw messages.
func UnmarshalLoadBalancerProfile(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerProfile)
	err = core.UnmarshalPrimitive(m, "family", &obj.Family)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "logging_supported", &obj.LoggingSupported, UnmarshalLoadBalancerProfileLoggingSupported)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "security_groups_supported", &obj.SecurityGroupsSupported, UnmarshalLoadBalancerProfileSecurityGroupsSupported)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerProfileCollection : LoadBalancerProfileCollection struct
type LoadBalancerProfileCollection struct {
	// A link to the first page of resources.
	First *LoadBalancerProfileCollectionFirst `json:"first" validate:"required"`

	// The maximum number of resources that can be returned by the request.
	Limit *int64 `json:"limit" validate:"required"`

	// A link to the next page of resources. This property is present for all pages
	// except the last page.
	Next *LoadBalancerProfileCollectionNext `json:"next,omitempty"`

	// Collection of load balancer profiles.
	Profiles []LoadBalancerProfile `json:"profiles" validate:"required"`

	// The total number of resources across all pages.
	TotalCount *int64 `json:"total_count" validate:"required"`
}

// UnmarshalLoadBalancerProfileCollection unmarshals an instance of LoadBalancerProfileCollection from the specified map of raw messages.
func UnmarshalLoadBalancerProfileCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerProfileCollection)
	err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalLoadBalancerProfileCollectionFirst)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalLoadBalancerProfileCollectionNext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "profiles", &obj.Profiles, UnmarshalLoadBalancerProfile)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerProfileCollectionFirst : A link to the first page of resources.
type LoadBalancerProfileCollectionFirst struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalLoadBalancerProfileCollectionFirst unmarshals an instance of LoadBalancerProfileCollectionFirst from the specified map of raw messages.
func UnmarshalLoadBalancerProfileCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerProfileCollectionFirst)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerProfileCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
type LoadBalancerProfileCollectionNext struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalLoadBalancerProfileCollectionNext unmarshals an instance of LoadBalancerProfileCollectionNext from the specified map of raw messages.
func UnmarshalLoadBalancerProfileCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerProfileCollectionNext)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerProfileIdentity : Identifies a load balancer profile by a unique property.
// Models which "extend" this model:
// - LoadBalancerProfileIdentityByName
// - LoadBalancerProfileIdentityByHref
type LoadBalancerProfileIdentity struct {
	// The globally unique name for this load balancer profile.
	Name *string `json:"name,omitempty"`

	// The URL for this load balancer profile.
	Href *string `json:"href,omitempty"`
}

func (*LoadBalancerProfileIdentity) isaLoadBalancerProfileIdentity() bool {
	return true
}

type LoadBalancerProfileIdentityIntf interface {
	isaLoadBalancerProfileIdentity() bool
}

// UnmarshalLoadBalancerProfileIdentity unmarshals an instance of LoadBalancerProfileIdentity from the specified map of raw messages.
func UnmarshalLoadBalancerProfileIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerProfileIdentity)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerProfileLoggingSupported : Indicates which logging type(s) are supported for a load balancer with this profile.
type LoadBalancerProfileLoggingSupported struct {
	// The type for this profile field.
	Type *string `json:"type" validate:"required"`

	// The supported logging type(s) for a load balancer with this profile.
	Value []string `json:"value" validate:"required"`
}

// Constants associated with the LoadBalancerProfileLoggingSupported.Type property.
// The type for this profile field.
const (
	LoadBalancerProfileLoggingSupportedTypeFixedConst = "fixed"
)

// UnmarshalLoadBalancerProfileLoggingSupported unmarshals an instance of LoadBalancerProfileLoggingSupported from the specified map of raw messages.
func UnmarshalLoadBalancerProfileLoggingSupported(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerProfileLoggingSupported)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "value", &obj.Value)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerProfileReference : LoadBalancerProfileReference struct
type LoadBalancerProfileReference struct {
	// The product family this load balancer profile belongs to.
	Family *string `json:"family" validate:"required"`

	// The URL for this load balancer profile.
	Href *string `json:"href" validate:"required"`

	// The globally unique name for this load balancer profile.
	Name *string `json:"name" validate:"required"`
}

// UnmarshalLoadBalancerProfileReference unmarshals an instance of LoadBalancerProfileReference from the specified map of raw messages.
func UnmarshalLoadBalancerProfileReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerProfileReference)
	err = core.UnmarshalPrimitive(m, "family", &obj.Family)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerProfileSecurityGroupsSupported : LoadBalancerProfileSecurityGroupsSupported struct
// Models which "extend" this model:
// - LoadBalancerProfileSecurityGroupsSupportedFixed
// - LoadBalancerProfileSecurityGroupsSupportedDependent
type LoadBalancerProfileSecurityGroupsSupported struct {
	// The type for this profile field.
	Type *string `json:"type,omitempty"`

	// The value for this profile field.
	Value *bool `json:"value,omitempty"`
}

// Constants associated with the LoadBalancerProfileSecurityGroupsSupported.Type property.
// The type for this profile field.
const (
	LoadBalancerProfileSecurityGroupsSupportedTypeFixedConst = "fixed"
)

func (*LoadBalancerProfileSecurityGroupsSupported) isaLoadBalancerProfileSecurityGroupsSupported() bool {
	return true
}

type LoadBalancerProfileSecurityGroupsSupportedIntf interface {
	isaLoadBalancerProfileSecurityGroupsSupported() bool
}

// UnmarshalLoadBalancerProfileSecurityGroupsSupported unmarshals an instance of LoadBalancerProfileSecurityGroupsSupported from the specified map of raw messages.
func UnmarshalLoadBalancerProfileSecurityGroupsSupported(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerProfileSecurityGroupsSupported)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "value", &obj.Value)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type LoadBalancerReferenceDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalLoadBalancerReferenceDeleted unmarshals an instance of LoadBalancerReferenceDeleted from the specified map of raw messages.
func UnmarshalLoadBalancerReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerReferenceDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerStatistics : LoadBalancerStatistics struct
type LoadBalancerStatistics struct {
	// Number of active connections of this load balancer.
	ActiveConnections *int64 `json:"active_connections" validate:"required"`

	// Current connection rate (connections per second) of this load balancer.
	ConnectionRate *float32 `json:"connection_rate" validate:"required"`

	// Total number of data processed (bytes) of this load balancer within current calendar month.
	DataProcessedThisMonth *int64 `json:"data_processed_this_month" validate:"required"`

	// Current throughput (Mbps) of this load balancer.
	Throughput *float32 `json:"throughput" validate:"required"`
}

// UnmarshalLoadBalancerStatistics unmarshals an instance of LoadBalancerStatistics from the specified map of raw messages.
func UnmarshalLoadBalancerStatistics(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerStatistics)
	err = core.UnmarshalPrimitive(m, "active_connections", &obj.ActiveConnections)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "connection_rate", &obj.ConnectionRate)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "data_processed_this_month", &obj.DataProcessedThisMonth)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "throughput", &obj.Throughput)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACL : NetworkACL struct
type NetworkACL struct {
	// The date and time that the network ACL was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The CRN for this network ACL.
	CRN *string `json:"crn" validate:"required"`

	// The URL for this network ACL.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this network ACL.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this network ACL.
	Name *string `json:"name" validate:"required"`

	// The resource group for this network ACL.
	ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`

	// The ordered rules for this network ACL. If no rules exist, all traffic will be denied.
	Rules []NetworkACLRuleItemIntf `json:"rules" validate:"required"`

	// The subnets to which this network ACL is attached.
	Subnets []SubnetReference `json:"subnets" validate:"required"`

	// The VPC this network ACL is a part of.
	VPC *VPCReference `json:"vpc" validate:"required"`
}

// UnmarshalNetworkACL unmarshals an instance of NetworkACL from the specified map of raw messages.
func UnmarshalNetworkACL(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACL)
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "rules", &obj.Rules, UnmarshalNetworkACLRuleItem)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "subnets", &obj.Subnets, UnmarshalSubnetReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACLCollection : NetworkACLCollection struct
type NetworkACLCollection struct {
	// A link to the first page of resources.
	First *NetworkACLCollectionFirst `json:"first" validate:"required"`

	// The maximum number of resources that can be returned by the request.
	Limit *int64 `json:"limit" validate:"required"`

	// Collection of network ACLs.
	NetworkAcls []NetworkACL `json:"network_acls" validate:"required"`

	// A link to the next page of resources. This property is present for all pages
	// except the last page.
	Next *NetworkACLCollectionNext `json:"next,omitempty"`

	// The total number of resources across all pages.
	TotalCount *int64 `json:"total_count" validate:"required"`
}

// UnmarshalNetworkACLCollection unmarshals an instance of NetworkACLCollection from the specified map of raw messages.
func UnmarshalNetworkACLCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLCollection)
	err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalNetworkACLCollectionFirst)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "network_acls", &obj.NetworkAcls, UnmarshalNetworkACL)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalNetworkACLCollectionNext)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACLCollectionFirst : A link to the first page of resources.
type NetworkACLCollectionFirst struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalNetworkACLCollectionFirst unmarshals an instance of NetworkACLCollectionFirst from the specified map of raw messages.
func UnmarshalNetworkACLCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLCollectionFirst)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACLCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
type NetworkACLCollectionNext struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalNetworkACLCollectionNext unmarshals an instance of NetworkACLCollectionNext from the specified map of raw messages.
func UnmarshalNetworkACLCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLCollectionNext)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACLIdentity : Identifies a network ACL by a unique property.
// Models which "extend" this model:
// - NetworkACLIdentityByID
// - NetworkACLIdentityByCRN
// - NetworkACLIdentityByHref
type NetworkACLIdentity struct {
	// The unique identifier for this network ACL.
	ID *string `json:"id,omitempty"`

	// The CRN for this network ACL.
	CRN *string `json:"crn,omitempty"`

	// The URL for this network ACL.
	Href *string `json:"href,omitempty"`
}

func (*NetworkACLIdentity) isaNetworkACLIdentity() bool {
	return true
}

type NetworkACLIdentityIntf interface {
	isaNetworkACLIdentity() bool
}

// UnmarshalNetworkACLIdentity unmarshals an instance of NetworkACLIdentity from the specified map of raw messages.
func UnmarshalNetworkACLIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLIdentity)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACLPatch : NetworkACLPatch struct
type NetworkACLPatch struct {
	// The user-defined name for this network ACL. Names must be unique within the VPC the network ACL resides in.
	Name *string `json:"name,omitempty"`
}

// UnmarshalNetworkACLPatch unmarshals an instance of NetworkACLPatch from the specified map of raw messages.
func UnmarshalNetworkACLPatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLPatch)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the NetworkACLPatch
func (networkACLPatch *NetworkACLPatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(networkACLPatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// NetworkACLPrototype : NetworkACLPrototype struct
// Models which "extend" this model:
// - NetworkACLPrototypeNetworkACLByRules
// - NetworkACLPrototypeNetworkACLBySourceNetworkACL
type NetworkACLPrototype struct {
	// The user-defined name for this network ACL. Names must be unique within the VPC the network ACL resides in. If
	// unspecified, the name will be a hyphenated list of randomly-selected words.
	Name *string `json:"name,omitempty"`

	// The resource group to use. If unspecified, the account's [default resource
	// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
	ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`

	// The VPC this network ACL is to be a part of.
	VPC VPCIdentityIntf `json:"vpc" validate:"required"`

	// Array of prototype objects for rules to create along with this network ACL. If unspecified, no rules will be
	// created, resulting in all traffic being denied.
	Rules []NetworkACLRulePrototypeNetworkACLContextIntf `json:"rules,omitempty"`

	// Network ACL to copy rules from.
	SourceNetworkACL NetworkACLIdentityIntf `json:"source_network_acl,omitempty"`
}

func (*NetworkACLPrototype) isaNetworkACLPrototype() bool {
	return true
}

type NetworkACLPrototypeIntf interface {
	isaNetworkACLPrototype() bool
}

// UnmarshalNetworkACLPrototype unmarshals an instance of NetworkACLPrototype from the specified map of raw messages.
func UnmarshalNetworkACLPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLPrototype)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "rules", &obj.Rules, UnmarshalNetworkACLRulePrototypeNetworkACLContext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "source_network_acl", &obj.SourceNetworkACL, UnmarshalNetworkACLIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACLReference : NetworkACLReference struct
type NetworkACLReference struct {
	// The CRN for this network ACL.
	CRN *string `json:"crn" validate:"required"`

	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *NetworkACLReferenceDeleted `json:"deleted,omitempty"`

	// The URL for this network ACL.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this network ACL.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this network ACL.
	Name *string `json:"name" validate:"required"`
}

// UnmarshalNetworkACLReference unmarshals an instance of NetworkACLReference from the specified map of raw messages.
func UnmarshalNetworkACLReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLReference)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalNetworkACLReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACLReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type NetworkACLReferenceDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalNetworkACLReferenceDeleted unmarshals an instance of NetworkACLReferenceDeleted from the specified map of raw messages.
func UnmarshalNetworkACLReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLReferenceDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACLRule : NetworkACLRule struct
// Models which "extend" this model:
// - NetworkACLRuleNetworkACLRuleProtocolTcpudp
// - NetworkACLRuleNetworkACLRuleProtocolIcmp
// - NetworkACLRuleNetworkACLRuleProtocolAll
type NetworkACLRule struct {
	// Whether to allow or deny matching traffic.
	Action *string `json:"action" validate:"required"`

	// The rule that this rule is immediately before. If absent, this is the last rule.
	Before *NetworkACLRuleReference `json:"before,omitempty"`

	// The date and time that the rule was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The destination CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses.
	Destination *string `json:"destination" validate:"required"`

	// Whether the traffic to be matched is `inbound` or `outbound`.
	Direction *string `json:"direction" validate:"required"`

	// The URL for this network ACL rule.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this network ACL rule.
	ID *string `json:"id" validate:"required"`

	// The IP version for this rule.
	IPVersion *string `json:"ip_version" validate:"required"`

	// The user-defined name for this rule. Names must be unique within the network ACL the rule resides in. If
	// unspecified, the name will be a hyphenated list of randomly-selected words.
	Name *string `json:"name" validate:"required"`

	// The protocol to enforce.
	Protocol *string `json:"protocol" validate:"required"`

	// The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses.
	Source *string `json:"source" validate:"required"`

	// The inclusive upper bound of TCP/UDP destination port range.
	DestinationPortMax *int64 `json:"destination_port_max,omitempty"`

	// The inclusive lower bound of TCP/UDP destination port range.
	DestinationPortMin *int64 `json:"destination_port_min,omitempty"`

	// The inclusive upper bound of TCP/UDP source port range.
	SourcePortMax *int64 `json:"source_port_max,omitempty"`

	// The inclusive lower bound of TCP/UDP source port range.
	SourcePortMin *int64 `json:"source_port_min,omitempty"`

	// The ICMP traffic code to allow. If unspecified, all codes are allowed. This can only be specified if type is also
	// specified.
	Code *int64 `json:"code,omitempty"`

	// The ICMP traffic type to allow. If unspecified, all types are allowed by this rule.
	Type *int64 `json:"type,omitempty"`
}

// Constants associated with the NetworkACLRule.Action property.
// Whether to allow or deny matching traffic.
const (
	NetworkACLRuleActionAllowConst = "allow"
	NetworkACLRuleActionDenyConst  = "deny"
)

// Constants associated with the NetworkACLRule.Direction property.
// Whether the traffic to be matched is `inbound` or `outbound`.
const (
	NetworkACLRuleDirectionInboundConst  = "inbound"
	NetworkACLRuleDirectionOutboundConst = "outbound"
)

// Constants associated with the NetworkACLRule.IPVersion property.
// The IP version for this rule.
const (
	NetworkACLRuleIPVersionIpv4Const = "ipv4"
	NetworkACLRuleIPVersionIpv6Const = "ipv6"
)

func (*NetworkACLRule) isaNetworkACLRule() bool {
	return true
}

type NetworkACLRuleIntf interface {
	isaNetworkACLRule() bool
}

// UnmarshalNetworkACLRule unmarshals an instance of NetworkACLRule from the specified map of raw messages.
func UnmarshalNetworkACLRule(m map[string]json.RawMessage, result interface{}) (err error) {
	// Retrieve discriminator value to determine correct "subclass".
	var discValue string
	err = core.UnmarshalPrimitive(m, "protocol", &discValue)
	if err != nil {
		err = fmt.Errorf("error unmarshalling discriminator property 'protocol': %s", err.Error())
		return
	}
	if discValue == "" {
		err = fmt.Errorf("required discriminator property 'protocol' not found in JSON object")
		return
	}
	if discValue == "all" {
		err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleNetworkACLRuleProtocolAll)
	} else if discValue == "icmp" {
		err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleNetworkACLRuleProtocolIcmp)
	} else if discValue == "tcp" {
		err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleNetworkACLRuleProtocolTcpudp)
	} else if discValue == "udp" {
		err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleNetworkACLRuleProtocolTcpudp)
	} else {
		err = fmt.Errorf("unrecognized value for discriminator property 'protocol': %s", discValue)
	}
	return
}

// NetworkACLRuleBeforePatch : The rule to move this rule immediately before. Specify `null` to move this rule after all existing rules.
// Models which "extend" this model:
// - NetworkACLRuleBeforePatchNetworkACLRuleIdentityByID
// - NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref
type NetworkACLRuleBeforePatch struct {
	// The unique identifier for this network ACL rule.
	ID *string `json:"id,omitempty"`

	// The URL for this network ACL rule.
	Href *string `json:"href,omitempty"`
}

func (*NetworkACLRuleBeforePatch) isaNetworkACLRuleBeforePatch() bool {
	return true
}

type NetworkACLRuleBeforePatchIntf interface {
	isaNetworkACLRuleBeforePatch() bool
}

// UnmarshalNetworkACLRuleBeforePatch unmarshals an instance of NetworkACLRuleBeforePatch from the specified map of raw messages.
func UnmarshalNetworkACLRuleBeforePatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLRuleBeforePatch)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACLRuleBeforePrototype : The rule to insert this rule immediately before. If omitted, this rule will be inserted after all existing rules.
// Models which "extend" this model:
// - NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID
// - NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref
type NetworkACLRuleBeforePrototype struct {
	// The unique identifier for this network ACL rule.
	ID *string `json:"id,omitempty"`

	// The URL for this network ACL rule.
	Href *string `json:"href,omitempty"`
}

func (*NetworkACLRuleBeforePrototype) isaNetworkACLRuleBeforePrototype() bool {
	return true
}

type NetworkACLRuleBeforePrototypeIntf interface {
	isaNetworkACLRuleBeforePrototype() bool
}

// UnmarshalNetworkACLRuleBeforePrototype unmarshals an instance of NetworkACLRuleBeforePrototype from the specified map of raw messages.
func UnmarshalNetworkACLRuleBeforePrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLRuleBeforePrototype)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACLRuleCollection : NetworkACLRuleCollection struct
type NetworkACLRuleCollection struct {
	// A link to the first page of resources.
	First *NetworkACLRuleCollectionFirst `json:"first" validate:"required"`

	// The maximum number of resources that can be returned by the request.
	Limit *int64 `json:"limit" validate:"required"`

	// A link to the next page of resources. This property is present for all pages
	// except the last page.
	Next *NetworkACLRuleCollectionNext `json:"next,omitempty"`

	// Ordered collection of network ACL rules.
	Rules []NetworkACLRuleItemIntf `json:"rules" validate:"required"`

	// The total number of resources across all pages.
	TotalCount *int64 `json:"total_count" validate:"required"`
}

// UnmarshalNetworkACLRuleCollection unmarshals an instance of NetworkACLRuleCollection from the specified map of raw messages.
func UnmarshalNetworkACLRuleCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLRuleCollection)
	err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalNetworkACLRuleCollectionFirst)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalNetworkACLRuleCollectionNext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "rules", &obj.Rules, UnmarshalNetworkACLRuleItem)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACLRuleCollectionFirst : A link to the first page of resources.
type NetworkACLRuleCollectionFirst struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalNetworkACLRuleCollectionFirst unmarshals an instance of NetworkACLRuleCollectionFirst from the specified map of raw messages.
func UnmarshalNetworkACLRuleCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLRuleCollectionFirst)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACLRuleCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
type NetworkACLRuleCollectionNext struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalNetworkACLRuleCollectionNext unmarshals an instance of NetworkACLRuleCollectionNext from the specified map of raw messages.
func UnmarshalNetworkACLRuleCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLRuleCollectionNext)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACLRuleItem : NetworkACLRuleItem struct
// Models which "extend" this model:
// - NetworkACLRuleItemNetworkACLRuleProtocolTcpudp
// - NetworkACLRuleItemNetworkACLRuleProtocolIcmp
// - NetworkACLRuleItemNetworkACLRuleProtocolAll
type NetworkACLRuleItem struct {
	// Whether to allow or deny matching traffic.
	Action *string `json:"action" validate:"required"`

	// The rule that this rule is immediately before. In a rule collection, this always
	// refers to the next item in the collection. If absent, this is the last rule.
	Before *NetworkACLRuleReference `json:"before,omitempty"`

	// The date and time that the rule was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The destination CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses.
	Destination *string `json:"destination" validate:"required"`

	// Whether the traffic to be matched is `inbound` or `outbound`.
	Direction *string `json:"direction" validate:"required"`

	// The URL for this network ACL rule.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this network ACL rule.
	ID *string `json:"id" validate:"required"`

	// The IP version for this rule.
	IPVersion *string `json:"ip_version" validate:"required"`

	// The user-defined name for this rule. Names must be unique within the network ACL the rule resides in. If
	// unspecified, the name will be a hyphenated list of randomly-selected words.
	Name *string `json:"name" validate:"required"`

	// The protocol to enforce.
	Protocol *string `json:"protocol" validate:"required"`

	// The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses.
	Source *string `json:"source" validate:"required"`

	// The inclusive upper bound of TCP/UDP destination port range.
	DestinationPortMax *int64 `json:"destination_port_max,omitempty"`

	// The inclusive lower bound of TCP/UDP destination port range.
	DestinationPortMin *int64 `json:"destination_port_min,omitempty"`

	// The inclusive upper bound of TCP/UDP source port range.
	SourcePortMax *int64 `json:"source_port_max,omitempty"`

	// The inclusive lower bound of TCP/UDP source port range.
	SourcePortMin *int64 `json:"source_port_min,omitempty"`

	// The ICMP traffic code to allow. If unspecified, all codes are allowed. This can only be specified if type is also
	// specified.
	Code *int64 `json:"code,omitempty"`

	// The ICMP traffic type to allow. If unspecified, all types are allowed by this rule.
	Type *int64 `json:"type,omitempty"`
}

// Constants associated with the NetworkACLRuleItem.Action property.
// Whether to allow or deny matching traffic.
const (
	NetworkACLRuleItemActionAllowConst = "allow"
	NetworkACLRuleItemActionDenyConst  = "deny"
)

// Constants associated with the NetworkACLRuleItem.Direction property.
// Whether the traffic to be matched is `inbound` or `outbound`.
const (
	NetworkACLRuleItemDirectionInboundConst  = "inbound"
	NetworkACLRuleItemDirectionOutboundConst = "outbound"
)

// Constants associated with the NetworkACLRuleItem.IPVersion property.
// The IP version for this rule.
const (
	NetworkACLRuleItemIPVersionIpv4Const = "ipv4"
	NetworkACLRuleItemIPVersionIpv6Const = "ipv6"
)

func (*NetworkACLRuleItem) isaNetworkACLRuleItem() bool {
	return true
}

type NetworkACLRuleItemIntf interface {
	isaNetworkACLRuleItem() bool
}

// UnmarshalNetworkACLRuleItem unmarshals an instance of NetworkACLRuleItem from the specified map of raw messages.
func UnmarshalNetworkACLRuleItem(m map[string]json.RawMessage, result interface{}) (err error) {
	// Retrieve discriminator value to determine correct "subclass".
	var discValue string
	err = core.UnmarshalPrimitive(m, "protocol", &discValue)
	if err != nil {
		err = fmt.Errorf("error unmarshalling discriminator property 'protocol': %s", err.Error())
		return
	}
	if discValue == "" {
		err = fmt.Errorf("required discriminator property 'protocol' not found in JSON object")
		return
	}
	if discValue == "all" {
		err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleItemNetworkACLRuleProtocolAll)
	} else if discValue == "icmp" {
		err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleItemNetworkACLRuleProtocolIcmp)
	} else if discValue == "tcp" {
		err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleItemNetworkACLRuleProtocolTcpudp)
	} else if discValue == "udp" {
		err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleItemNetworkACLRuleProtocolTcpudp)
	} else {
		err = fmt.Errorf("unrecognized value for discriminator property 'protocol': %s", discValue)
	}
	return
}

// NetworkACLRulePatch : NetworkACLRulePatch struct
type NetworkACLRulePatch struct {
	// Whether to allow or deny matching traffic.
	Action *string `json:"action,omitempty"`

	// The rule to move this rule immediately before. Specify `null` to move this rule after
	// all existing rules.
	Before NetworkACLRuleBeforePatchIntf `json:"before,omitempty"`

	// The ICMP traffic code to allow.
	Code *int64 `json:"code,omitempty"`

	// The destination IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses.
	Destination *string `json:"destination,omitempty"`

	// The inclusive upper bound of TCP/UDP destination port range.
	DestinationPortMax *int64 `json:"destination_port_max,omitempty"`

	// The inclusive lower bound of TCP/UDP destination port range.
	DestinationPortMin *int64 `json:"destination_port_min,omitempty"`

	// Whether the traffic to be matched is `inbound` or `outbound`.
	Direction *string `json:"direction,omitempty"`

	// The user-defined name for this rule. Names must be unique within the network ACL the rule resides in.
	Name *string `json:"name,omitempty"`

	// The source IP address or CIDR block.  The CIDR block `0.0.0.0/0` applies to all addresses.
	Source *string `json:"source,omitempty"`

	// The inclusive upper bound of TCP/UDP source port range.
	SourcePortMax *int64 `json:"source_port_max,omitempty"`

	// The inclusive lower bound of TCP/UDP source port range.
	SourcePortMin *int64 `json:"source_port_min,omitempty"`

	// The ICMP traffic type to allow.
	Type *int64 `json:"type,omitempty"`
}

// Constants associated with the NetworkACLRulePatch.Action property.
// Whether to allow or deny matching traffic.
const (
	NetworkACLRulePatchActionAllowConst = "allow"
	NetworkACLRulePatchActionDenyConst  = "deny"
)

// Constants associated with the NetworkACLRulePatch.Direction property.
// Whether the traffic to be matched is `inbound` or `outbound`.
const (
	NetworkACLRulePatchDirectionInboundConst  = "inbound"
	NetworkACLRulePatchDirectionOutboundConst = "outbound"
)

// UnmarshalNetworkACLRulePatch unmarshals an instance of NetworkACLRulePatch from the specified map of raw messages.
func UnmarshalNetworkACLRulePatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLRulePatch)
	err = core.UnmarshalPrimitive(m, "action", &obj.Action)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleBeforePatch)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "code", &obj.Code)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "destination", &obj.Destination)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "destination_port_max", &obj.DestinationPortMax)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "destination_port_min", &obj.DestinationPortMin)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "direction", &obj.Direction)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "source", &obj.Source)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "source_port_max", &obj.SourcePortMax)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "source_port_min", &obj.SourcePortMin)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the NetworkACLRulePatch
func (networkACLRulePatch *NetworkACLRulePatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(networkACLRulePatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// NetworkACLRulePrototype : NetworkACLRulePrototype struct
// Models which "extend" this model:
// - NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp
// - NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp
// - NetworkACLRulePrototypeNetworkACLRuleProtocolAll
type NetworkACLRulePrototype struct {
	// Whether to allow or deny matching traffic.
	Action *string `json:"action" validate:"required"`

	// The rule to insert this rule immediately before. If omitted, this rule will be
	// inserted after all existing rules.
	Before NetworkACLRuleBeforePrototypeIntf `json:"before,omitempty"`

	// The destination IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses.
	Destination *string `json:"destination" validate:"required"`

	// Whether the traffic to be matched is `inbound` or `outbound`.
	Direction *string `json:"direction" validate:"required"`

	// The user-defined name for this rule. Names must be unique within the network ACL the rule resides in. If
	// unspecified, the name will be a hyphenated list of randomly-selected words.
	Name *string `json:"name,omitempty"`

	// The protocol to enforce.
	Protocol *string `json:"protocol" validate:"required"`

	// The source IP address or CIDR block.  The CIDR block `0.0.0.0/0` applies to all addresses.
	Source *string `json:"source" validate:"required"`

	// The inclusive upper bound of TCP/UDP destination port range.
	DestinationPortMax *int64 `json:"destination_port_max,omitempty"`

	// The inclusive lower bound of TCP/UDP destination port range.
	DestinationPortMin *int64 `json:"destination_port_min,omitempty"`

	// The inclusive upper bound of TCP/UDP source port range.
	SourcePortMax *int64 `json:"source_port_max,omitempty"`

	// The inclusive lower bound of TCP/UDP source port range.
	SourcePortMin *int64 `json:"source_port_min,omitempty"`

	// The ICMP traffic code to allow. If unspecified, all codes are allowed. This can only be specified if type is also
	// specified.
	Code *int64 `json:"code,omitempty"`

	// The ICMP traffic type to allow. If unspecified, all types are allowed by this rule.
	Type *int64 `json:"type,omitempty"`
}

// Constants associated with the NetworkACLRulePrototype.Action property.
// Whether to allow or deny matching traffic.
const (
	NetworkACLRulePrototypeActionAllowConst = "allow"
	NetworkACLRulePrototypeActionDenyConst  = "deny"
)

// Constants associated with the NetworkACLRulePrototype.Direction property.
// Whether the traffic to be matched is `inbound` or `outbound`.
const (
	NetworkACLRulePrototypeDirectionInboundConst  = "inbound"
	NetworkACLRulePrototypeDirectionOutboundConst = "outbound"
)

func (*NetworkACLRulePrototype) isaNetworkACLRulePrototype() bool {
	return true
}

type NetworkACLRulePrototypeIntf interface {
	isaNetworkACLRulePrototype() bool
}

// UnmarshalNetworkACLRulePrototype unmarshals an instance of NetworkACLRulePrototype from the specified map of raw messages.
func UnmarshalNetworkACLRulePrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	// Retrieve discriminator value to determine correct "subclass".
	var discValue string
	err = core.UnmarshalPrimitive(m, "protocol", &discValue)
	if err != nil {
		err = fmt.Errorf("error unmarshalling discriminator property 'protocol': %s", err.Error())
		return
	}
	if discValue == "" {
		err = fmt.Errorf("required discriminator property 'protocol' not found in JSON object")
		return
	}
	if discValue == "all" {
		err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolAll)
	} else if discValue == "icmp" {
		err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp)
	} else if discValue == "tcp" {
		err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp)
	} else if discValue == "udp" {
		err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp)
	} else {
		err = fmt.Errorf("unrecognized value for discriminator property 'protocol': %s", discValue)
	}
	return
}

// NetworkACLRulePrototypeNetworkACLContext : NetworkACLRulePrototypeNetworkACLContext struct
// Models which "extend" this model:
// - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp
// - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp
// - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll
type NetworkACLRulePrototypeNetworkACLContext struct {
	// Whether to allow or deny matching traffic.
	Action *string `json:"action" validate:"required"`

	// The destination IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses.
	Destination *string `json:"destination" validate:"required"`

	// Whether the traffic to be matched is `inbound` or `outbound`.
	Direction *string `json:"direction" validate:"required"`

	// The user-defined name for this rule. Names must be unique within the network ACL the rule resides in. If
	// unspecified, the name will be a hyphenated list of randomly-selected words.
	Name *string `json:"name,omitempty"`

	// The protocol to enforce.
	Protocol *string `json:"protocol" validate:"required"`

	// The source IP address or CIDR block.  The CIDR block `0.0.0.0/0` applies to all addresses.
	Source *string `json:"source" validate:"required"`

	// The inclusive upper bound of TCP/UDP destination port range.
	DestinationPortMax *int64 `json:"destination_port_max,omitempty"`

	// The inclusive lower bound of TCP/UDP destination port range.
	DestinationPortMin *int64 `json:"destination_port_min,omitempty"`

	// The inclusive upper bound of TCP/UDP source port range.
	SourcePortMax *int64 `json:"source_port_max,omitempty"`

	// The inclusive lower bound of TCP/UDP source port range.
	SourcePortMin *int64 `json:"source_port_min,omitempty"`

	// The ICMP traffic code to allow. If unspecified, all codes are allowed. This can only be specified if type is also
	// specified.
	Code *int64 `json:"code,omitempty"`

	// The ICMP traffic type to allow. If unspecified, all types are allowed by this rule.
	Type *int64 `json:"type,omitempty"`
}

// Constants associated with the NetworkACLRulePrototypeNetworkACLContext.Action property.
// Whether to allow or deny matching traffic.
const (
	NetworkACLRulePrototypeNetworkACLContextActionAllowConst = "allow"
	NetworkACLRulePrototypeNetworkACLContextActionDenyConst  = "deny"
)

// Constants associated with the NetworkACLRulePrototypeNetworkACLContext.Direction property.
// Whether the traffic to be matched is `inbound` or `outbound`.
const (
	NetworkACLRulePrototypeNetworkACLContextDirectionInboundConst  = "inbound"
	NetworkACLRulePrototypeNetworkACLContextDirectionOutboundConst = "outbound"
)

func (*NetworkACLRulePrototypeNetworkACLContext) isaNetworkACLRulePrototypeNetworkACLContext() bool {
	return true
}

type NetworkACLRulePrototypeNetworkACLContextIntf interface {
	isaNetworkACLRulePrototypeNetworkACLContext() bool
}

// UnmarshalNetworkACLRulePrototypeNetworkACLContext unmarshals an instance of NetworkACLRulePrototypeNetworkACLContext from the specified map of raw messages.
func UnmarshalNetworkACLRulePrototypeNetworkACLContext(m map[string]json.RawMessage, result interface{}) (err error) {
	// Retrieve discriminator value to determine correct "subclass".
	var discValue string
	err = core.UnmarshalPrimitive(m, "protocol", &discValue)
	if err != nil {
		err = fmt.Errorf("error unmarshalling discriminator property 'protocol': %s", err.Error())
		return
	}
	if discValue == "" {
		err = fmt.Errorf("required discriminator property 'protocol' not found in JSON object")
		return
	}
	if discValue == "all" {
		err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll)
	} else if discValue == "icmp" {
		err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp)
	} else if discValue == "tcp" {
		err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp)
	} else if discValue == "udp" {
		err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp)
	} else {
		err = fmt.Errorf("unrecognized value for discriminator property 'protocol': %s", discValue)
	}
	return
}

// NetworkACLRuleReference : NetworkACLRuleReference struct
type NetworkACLRuleReference struct {
	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *NetworkACLRuleReferenceDeleted `json:"deleted,omitempty"`

	// The URL for this network ACL rule.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this network ACL rule.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this network ACL rule.
	Name *string `json:"name" validate:"required"`
}

// UnmarshalNetworkACLRuleReference unmarshals an instance of NetworkACLRuleReference from the specified map of raw messages.
func UnmarshalNetworkACLRuleReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLRuleReference)
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalNetworkACLRuleReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACLRuleReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type NetworkACLRuleReferenceDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalNetworkACLRuleReferenceDeleted unmarshals an instance of NetworkACLRuleReferenceDeleted from the specified map of raw messages.
func UnmarshalNetworkACLRuleReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLRuleReferenceDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkInterface : NetworkInterface struct
type NetworkInterface struct {
	// Indicates whether source IP spoofing is allowed on this interface. If false, source IP spoofing is prevented on this
	// interface. If true, source IP spoofing is allowed on this interface.
	AllowIPSpoofing *bool `json:"allow_ip_spoofing" validate:"required"`

	// The date and time that the network interface was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// Array of references to floating IPs associated with this network interface.
	FloatingIps []FloatingIPReference `json:"floating_ips,omitempty"`

	// The URL for this network interface.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this network interface.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this network interface.
	Name *string `json:"name" validate:"required"`

	// The network interface port speed in Mbps.
	PortSpeed *int64 `json:"port_speed" validate:"required"`

	// The primary IPv4 address.
	PrimaryIpv4Address *string `json:"primary_ipv4_address" validate:"required"`

	// The resource type.
	ResourceType *string `json:"resource_type" validate:"required"`

	// Collection of security groups.
	SecurityGroups []SecurityGroupReference `json:"security_groups" validate:"required"`

	// The status of the network interface.
	Status *string `json:"status" validate:"required"`

	// The associated subnet.
	Subnet *SubnetReference `json:"subnet" validate:"required"`

	// The type of this network interface as it relates to an instance.
	Type *string `json:"type" validate:"required"`
}

// Constants associated with the NetworkInterface.ResourceType property.
// The resource type.
const (
	NetworkInterfaceResourceTypeNetworkInterfaceConst = "network_interface"
)

// Constants associated with the NetworkInterface.Status property.
// The status of the network interface.
const (
	NetworkInterfaceStatusAvailableConst = "available"
	NetworkInterfaceStatusDeletingConst  = "deleting"
	NetworkInterfaceStatusFailedConst    = "failed"
	NetworkInterfaceStatusPendingConst   = "pending"
)

// Constants associated with the NetworkInterface.Type property.
// The type of this network interface as it relates to an instance.
const (
	NetworkInterfaceTypePrimaryConst   = "primary"
	NetworkInterfaceTypeSecondaryConst = "secondary"
)

// UnmarshalNetworkInterface unmarshals an instance of NetworkInterface from the specified map of raw messages.
func UnmarshalNetworkInterface(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkInterface)
	err = core.UnmarshalPrimitive(m, "allow_ip_spoofing", &obj.AllowIPSpoofing)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "floating_ips", &obj.FloatingIps, UnmarshalFloatingIPReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "port_speed", &obj.PortSpeed)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "primary_ipv4_address", &obj.PrimaryIpv4Address)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "status", &obj.Status)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkInterfaceCollection : NetworkInterfaceCollection struct
type NetworkInterfaceCollection struct {
	// A link to the first page of resources.
	First *NetworkInterfaceCollectionFirst `json:"first" validate:"required"`

	// The maximum number of resources that can be returned by the request.
	Limit *int64 `json:"limit" validate:"required"`

	// Collection of network interfaces.
	NetworkInterfaces []NetworkInterface `json:"network_interfaces" validate:"required"`

	// A link to the next page of resources. This property is present for all pages
	// except the last page.
	Next *NetworkInterfaceCollectionNext `json:"next,omitempty"`

	// The total number of resources across all pages.
	TotalCount *int64 `json:"total_count" validate:"required"`
}

// UnmarshalNetworkInterfaceCollection unmarshals an instance of NetworkInterfaceCollection from the specified map of raw messages.
func UnmarshalNetworkInterfaceCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkInterfaceCollection)
	err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalNetworkInterfaceCollectionFirst)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterface)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalNetworkInterfaceCollectionNext)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkInterfaceCollectionFirst : A link to the first page of resources.
type NetworkInterfaceCollectionFirst struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalNetworkInterfaceCollectionFirst unmarshals an instance of NetworkInterfaceCollectionFirst from the specified map of raw messages.
func UnmarshalNetworkInterfaceCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkInterfaceCollectionFirst)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkInterfaceCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
type NetworkInterfaceCollectionNext struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalNetworkInterfaceCollectionNext unmarshals an instance of NetworkInterfaceCollectionNext from the specified map of raw messages.
func UnmarshalNetworkInterfaceCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkInterfaceCollectionNext)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkInterfaceInstanceContextReference : NetworkInterfaceInstanceContextReference struct
type NetworkInterfaceInstanceContextReference struct {
	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *NetworkInterfaceInstanceContextReferenceDeleted `json:"deleted,omitempty"`

	// The URL for this network interface.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this network interface.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this network interface.
	Name *string `json:"name" validate:"required"`

	// The primary IPv4 address.
	PrimaryIpv4Address *string `json:"primary_ipv4_address" validate:"required"`

	// The resource type.
	ResourceType *string `json:"resource_type" validate:"required"`

	// The associated subnet.
	Subnet *SubnetReference `json:"subnet" validate:"required"`
}

// Constants associated with the NetworkInterfaceInstanceContextReference.ResourceType property.
// The resource type.
const (
	NetworkInterfaceInstanceContextReferenceResourceTypeNetworkInterfaceConst = "network_interface"
)

// UnmarshalNetworkInterfaceInstanceContextReference unmarshals an instance of NetworkInterfaceInstanceContextReference from the specified map of raw messages.
func UnmarshalNetworkInterfaceInstanceContextReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkInterfaceInstanceContextReference)
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalNetworkInterfaceInstanceContextReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "primary_ipv4_address", &obj.PrimaryIpv4Address)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkInterfaceInstanceContextReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type NetworkInterfaceInstanceContextReferenceDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalNetworkInterfaceInstanceContextReferenceDeleted unmarshals an instance of NetworkInterfaceInstanceContextReferenceDeleted from the specified map of raw messages.
func UnmarshalNetworkInterfaceInstanceContextReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkInterfaceInstanceContextReferenceDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkInterfacePatch : NetworkInterfacePatch struct
type NetworkInterfacePatch struct {
	// Indicates whether source IP spoofing is allowed on this interface. If false, source IP spoofing is prevented on this
	// interface. If true, source IP spoofing is allowed on this interface.
	AllowIPSpoofing *bool `json:"allow_ip_spoofing,omitempty"`

	// The user-defined name for this network interface.
	Name *string `json:"name,omitempty"`
}

// UnmarshalNetworkInterfacePatch unmarshals an instance of NetworkInterfacePatch from the specified map of raw messages.
func UnmarshalNetworkInterfacePatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkInterfacePatch)
	err = core.UnmarshalPrimitive(m, "allow_ip_spoofing", &obj.AllowIPSpoofing)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the NetworkInterfacePatch
func (networkInterfacePatch *NetworkInterfacePatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(networkInterfacePatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// NetworkInterfacePrototype : NetworkInterfacePrototype struct
type NetworkInterfacePrototype struct {
	// Indicates whether source IP spoofing is allowed on this interface. If false, source IP spoofing is prevented on this
	// interface. If true, source IP spoofing is allowed on this interface.
	AllowIPSpoofing *bool `json:"allow_ip_spoofing,omitempty"`

	// The user-defined name for this network interface. If unspecified, the name will be a hyphenated list of
	// randomly-selected words.
	Name *string `json:"name,omitempty"`

	// The primary IPv4 address. If specified, it must be an available address on the network interface's subnet. If
	// unspecified, an available address on the subnet will be automatically selected.
	PrimaryIpv4Address *string `json:"primary_ipv4_address,omitempty"`

	// Collection of security groups.
	SecurityGroups []SecurityGroupIdentityIntf `json:"security_groups,omitempty"`

	// The associated subnet.
	Subnet SubnetIdentityIntf `json:"subnet" validate:"required"`
}

// NewNetworkInterfacePrototype : Instantiate NetworkInterfacePrototype (Generic Model Constructor)
func (*VpcV1) NewNetworkInterfacePrototype(subnet SubnetIdentityIntf) (model *NetworkInterfacePrototype, err error) {
	model = &NetworkInterfacePrototype{
		Subnet: subnet,
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

// UnmarshalNetworkInterfacePrototype unmarshals an instance of NetworkInterfacePrototype from the specified map of raw messages.
func UnmarshalNetworkInterfacePrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkInterfacePrototype)
	err = core.UnmarshalPrimitive(m, "allow_ip_spoofing", &obj.AllowIPSpoofing)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "primary_ipv4_address", &obj.PrimaryIpv4Address)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkInterfaceReference : NetworkInterfaceReference struct
type NetworkInterfaceReference struct {
	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *NetworkInterfaceReferenceDeleted `json:"deleted,omitempty"`

	// The URL for this network interface.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this network interface.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this network interface.
	Name *string `json:"name" validate:"required"`

	// The primary IPv4 address.
	PrimaryIpv4Address *string `json:"primary_ipv4_address" validate:"required"`

	// The resource type.
	ResourceType *string `json:"resource_type" validate:"required"`
}

// Constants associated with the NetworkInterfaceReference.ResourceType property.
// The resource type.
const (
	NetworkInterfaceReferenceResourceTypeNetworkInterfaceConst = "network_interface"
)

// UnmarshalNetworkInterfaceReference unmarshals an instance of NetworkInterfaceReference from the specified map of raw messages.
func UnmarshalNetworkInterfaceReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkInterfaceReference)
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalNetworkInterfaceReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "primary_ipv4_address", &obj.PrimaryIpv4Address)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkInterfaceReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type NetworkInterfaceReferenceDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalNetworkInterfaceReferenceDeleted unmarshals an instance of NetworkInterfaceReferenceDeleted from the specified map of raw messages.
func UnmarshalNetworkInterfaceReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkInterfaceReferenceDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkInterfaceReferenceTargetContextDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type NetworkInterfaceReferenceTargetContextDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalNetworkInterfaceReferenceTargetContextDeleted unmarshals an instance of NetworkInterfaceReferenceTargetContextDeleted from the specified map of raw messages.
func UnmarshalNetworkInterfaceReferenceTargetContextDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkInterfaceReferenceTargetContextDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkInterfaceUnpaginatedCollection : NetworkInterfaceUnpaginatedCollection struct
type NetworkInterfaceUnpaginatedCollection struct {
	// Collection of network interfaces.
	NetworkInterfaces []NetworkInterface `json:"network_interfaces" validate:"required"`
}

// UnmarshalNetworkInterfaceUnpaginatedCollection unmarshals an instance of NetworkInterfaceUnpaginatedCollection from the specified map of raw messages.
func UnmarshalNetworkInterfaceUnpaginatedCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkInterfaceUnpaginatedCollection)
	err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterface)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// OperatingSystem : OperatingSystem struct
type OperatingSystem struct {
	// The operating system architecture.
	Architecture *string `json:"architecture" validate:"required"`

	// Images with this operating system can only be used on dedicated hosts or dedicated host groups.
	DedicatedHostOnly *bool `json:"dedicated_host_only" validate:"required"`

	// A unique, display-friendly name for the operating system.
	DisplayName *string `json:"display_name" validate:"required"`

	// The name of the software family this operating system belongs to.
	Family *string `json:"family" validate:"required"`

	// The URL for this operating system.
	Href *string `json:"href" validate:"required"`

	// The globally unique name for this operating system.
	Name *string `json:"name" validate:"required"`

	// The vendor of the operating system.
	Vendor *string `json:"vendor" validate:"required"`

	// The major release version of this operating system.
	Version *string `json:"version" validate:"required"`
}

// UnmarshalOperatingSystem unmarshals an instance of OperatingSystem from the specified map of raw messages.
func UnmarshalOperatingSystem(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(OperatingSystem)
	err = core.UnmarshalPrimitive(m, "architecture", &obj.Architecture)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "dedicated_host_only", &obj.DedicatedHostOnly)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "display_name", &obj.DisplayName)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "family", &obj.Family)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "vendor", &obj.Vendor)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "version", &obj.Version)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// OperatingSystemCollection : OperatingSystemCollection struct
type OperatingSystemCollection struct {
	// A link to the first page of resources.
	First *OperatingSystemCollectionFirst `json:"first" validate:"required"`

	// The maximum number of resources that can be returned by the request.
	Limit *int64 `json:"limit" validate:"required"`

	// A link to the next page of resources. This property is present for all pages
	// except the last page.
	Next *OperatingSystemCollectionNext `json:"next,omitempty"`

	// Collection of operating systems.
	OperatingSystems []OperatingSystem `json:"operating_systems" validate:"required"`
}

// UnmarshalOperatingSystemCollection unmarshals an instance of OperatingSystemCollection from the specified map of raw messages.
func UnmarshalOperatingSystemCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(OperatingSystemCollection)
	err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalOperatingSystemCollectionFirst)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalOperatingSystemCollectionNext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "operating_systems", &obj.OperatingSystems, UnmarshalOperatingSystem)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// OperatingSystemCollectionFirst : A link to the first page of resources.
type OperatingSystemCollectionFirst struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalOperatingSystemCollectionFirst unmarshals an instance of OperatingSystemCollectionFirst from the specified map of raw messages.
func UnmarshalOperatingSystemCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(OperatingSystemCollectionFirst)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// OperatingSystemCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
type OperatingSystemCollectionNext struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalOperatingSystemCollectionNext unmarshals an instance of OperatingSystemCollectionNext from the specified map of raw messages.
func UnmarshalOperatingSystemCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(OperatingSystemCollectionNext)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// OperatingSystemIdentity : Identifies an operating system by a unique property.
// Models which "extend" this model:
// - OperatingSystemIdentityByName
// - OperatingSystemIdentityByHref
type OperatingSystemIdentity struct {
	// The globally unique name for this operating system.
	Name *string `json:"name,omitempty"`

	// The URL for this operating system.
	Href *string `json:"href,omitempty"`
}

func (*OperatingSystemIdentity) isaOperatingSystemIdentity() bool {
	return true
}

type OperatingSystemIdentityIntf interface {
	isaOperatingSystemIdentity() bool
}

// UnmarshalOperatingSystemIdentity unmarshals an instance of OperatingSystemIdentity from the specified map of raw messages.
func UnmarshalOperatingSystemIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(OperatingSystemIdentity)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// PublicGateway : PublicGateway struct
type PublicGateway struct {
	// The date and time that the public gateway was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The CRN for this public gateway.
	CRN *string `json:"crn" validate:"required"`

	// Reference to the floating IP which is bound to this public gateway.
	FloatingIP *PublicGatewayFloatingIP `json:"floating_ip" validate:"required"`

	// The URL for this public gateway.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this public gateway.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this public gateway.
	Name *string `json:"name" validate:"required"`

	// The resource group for this public gateway.
	ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`

	// The resource type.
	ResourceType *string `json:"resource_type" validate:"required"`

	// The status of the volume.
	Status *string `json:"status" validate:"required"`

	// The VPC this public gateway serves.
	VPC *VPCReference `json:"vpc" validate:"required"`

	// The zone this public gateway resides in.
	Zone *ZoneReference `json:"zone" validate:"required"`
}

// Constants associated with the PublicGateway.ResourceType property.
// The resource type.
const (
	PublicGatewayResourceTypePublicGatewayConst = "public_gateway"
)

// Constants associated with the PublicGateway.Status property.
// The status of the volume.
const (
	PublicGatewayStatusAvailableConst = "available"
	PublicGatewayStatusDeletingConst  = "deleting"
	PublicGatewayStatusFailedConst    = "failed"
	PublicGatewayStatusPendingConst   = "pending"
)

// UnmarshalPublicGateway unmarshals an instance of PublicGateway from the specified map of raw messages.
func UnmarshalPublicGateway(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(PublicGateway)
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "floating_ip", &obj.FloatingIP, UnmarshalPublicGatewayFloatingIP)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "status", &obj.Status)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneReference)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// PublicGatewayCollection : PublicGatewayCollection struct
type PublicGatewayCollection struct {
	// A link to the first page of resources.
	First *PublicGatewayCollectionFirst `json:"first" validate:"required"`

	// The maximum number of resources that can be returned by the request.
	Limit *int64 `json:"limit" validate:"required"`

	// A link to the next page of resources. This property is present for all pages
	// except the last page.
	Next *PublicGatewayCollectionNext `json:"next,omitempty"`

	// Collection of public gateways.
	PublicGateways []PublicGateway `json:"public_gateways" validate:"required"`

	// The total number of resources across all pages.
	TotalCount *int64 `json:"total_count" validate:"required"`
}

// UnmarshalPublicGatewayCollection unmarshals an instance of PublicGatewayCollection from the specified map of raw messages.
func UnmarshalPublicGatewayCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(PublicGatewayCollection)
	err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalPublicGatewayCollectionFirst)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalPublicGatewayCollectionNext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "public_gateways", &obj.PublicGateways, UnmarshalPublicGateway)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// PublicGatewayCollectionFirst : A link to the first page of resources.
type PublicGatewayCollectionFirst struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalPublicGatewayCollectionFirst unmarshals an instance of PublicGatewayCollectionFirst from the specified map of raw messages.
func UnmarshalPublicGatewayCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(PublicGatewayCollectionFirst)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// PublicGatewayCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
type PublicGatewayCollectionNext struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalPublicGatewayCollectionNext unmarshals an instance of PublicGatewayCollectionNext from the specified map of raw messages.
func UnmarshalPublicGatewayCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(PublicGatewayCollectionNext)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// PublicGatewayFloatingIP : Reference to the floating IP which is bound to this public gateway.
type PublicGatewayFloatingIP struct {
	// The globally unique IP address.
	Address *string `json:"address" validate:"required"`

	// The CRN for this floating IP.
	CRN *string `json:"crn" validate:"required"`

	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *FloatingIPReferenceDeleted `json:"deleted,omitempty"`

	// The URL for this floating IP.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this floating IP.
	ID *string `json:"id" validate:"required"`

	// The unique user-defined name for this floating IP.
	Name *string `json:"name" validate:"required"`
}

// UnmarshalPublicGatewayFloatingIP unmarshals an instance of PublicGatewayFloatingIP from the specified map of raw messages.
func UnmarshalPublicGatewayFloatingIP(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(PublicGatewayFloatingIP)
	err = core.UnmarshalPrimitive(m, "address", &obj.Address)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalFloatingIPReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// PublicGatewayFloatingIPPrototype : PublicGatewayFloatingIPPrototype struct
// Models which "extend" this model:
// - PublicGatewayFloatingIPPrototypeFloatingIPIdentity
// - PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext
type PublicGatewayFloatingIPPrototype struct {
	// The unique identifier for this floating IP.
	ID *string `json:"id,omitempty"`

	// The CRN for this floating IP.
	CRN *string `json:"crn,omitempty"`

	// The URL for this floating IP.
	Href *string `json:"href,omitempty"`

	// The globally unique IP address.
	Address *string `json:"address,omitempty"`

	// The unique user-defined name for this floating IP. If unspecified, the name will be a hyphenated list of
	// randomly-selected words.
	Name *string `json:"name,omitempty"`

	// The resource group to use. If unspecified, the account's [default resource
	// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
	ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`
}

func (*PublicGatewayFloatingIPPrototype) isaPublicGatewayFloatingIPPrototype() bool {
	return true
}

type PublicGatewayFloatingIPPrototypeIntf interface {
	isaPublicGatewayFloatingIPPrototype() bool
}

// UnmarshalPublicGatewayFloatingIPPrototype unmarshals an instance of PublicGatewayFloatingIPPrototype from the specified map of raw messages.
func UnmarshalPublicGatewayFloatingIPPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(PublicGatewayFloatingIPPrototype)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "address", &obj.Address)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// PublicGatewayIdentity : Identifies a public gateway by a unique property.
// Models which "extend" this model:
// - PublicGatewayIdentityByID
// - PublicGatewayIdentityByCRN
// - PublicGatewayIdentityByHref
type PublicGatewayIdentity struct {
	// The unique identifier for this public gateway.
	ID *string `json:"id,omitempty"`

	// The CRN for this public gateway.
	CRN *string `json:"crn,omitempty"`

	// The URL for this public gateway.
	Href *string `json:"href,omitempty"`
}

func (*PublicGatewayIdentity) isaPublicGatewayIdentity() bool {
	return true
}

type PublicGatewayIdentityIntf interface {
	isaPublicGatewayIdentity() bool
}

// UnmarshalPublicGatewayIdentity unmarshals an instance of PublicGatewayIdentity from the specified map of raw messages.
func UnmarshalPublicGatewayIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(PublicGatewayIdentity)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// PublicGatewayPatch : PublicGatewayPatch struct
type PublicGatewayPatch struct {
	// The user-defined name for this public gateway. Names must be unique within the VPC the public gateway resides in.
	Name *string `json:"name,omitempty"`
}

// UnmarshalPublicGatewayPatch unmarshals an instance of PublicGatewayPatch from the specified map of raw messages.
func UnmarshalPublicGatewayPatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(PublicGatewayPatch)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the PublicGatewayPatch
func (publicGatewayPatch *PublicGatewayPatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(publicGatewayPatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// PublicGatewayReference : PublicGatewayReference struct
type PublicGatewayReference struct {
	// The CRN for this public gateway.
	CRN *string `json:"crn" validate:"required"`

	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *PublicGatewayReferenceDeleted `json:"deleted,omitempty"`

	// The URL for this public gateway.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this public gateway.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this public gateway.
	Name *string `json:"name" validate:"required"`

	// The resource type.
	ResourceType *string `json:"resource_type" validate:"required"`
}

// Constants associated with the PublicGatewayReference.ResourceType property.
// The resource type.
const (
	PublicGatewayReferenceResourceTypePublicGatewayConst = "public_gateway"
)

// UnmarshalPublicGatewayReference unmarshals an instance of PublicGatewayReference from the specified map of raw messages.
func UnmarshalPublicGatewayReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(PublicGatewayReference)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalPublicGatewayReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// PublicGatewayReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type PublicGatewayReferenceDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalPublicGatewayReferenceDeleted unmarshals an instance of PublicGatewayReferenceDeleted from the specified map of raw messages.
func UnmarshalPublicGatewayReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(PublicGatewayReferenceDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// Region : Region struct
type Region struct {
	// The API endpoint for this region.
	Endpoint *string `json:"endpoint" validate:"required"`

	// The URL for this region.
	Href *string `json:"href" validate:"required"`

	// The globally unique name for this region.
	Name *string `json:"name" validate:"required"`

	// The availability status of this region.
	Status *string `json:"status" validate:"required"`
}

// Constants associated with the Region.Status property.
// The availability status of this region.
const (
	RegionStatusAvailableConst   = "available"
	RegionStatusUnavailableConst = "unavailable"
)

// UnmarshalRegion unmarshals an instance of Region from the specified map of raw messages.
func UnmarshalRegion(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(Region)
	err = core.UnmarshalPrimitive(m, "endpoint", &obj.Endpoint)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "status", &obj.Status)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// RegionCollection : RegionCollection struct
type RegionCollection struct {
	// Collection of regions.
	Regions []Region `json:"regions" validate:"required"`
}

// UnmarshalRegionCollection unmarshals an instance of RegionCollection from the specified map of raw messages.
func UnmarshalRegionCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(RegionCollection)
	err = core.UnmarshalModel(m, "regions", &obj.Regions, UnmarshalRegion)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// RegionReference : RegionReference struct
type RegionReference struct {
	// The URL for this region.
	Href *string `json:"href" validate:"required"`

	// The globally unique name for this region.
	Name *string `json:"name" validate:"required"`
}

// UnmarshalRegionReference unmarshals an instance of RegionReference from the specified map of raw messages.
func UnmarshalRegionReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(RegionReference)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// RemoveEndpointGatewayIPOptions : The RemoveEndpointGatewayIP options.
type RemoveEndpointGatewayIPOptions struct {
	// The endpoint gateway identifier.
	EndpointGatewayID *string `validate:"required,ne="`

	// The reserved IP identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewRemoveEndpointGatewayIPOptions : Instantiate RemoveEndpointGatewayIPOptions
func (*VpcV1) NewRemoveEndpointGatewayIPOptions(endpointGatewayID string, id string) *RemoveEndpointGatewayIPOptions {
	return &RemoveEndpointGatewayIPOptions{
		EndpointGatewayID: core.StringPtr(endpointGatewayID),
		ID:                core.StringPtr(id),
	}
}

// SetEndpointGatewayID : Allow user to set EndpointGatewayID
func (options *RemoveEndpointGatewayIPOptions) SetEndpointGatewayID(endpointGatewayID string) *RemoveEndpointGatewayIPOptions {
	options.EndpointGatewayID = core.StringPtr(endpointGatewayID)
	return options
}

// SetID : Allow user to set ID
func (options *RemoveEndpointGatewayIPOptions) SetID(id string) *RemoveEndpointGatewayIPOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *RemoveEndpointGatewayIPOptions) SetHeaders(param map[string]string) *RemoveEndpointGatewayIPOptions {
	options.Headers = param
	return options
}

// RemoveInstanceNetworkInterfaceFloatingIPOptions : The RemoveInstanceNetworkInterfaceFloatingIP options.
type RemoveInstanceNetworkInterfaceFloatingIPOptions struct {
	// The instance identifier.
	InstanceID *string `validate:"required,ne="`

	// The network interface identifier.
	NetworkInterfaceID *string `validate:"required,ne="`

	// The floating IP identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewRemoveInstanceNetworkInterfaceFloatingIPOptions : Instantiate RemoveInstanceNetworkInterfaceFloatingIPOptions
func (*VpcV1) NewRemoveInstanceNetworkInterfaceFloatingIPOptions(instanceID string, networkInterfaceID string, id string) *RemoveInstanceNetworkInterfaceFloatingIPOptions {
	return &RemoveInstanceNetworkInterfaceFloatingIPOptions{
		InstanceID:         core.StringPtr(instanceID),
		NetworkInterfaceID: core.StringPtr(networkInterfaceID),
		ID:                 core.StringPtr(id),
	}
}

// SetInstanceID : Allow user to set InstanceID
func (options *RemoveInstanceNetworkInterfaceFloatingIPOptions) SetInstanceID(instanceID string) *RemoveInstanceNetworkInterfaceFloatingIPOptions {
	options.InstanceID = core.StringPtr(instanceID)
	return options
}

// SetNetworkInterfaceID : Allow user to set NetworkInterfaceID
func (options *RemoveInstanceNetworkInterfaceFloatingIPOptions) SetNetworkInterfaceID(networkInterfaceID string) *RemoveInstanceNetworkInterfaceFloatingIPOptions {
	options.NetworkInterfaceID = core.StringPtr(networkInterfaceID)
	return options
}

// SetID : Allow user to set ID
func (options *RemoveInstanceNetworkInterfaceFloatingIPOptions) SetID(id string) *RemoveInstanceNetworkInterfaceFloatingIPOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *RemoveInstanceNetworkInterfaceFloatingIPOptions) SetHeaders(param map[string]string) *RemoveInstanceNetworkInterfaceFloatingIPOptions {
	options.Headers = param
	return options
}

// RemoveSecurityGroupNetworkInterfaceOptions : The RemoveSecurityGroupNetworkInterface options.
type RemoveSecurityGroupNetworkInterfaceOptions struct {
	// The security group identifier.
	SecurityGroupID *string `validate:"required,ne="`

	// The network interface identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewRemoveSecurityGroupNetworkInterfaceOptions : Instantiate RemoveSecurityGroupNetworkInterfaceOptions
func (*VpcV1) NewRemoveSecurityGroupNetworkInterfaceOptions(securityGroupID string, id string) *RemoveSecurityGroupNetworkInterfaceOptions {
	return &RemoveSecurityGroupNetworkInterfaceOptions{
		SecurityGroupID: core.StringPtr(securityGroupID),
		ID:              core.StringPtr(id),
	}
}

// SetSecurityGroupID : Allow user to set SecurityGroupID
func (options *RemoveSecurityGroupNetworkInterfaceOptions) SetSecurityGroupID(securityGroupID string) *RemoveSecurityGroupNetworkInterfaceOptions {
	options.SecurityGroupID = core.StringPtr(securityGroupID)
	return options
}

// SetID : Allow user to set ID
func (options *RemoveSecurityGroupNetworkInterfaceOptions) SetID(id string) *RemoveSecurityGroupNetworkInterfaceOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *RemoveSecurityGroupNetworkInterfaceOptions) SetHeaders(param map[string]string) *RemoveSecurityGroupNetworkInterfaceOptions {
	options.Headers = param
	return options
}

// RemoveVPNGatewayConnectionLocalCIDROptions : The RemoveVPNGatewayConnectionLocalCIDR options.
type RemoveVPNGatewayConnectionLocalCIDROptions struct {
	// The VPN gateway identifier.
	VPNGatewayID *string `validate:"required,ne="`

	// The VPN gateway connection identifier.
	ID *string `validate:"required,ne="`

	// The address prefix part of the CIDR.
	CIDRPrefix *string `validate:"required,ne="`

	// The prefix length part of the CIDR.
	PrefixLength *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewRemoveVPNGatewayConnectionLocalCIDROptions : Instantiate RemoveVPNGatewayConnectionLocalCIDROptions
func (*VpcV1) NewRemoveVPNGatewayConnectionLocalCIDROptions(vpnGatewayID string, id string, cidrPrefix string, prefixLength string) *RemoveVPNGatewayConnectionLocalCIDROptions {
	return &RemoveVPNGatewayConnectionLocalCIDROptions{
		VPNGatewayID: core.StringPtr(vpnGatewayID),
		ID:           core.StringPtr(id),
		CIDRPrefix:   core.StringPtr(cidrPrefix),
		PrefixLength: core.StringPtr(prefixLength),
	}
}

// SetVPNGatewayID : Allow user to set VPNGatewayID
func (options *RemoveVPNGatewayConnectionLocalCIDROptions) SetVPNGatewayID(vpnGatewayID string) *RemoveVPNGatewayConnectionLocalCIDROptions {
	options.VPNGatewayID = core.StringPtr(vpnGatewayID)
	return options
}

// SetID : Allow user to set ID
func (options *RemoveVPNGatewayConnectionLocalCIDROptions) SetID(id string) *RemoveVPNGatewayConnectionLocalCIDROptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetCIDRPrefix : Allow user to set CIDRPrefix
func (options *RemoveVPNGatewayConnectionLocalCIDROptions) SetCIDRPrefix(cidrPrefix string) *RemoveVPNGatewayConnectionLocalCIDROptions {
	options.CIDRPrefix = core.StringPtr(cidrPrefix)
	return options
}

// SetPrefixLength : Allow user to set PrefixLength
func (options *RemoveVPNGatewayConnectionLocalCIDROptions) SetPrefixLength(prefixLength string) *RemoveVPNGatewayConnectionLocalCIDROptions {
	options.PrefixLength = core.StringPtr(prefixLength)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *RemoveVPNGatewayConnectionLocalCIDROptions) SetHeaders(param map[string]string) *RemoveVPNGatewayConnectionLocalCIDROptions {
	options.Headers = param
	return options
}

// RemoveVPNGatewayConnectionPeerCIDROptions : The RemoveVPNGatewayConnectionPeerCIDR options.
type RemoveVPNGatewayConnectionPeerCIDROptions struct {
	// The VPN gateway identifier.
	VPNGatewayID *string `validate:"required,ne="`

	// The VPN gateway connection identifier.
	ID *string `validate:"required,ne="`

	// The address prefix part of the CIDR.
	CIDRPrefix *string `validate:"required,ne="`

	// The prefix length part of the CIDR.
	PrefixLength *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewRemoveVPNGatewayConnectionPeerCIDROptions : Instantiate RemoveVPNGatewayConnectionPeerCIDROptions
func (*VpcV1) NewRemoveVPNGatewayConnectionPeerCIDROptions(vpnGatewayID string, id string, cidrPrefix string, prefixLength string) *RemoveVPNGatewayConnectionPeerCIDROptions {
	return &RemoveVPNGatewayConnectionPeerCIDROptions{
		VPNGatewayID: core.StringPtr(vpnGatewayID),
		ID:           core.StringPtr(id),
		CIDRPrefix:   core.StringPtr(cidrPrefix),
		PrefixLength: core.StringPtr(prefixLength),
	}
}

// SetVPNGatewayID : Allow user to set VPNGatewayID
func (options *RemoveVPNGatewayConnectionPeerCIDROptions) SetVPNGatewayID(vpnGatewayID string) *RemoveVPNGatewayConnectionPeerCIDROptions {
	options.VPNGatewayID = core.StringPtr(vpnGatewayID)
	return options
}

// SetID : Allow user to set ID
func (options *RemoveVPNGatewayConnectionPeerCIDROptions) SetID(id string) *RemoveVPNGatewayConnectionPeerCIDROptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetCIDRPrefix : Allow user to set CIDRPrefix
func (options *RemoveVPNGatewayConnectionPeerCIDROptions) SetCIDRPrefix(cidrPrefix string) *RemoveVPNGatewayConnectionPeerCIDROptions {
	options.CIDRPrefix = core.StringPtr(cidrPrefix)
	return options
}

// SetPrefixLength : Allow user to set PrefixLength
func (options *RemoveVPNGatewayConnectionPeerCIDROptions) SetPrefixLength(prefixLength string) *RemoveVPNGatewayConnectionPeerCIDROptions {
	options.PrefixLength = core.StringPtr(prefixLength)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *RemoveVPNGatewayConnectionPeerCIDROptions) SetHeaders(param map[string]string) *RemoveVPNGatewayConnectionPeerCIDROptions {
	options.Headers = param
	return options
}

// ReplaceLoadBalancerPoolMembersOptions : The ReplaceLoadBalancerPoolMembers options.
type ReplaceLoadBalancerPoolMembersOptions struct {
	// The load balancer identifier.
	LoadBalancerID *string `validate:"required,ne="`

	// The pool identifier.
	PoolID *string `validate:"required,ne="`

	// Array of pool member prototype objects.
	Members []LoadBalancerPoolMemberPrototype `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewReplaceLoadBalancerPoolMembersOptions : Instantiate ReplaceLoadBalancerPoolMembersOptions
func (*VpcV1) NewReplaceLoadBalancerPoolMembersOptions(loadBalancerID string, poolID string, members []LoadBalancerPoolMemberPrototype) *ReplaceLoadBalancerPoolMembersOptions {
	return &ReplaceLoadBalancerPoolMembersOptions{
		LoadBalancerID: core.StringPtr(loadBalancerID),
		PoolID:         core.StringPtr(poolID),
		Members:        members,
	}
}

// SetLoadBalancerID : Allow user to set LoadBalancerID
func (options *ReplaceLoadBalancerPoolMembersOptions) SetLoadBalancerID(loadBalancerID string) *ReplaceLoadBalancerPoolMembersOptions {
	options.LoadBalancerID = core.StringPtr(loadBalancerID)
	return options
}

// SetPoolID : Allow user to set PoolID
func (options *ReplaceLoadBalancerPoolMembersOptions) SetPoolID(poolID string) *ReplaceLoadBalancerPoolMembersOptions {
	options.PoolID = core.StringPtr(poolID)
	return options
}

// SetMembers : Allow user to set Members
func (options *ReplaceLoadBalancerPoolMembersOptions) SetMembers(members []LoadBalancerPoolMemberPrototype) *ReplaceLoadBalancerPoolMembersOptions {
	options.Members = members
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ReplaceLoadBalancerPoolMembersOptions) SetHeaders(param map[string]string) *ReplaceLoadBalancerPoolMembersOptions {
	options.Headers = param
	return options
}

// ReplaceSubnetNetworkACLOptions : The ReplaceSubnetNetworkACL options.
type ReplaceSubnetNetworkACLOptions struct {
	// The subnet identifier.
	ID *string `validate:"required,ne="`

	// The network ACL identity.
	NetworkACLIdentity NetworkACLIdentityIntf `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewReplaceSubnetNetworkACLOptions : Instantiate ReplaceSubnetNetworkACLOptions
func (*VpcV1) NewReplaceSubnetNetworkACLOptions(id string, networkACLIdentity NetworkACLIdentityIntf) *ReplaceSubnetNetworkACLOptions {
	return &ReplaceSubnetNetworkACLOptions{
		ID:                 core.StringPtr(id),
		NetworkACLIdentity: networkACLIdentity,
	}
}

// SetID : Allow user to set ID
func (options *ReplaceSubnetNetworkACLOptions) SetID(id string) *ReplaceSubnetNetworkACLOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetNetworkACLIdentity : Allow user to set NetworkACLIdentity
func (options *ReplaceSubnetNetworkACLOptions) SetNetworkACLIdentity(networkACLIdentity NetworkACLIdentityIntf) *ReplaceSubnetNetworkACLOptions {
	options.NetworkACLIdentity = networkACLIdentity
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ReplaceSubnetNetworkACLOptions) SetHeaders(param map[string]string) *ReplaceSubnetNetworkACLOptions {
	options.Headers = param
	return options
}

// ReplaceSubnetRoutingTableOptions : The ReplaceSubnetRoutingTable options.
type ReplaceSubnetRoutingTableOptions struct {
	// The subnet identifier.
	ID *string `validate:"required,ne="`

	// The routing table identity.
	RoutingTableIdentity RoutingTableIdentityIntf `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewReplaceSubnetRoutingTableOptions : Instantiate ReplaceSubnetRoutingTableOptions
func (*VpcV1) NewReplaceSubnetRoutingTableOptions(id string, routingTableIdentity RoutingTableIdentityIntf) *ReplaceSubnetRoutingTableOptions {
	return &ReplaceSubnetRoutingTableOptions{
		ID:                   core.StringPtr(id),
		RoutingTableIdentity: routingTableIdentity,
	}
}

// SetID : Allow user to set ID
func (options *ReplaceSubnetRoutingTableOptions) SetID(id string) *ReplaceSubnetRoutingTableOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetRoutingTableIdentity : Allow user to set RoutingTableIdentity
func (options *ReplaceSubnetRoutingTableOptions) SetRoutingTableIdentity(routingTableIdentity RoutingTableIdentityIntf) *ReplaceSubnetRoutingTableOptions {
	options.RoutingTableIdentity = routingTableIdentity
	return options
}

// SetHeaders : Allow user to set Headers
func (options *ReplaceSubnetRoutingTableOptions) SetHeaders(param map[string]string) *ReplaceSubnetRoutingTableOptions {
	options.Headers = param
	return options
}

// ReservedIP : ReservedIP struct
type ReservedIP struct {
	// The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this
	// property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing
	// and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
	Address *string `json:"address" validate:"required"`

	// If set to `true`, this reserved IP will be automatically deleted when the target is deleted or when the reserved IP
	// is unbound.
	AutoDelete *bool `json:"auto_delete" validate:"required"`

	// The date and time that the reserved IP was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The URL for this reserved IP.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this reserved IP.
	ID *string `json:"id" validate:"required"`

	// The user-defined or system-provided name for this reserved IP.
	Name *string `json:"name" validate:"required"`

	// The owner of a reserved IP, defining whether it is managed by the user or the provider.
	Owner *string `json:"owner" validate:"required"`

	// The resource type.
	ResourceType *string `json:"resource_type" validate:"required"`

	// The target of this reserved IP.
	Target ReservedIPTargetIntf `json:"target,omitempty"`
}

// Constants associated with the ReservedIP.Owner property.
// The owner of a reserved IP, defining whether it is managed by the user or the provider.
const (
	ReservedIPOwnerProviderConst = "provider"
	ReservedIPOwnerUserConst     = "user"
)

// Constants associated with the ReservedIP.ResourceType property.
// The resource type.
const (
	ReservedIPResourceTypeSubnetReservedIPConst = "subnet_reserved_ip"
)

// UnmarshalReservedIP unmarshals an instance of ReservedIP from the specified map of raw messages.
func UnmarshalReservedIP(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ReservedIP)
	err = core.UnmarshalPrimitive(m, "address", &obj.Address)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "owner", &obj.Owner)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalReservedIPTarget)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ReservedIPCollection : ReservedIPCollection struct
type ReservedIPCollection struct {
	// A link to the first page of resources.
	First *ReservedIPCollectionFirst `json:"first" validate:"required"`

	// The maximum number of resources that can be returned by the request.
	Limit *int64 `json:"limit" validate:"required"`

	// A link to the next page of resources. This property is present for all pages
	// except the last page.
	Next *ReservedIPCollectionNext `json:"next,omitempty"`

	// Collection of reserved IPs in this subnet.
	ReservedIps []ReservedIP `json:"reserved_ips" validate:"required"`

	// The total number of resources across all pages.
	TotalCount *int64 `json:"total_count" validate:"required"`
}

// UnmarshalReservedIPCollection unmarshals an instance of ReservedIPCollection from the specified map of raw messages.
func UnmarshalReservedIPCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ReservedIPCollection)
	err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalReservedIPCollectionFirst)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalReservedIPCollectionNext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "reserved_ips", &obj.ReservedIps, UnmarshalReservedIP)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ReservedIPCollectionEndpointGatewayContext : ReservedIPCollectionEndpointGatewayContext struct
type ReservedIPCollectionEndpointGatewayContext struct {
	// A link to the first page of resources.
	First *ReservedIPCollectionEndpointGatewayContextFirst `json:"first" validate:"required"`

	// Collection of reserved IPs bound to an endpoint gateway.
	Ips []ReservedIP `json:"ips" validate:"required"`

	// The maximum number of resources that can be returned by the request.
	Limit *int64 `json:"limit" validate:"required"`

	// A link to the next page of resources. This property is present for all pages
	// except the last page.
	Next *ReservedIPCollectionEndpointGatewayContextNext `json:"next,omitempty"`

	// The total number of resources across all pages.
	TotalCount *int64 `json:"total_count" validate:"required"`
}

// UnmarshalReservedIPCollectionEndpointGatewayContext unmarshals an instance of ReservedIPCollectionEndpointGatewayContext from the specified map of raw messages.
func UnmarshalReservedIPCollectionEndpointGatewayContext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ReservedIPCollectionEndpointGatewayContext)
	err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalReservedIPCollectionEndpointGatewayContextFirst)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "ips", &obj.Ips, UnmarshalReservedIP)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalReservedIPCollectionEndpointGatewayContextNext)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ReservedIPCollectionEndpointGatewayContextFirst : A link to the first page of resources.
type ReservedIPCollectionEndpointGatewayContextFirst struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalReservedIPCollectionEndpointGatewayContextFirst unmarshals an instance of ReservedIPCollectionEndpointGatewayContextFirst from the specified map of raw messages.
func UnmarshalReservedIPCollectionEndpointGatewayContextFirst(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ReservedIPCollectionEndpointGatewayContextFirst)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ReservedIPCollectionEndpointGatewayContextNext : A link to the next page of resources. This property is present for all pages except the last page.
type ReservedIPCollectionEndpointGatewayContextNext struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalReservedIPCollectionEndpointGatewayContextNext unmarshals an instance of ReservedIPCollectionEndpointGatewayContextNext from the specified map of raw messages.
func UnmarshalReservedIPCollectionEndpointGatewayContextNext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ReservedIPCollectionEndpointGatewayContextNext)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ReservedIPCollectionFirst : A link to the first page of resources.
type ReservedIPCollectionFirst struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalReservedIPCollectionFirst unmarshals an instance of ReservedIPCollectionFirst from the specified map of raw messages.
func UnmarshalReservedIPCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ReservedIPCollectionFirst)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ReservedIPCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
type ReservedIPCollectionNext struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalReservedIPCollectionNext unmarshals an instance of ReservedIPCollectionNext from the specified map of raw messages.
func UnmarshalReservedIPCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ReservedIPCollectionNext)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ReservedIPPatch : ReservedIPPatch struct
type ReservedIPPatch struct {
	// If set to `true`, this reserved IP will be automatically deleted when the target is deleted or when the reserved IP
	// is unbound. The value cannot be set to `true` if the reserved IP is unbound.
	AutoDelete *bool `json:"auto_delete,omitempty"`

	// The user-defined name for this reserved IP. Names must be unique within the subnet the reserved IP resides in. Names
	// beginning with `ibm-` are reserved for provider-owned resources.
	Name *string `json:"name,omitempty"`
}

// UnmarshalReservedIPPatch unmarshals an instance of ReservedIPPatch from the specified map of raw messages.
func UnmarshalReservedIPPatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ReservedIPPatch)
	err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the ReservedIPPatch
func (reservedIPPatch *ReservedIPPatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(reservedIPPatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// ReservedIPReference : ReservedIPReference struct
type ReservedIPReference struct {
	// The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this
	// property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing
	// and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
	Address *string `json:"address" validate:"required"`

	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *ReservedIPReferenceDeleted `json:"deleted,omitempty"`

	// The URL for this reserved IP.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this reserved IP.
	ID *string `json:"id" validate:"required"`

	// The user-defined or system-provided name for this reserved IP.
	Name *string `json:"name" validate:"required"`

	// The resource type.
	ResourceType *string `json:"resource_type" validate:"required"`
}

// Constants associated with the ReservedIPReference.ResourceType property.
// The resource type.
const (
	ReservedIPReferenceResourceTypeSubnetReservedIPConst = "subnet_reserved_ip"
)

// UnmarshalReservedIPReference unmarshals an instance of ReservedIPReference from the specified map of raw messages.
func UnmarshalReservedIPReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ReservedIPReference)
	err = core.UnmarshalPrimitive(m, "address", &obj.Address)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalReservedIPReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ReservedIPReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type ReservedIPReferenceDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalReservedIPReferenceDeleted unmarshals an instance of ReservedIPReferenceDeleted from the specified map of raw messages.
func UnmarshalReservedIPReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ReservedIPReferenceDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ReservedIPTarget : The target of this reserved IP.
// Models which "extend" this model:
// - ReservedIPTargetEndpointGatewayReference
type ReservedIPTarget struct {
	// The CRN for this endpoint gateway.
	CRN *string `json:"crn,omitempty"`

	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *EndpointGatewayReferenceDeleted `json:"deleted,omitempty"`

	// The URL for this endpoint gateway.
	Href *string `json:"href,omitempty"`

	// The unique identifier for this endpoint gateway.
	ID *string `json:"id,omitempty"`

	// The unique user-defined name for this endpoint gateway.
	Name *string `json:"name,omitempty"`

	// The type of resource referenced.
	ResourceType *string `json:"resource_type,omitempty"`
}

// Constants associated with the ReservedIPTarget.ResourceType property.
// The type of resource referenced.
const (
	ReservedIPTargetResourceTypeEndpointGatewayConst = "endpoint_gateway"
)

func (*ReservedIPTarget) isaReservedIPTarget() bool {
	return true
}

type ReservedIPTargetIntf interface {
	isaReservedIPTarget() bool
}

// UnmarshalReservedIPTarget unmarshals an instance of ReservedIPTarget from the specified map of raw messages.
func UnmarshalReservedIPTarget(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ReservedIPTarget)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalEndpointGatewayReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ReservedIPTargetPrototype : The target this reserved IP is to be bound to.
// Models which "extend" this model:
// - ReservedIPTargetPrototypeEndpointGatewayIdentity
type ReservedIPTargetPrototype struct {
	// The unique identifier for this endpoint gateway.
	ID *string `json:"id,omitempty"`

	// The CRN for this endpoint gateway.
	CRN *string `json:"crn,omitempty"`

	// The URL for this endpoint gateway.
	Href *string `json:"href,omitempty"`
}

func (*ReservedIPTargetPrototype) isaReservedIPTargetPrototype() bool {
	return true
}

type ReservedIPTargetPrototypeIntf interface {
	isaReservedIPTargetPrototype() bool
}

// UnmarshalReservedIPTargetPrototype unmarshals an instance of ReservedIPTargetPrototype from the specified map of raw messages.
func UnmarshalReservedIPTargetPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ReservedIPTargetPrototype)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ResourceGroupIdentity : The resource group to use. If unspecified, the account's [default resource
// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
// Models which "extend" this model:
// - ResourceGroupIdentityByID
type ResourceGroupIdentity struct {
	// The unique identifier for this resource group.
	ID *string `json:"id,omitempty"`
}

func (*ResourceGroupIdentity) isaResourceGroupIdentity() bool {
	return true
}

type ResourceGroupIdentityIntf interface {
	isaResourceGroupIdentity() bool
}

// UnmarshalResourceGroupIdentity unmarshals an instance of ResourceGroupIdentity from the specified map of raw messages.
func UnmarshalResourceGroupIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ResourceGroupIdentity)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ResourceGroupReference : ResourceGroupReference struct
type ResourceGroupReference struct {
	// The URL for this resource group.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this resource group.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this resource group.
	Name *string `json:"name" validate:"required"`
}

// UnmarshalResourceGroupReference unmarshals an instance of ResourceGroupReference from the specified map of raw messages.
func UnmarshalResourceGroupReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ResourceGroupReference)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// Route : Route struct
type Route struct {
	// The date and time that the route was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The destination of the route.
	Destination *string `json:"destination" validate:"required"`

	// The URL for this route.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this route.
	ID *string `json:"id" validate:"required"`

	// The lifecycle state of the route.
	LifecycleState *string `json:"lifecycle_state" validate:"required"`

	// The user-defined name for this route.
	Name *string `json:"name" validate:"required"`

	// If `action` is `deliver`, the next hop that packets will be delivered to.  For
	// other `action` values, its `address` will be `0.0.0.0`.
	NextHop RouteNextHopIntf `json:"next_hop" validate:"required"`

	// The zone the route applies to. (Traffic from subnets in this zone will be
	// subject to this route.).
	Zone *ZoneReference `json:"zone" validate:"required"`
}

// Constants associated with the Route.LifecycleState property.
// The lifecycle state of the route.
const (
	RouteLifecycleStateDeletedConst   = "deleted"
	RouteLifecycleStateDeletingConst  = "deleting"
	RouteLifecycleStateFailedConst    = "failed"
	RouteLifecycleStatePendingConst   = "pending"
	RouteLifecycleStateStableConst    = "stable"
	RouteLifecycleStateSuspendedConst = "suspended"
	RouteLifecycleStateUpdatingConst  = "updating"
	RouteLifecycleStateWaitingConst   = "waiting"
)

// UnmarshalRoute unmarshals an instance of Route from the specified map of raw messages.
func UnmarshalRoute(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(Route)
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "destination", &obj.Destination)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next_hop", &obj.NextHop, UnmarshalRouteNextHop)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneReference)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// RouteCollection : RouteCollection struct
type RouteCollection struct {
	// A link to the first page of resources.
	First *RouteCollectionFirst `json:"first" validate:"required"`

	// The maximum number of resources that can be returned by the request.
	Limit *int64 `json:"limit" validate:"required"`

	// A link to the next page of resources. This property is present for all pages
	// except the last page.
	Next *RouteCollectionNext `json:"next,omitempty"`

	// Collection of routes.
	Routes []Route `json:"routes" validate:"required"`

	// The total number of resources across all pages.
	TotalCount *int64 `json:"total_count" validate:"required"`
}

// UnmarshalRouteCollection unmarshals an instance of RouteCollection from the specified map of raw messages.
func UnmarshalRouteCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(RouteCollection)
	err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalRouteCollectionFirst)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalRouteCollectionNext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "routes", &obj.Routes, UnmarshalRoute)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// RouteCollectionFirst : A link to the first page of resources.
type RouteCollectionFirst struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalRouteCollectionFirst unmarshals an instance of RouteCollectionFirst from the specified map of raw messages.
func UnmarshalRouteCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(RouteCollectionFirst)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// RouteCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
type RouteCollectionNext struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalRouteCollectionNext unmarshals an instance of RouteCollectionNext from the specified map of raw messages.
func UnmarshalRouteCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(RouteCollectionNext)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// RouteNextHop : RouteNextHop struct
// Models which "extend" this model:
// - RouteNextHopIP
// - RouteNextHopVPNGatewayConnectionReference
type RouteNextHop struct {
	// The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this
	// property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing
	// and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
	Address *string `json:"address,omitempty"`

	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *VPNGatewayConnectionReferenceDeleted `json:"deleted,omitempty"`

	// The VPN connection's canonical URL.
	Href *string `json:"href,omitempty"`

	// The unique identifier for this VPN gateway connection.
	ID *string `json:"id,omitempty"`

	// The user-defined name for this VPN connection.
	Name *string `json:"name,omitempty"`

	// The resource type.
	ResourceType *string `json:"resource_type,omitempty"`
}

// Constants associated with the RouteNextHop.ResourceType property.
// The resource type.
const (
	RouteNextHopResourceTypeVPNGatewayConnectionConst = "vpn_gateway_connection"
)

func (*RouteNextHop) isaRouteNextHop() bool {
	return true
}

type RouteNextHopIntf interface {
	isaRouteNextHop() bool
}

// UnmarshalRouteNextHop unmarshals an instance of RouteNextHop from the specified map of raw messages.
func UnmarshalRouteNextHop(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(RouteNextHop)
	err = core.UnmarshalPrimitive(m, "address", &obj.Address)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVPNGatewayConnectionReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// RouteNextHopPrototype : The next hop packets will be routed to.
// Models which "extend" this model:
// - RouteNextHopPrototypeRouteNextHopIP
// - RouteNextHopPrototypeVPNGatewayConnectionIdentity
type RouteNextHopPrototype struct {
	// The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this
	// property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing
	// and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
	Address *string `json:"address,omitempty"`

	// The unique identifier for this VPN gateway connection.
	ID *string `json:"id,omitempty"`

	// The VPN connection's canonical URL.
	Href *string `json:"href,omitempty"`
}

func (*RouteNextHopPrototype) isaRouteNextHopPrototype() bool {
	return true
}

type RouteNextHopPrototypeIntf interface {
	isaRouteNextHopPrototype() bool
}

// UnmarshalRouteNextHopPrototype unmarshals an instance of RouteNextHopPrototype from the specified map of raw messages.
func UnmarshalRouteNextHopPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(RouteNextHopPrototype)
	err = core.UnmarshalPrimitive(m, "address", &obj.Address)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// RoutePatch : RoutePatch struct
type RoutePatch struct {
	// The user-defined name for this route. Names must be unique within the VPC routing table the route resides in.
	Name *string `json:"name,omitempty"`
}

// UnmarshalRoutePatch unmarshals an instance of RoutePatch from the specified map of raw messages.
func UnmarshalRoutePatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(RoutePatch)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the RoutePatch
func (routePatch *RoutePatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(routePatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// RoutePrototype : RoutePrototype struct
type RoutePrototype struct {
	// The action to perform with a packet matching the route:
	// - `delegate`: delegate to the system's built-in routes
	// - `delegate_vpc`: delegate to the system's built-in routes, ignoring Internet-bound
	//   routes
	// - `deliver`: deliver the packet to the specified `next_hop`
	// - `drop`: drop the packet.
	Action *string `json:"action,omitempty"`

	// The destination of the route. At most two routes per `zone` in a table can have the same destination, and only if
	// both routes have an `action` of `deliver` and the
	// `next_hop` is an IP address.
	Destination *string `json:"destination" validate:"required"`

	// The user-defined name for this route. If unspecified, the name will be a hyphenated list of randomly-selected words.
	// Names must be unique within the VPC routing table the route resides in.
	Name *string `json:"name,omitempty"`

	// If `action` is `deliver`, the next hop that packets will be delivered to.  For
	// other `action` values, it must be omitted or specified as `0.0.0.0`.
	NextHop RouteNextHopPrototypeIntf `json:"next_hop,omitempty"`

	// The zone to apply the route to. (Traffic from subnets in this zone will be
	// subject to this route.).
	Zone ZoneIdentityIntf `json:"zone" validate:"required"`
}

// Constants associated with the RoutePrototype.Action property.
// The action to perform with a packet matching the route:
// - `delegate`: delegate to the system's built-in routes
// - `delegate_vpc`: delegate to the system's built-in routes, ignoring Internet-bound
//   routes
// - `deliver`: deliver the packet to the specified `next_hop`
// - `drop`: drop the packet.
const (
	RoutePrototypeActionDelegateConst    = "delegate"
	RoutePrototypeActionDelegateVPCConst = "delegate_vpc"
	RoutePrototypeActionDeliverConst     = "deliver"
	RoutePrototypeActionDropConst        = "drop"
)

// NewRoutePrototype : Instantiate RoutePrototype (Generic Model Constructor)
func (*VpcV1) NewRoutePrototype(destination string, zone ZoneIdentityIntf) (model *RoutePrototype, err error) {
	model = &RoutePrototype{
		Destination: core.StringPtr(destination),
		Zone:        zone,
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

// UnmarshalRoutePrototype unmarshals an instance of RoutePrototype from the specified map of raw messages.
func UnmarshalRoutePrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(RoutePrototype)
	err = core.UnmarshalPrimitive(m, "action", &obj.Action)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "destination", &obj.Destination)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next_hop", &obj.NextHop, UnmarshalRouteNextHopPrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// RouteReference : RouteReference struct
type RouteReference struct {
	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *RouteReferenceDeleted `json:"deleted,omitempty"`

	// The URL for this route.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this route.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this route.
	Name *string `json:"name" validate:"required"`
}

// UnmarshalRouteReference unmarshals an instance of RouteReference from the specified map of raw messages.
func UnmarshalRouteReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(RouteReference)
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalRouteReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// RouteReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type RouteReferenceDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalRouteReferenceDeleted unmarshals an instance of RouteReferenceDeleted from the specified map of raw messages.
func UnmarshalRouteReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(RouteReferenceDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// RoutingTable : RoutingTable struct
type RoutingTable struct {
	// The date and time that this routing table was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The URL for this routing table.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this routing table.
	ID *string `json:"id" validate:"required"`

	// Indicates whether this is the default routing table for this VPC.
	IsDefault *bool `json:"is_default" validate:"required"`

	// The lifecycle state of the routing table.
	LifecycleState *string `json:"lifecycle_state" validate:"required"`

	// The user-defined name for this routing table.
	Name *string `json:"name" validate:"required"`

	// The resource type.
	ResourceType *string `json:"resource_type" validate:"required"`

	// Indicates whether this routing table is used to route traffic that originates from
	// [Direct Link](https://cloud.ibm.com/docs/dl/) to this VPC.
	//
	// Incoming traffic will be routed according to the routing table with one exception: routes with an `action` of
	// `deliver` are treated as `drop` unless the `next_hop` is an IP address within the VPC's address prefix ranges.
	// Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP address or a VPN gateway
	// connection, the packet will be dropped.
	RouteDirectLinkIngress *bool `json:"route_direct_link_ingress" validate:"required"`

	// Indicates whether this routing table is used to route traffic that originates from from [Transit
	// Gateway](https://cloud.ibm.com/cloud/transit-gateway/) to this VPC.
	//
	// Incoming traffic will be routed according to the routing table with one exception: routes with an `action` of
	// `deliver` are treated as `drop` unless the `next_hop` is an IP address within the VPC's address prefix ranges.
	// Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP address or a VPN gateway
	// connection, the packet will be dropped.
	RouteTransitGatewayIngress *bool `json:"route_transit_gateway_ingress" validate:"required"`

	// Indicates whether this routing table is used to route traffic that originates from subnets in other zones in this
	// VPC.
	//
	// Incoming traffic will be routed according to the routing table with one exception: routes with an `action` of
	// `deliver` are treated as `drop` unless the `next_hop` is an IP address within the VPC's address prefix ranges.
	// Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP address or a VPN gateway
	// connection, the packet will be dropped.
	RouteVPCZoneIngress *bool `json:"route_vpc_zone_ingress" validate:"required"`

	// The routes for this routing table.
	Routes []RouteReference `json:"routes" validate:"required"`

	// The subnets to which this routing table is attached.
	Subnets []SubnetReference `json:"subnets" validate:"required"`
}

// Constants associated with the RoutingTable.LifecycleState property.
// The lifecycle state of the routing table.
const (
	RoutingTableLifecycleStateDeletedConst   = "deleted"
	RoutingTableLifecycleStateDeletingConst  = "deleting"
	RoutingTableLifecycleStateFailedConst    = "failed"
	RoutingTableLifecycleStatePendingConst   = "pending"
	RoutingTableLifecycleStateStableConst    = "stable"
	RoutingTableLifecycleStateSuspendedConst = "suspended"
	RoutingTableLifecycleStateUpdatingConst  = "updating"
	RoutingTableLifecycleStateWaitingConst   = "waiting"
)

// Constants associated with the RoutingTable.ResourceType property.
// The resource type.
const (
	RoutingTableResourceTypeRoutingTableConst = "routing_table"
)

// UnmarshalRoutingTable unmarshals an instance of RoutingTable from the specified map of raw messages.
func UnmarshalRoutingTable(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(RoutingTable)
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "is_default", &obj.IsDefault)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "route_direct_link_ingress", &obj.RouteDirectLinkIngress)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "route_transit_gateway_ingress", &obj.RouteTransitGatewayIngress)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "route_vpc_zone_ingress", &obj.RouteVPCZoneIngress)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "routes", &obj.Routes, UnmarshalRouteReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "subnets", &obj.Subnets, UnmarshalSubnetReference)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// RoutingTableCollection : RoutingTableCollection struct
type RoutingTableCollection struct {
	// A link to the first page of resources.
	First *RoutingTableCollectionFirst `json:"first" validate:"required"`

	// The maximum number of resources that can be returned by the request.
	Limit *int64 `json:"limit" validate:"required"`

	// A link to the next page of resources. This property is present for all pages
	// except the last page.
	Next *RoutingTableCollectionNext `json:"next,omitempty"`

	// Collection of routing tables.
	RoutingTables []RoutingTable `json:"routing_tables" validate:"required"`

	// The total number of resources across all pages.
	TotalCount *int64 `json:"total_count" validate:"required"`
}

// UnmarshalRoutingTableCollection unmarshals an instance of RoutingTableCollection from the specified map of raw messages.
func UnmarshalRoutingTableCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(RoutingTableCollection)
	err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalRoutingTableCollectionFirst)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalRoutingTableCollectionNext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "routing_tables", &obj.RoutingTables, UnmarshalRoutingTable)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// RoutingTableCollectionFirst : A link to the first page of resources.
type RoutingTableCollectionFirst struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalRoutingTableCollectionFirst unmarshals an instance of RoutingTableCollectionFirst from the specified map of raw messages.
func UnmarshalRoutingTableCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(RoutingTableCollectionFirst)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// RoutingTableCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
type RoutingTableCollectionNext struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalRoutingTableCollectionNext unmarshals an instance of RoutingTableCollectionNext from the specified map of raw messages.
func UnmarshalRoutingTableCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(RoutingTableCollectionNext)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// RoutingTableIdentity : Identifies a routing table by a unique property.
// Models which "extend" this model:
// - RoutingTableIdentityByID
// - RoutingTableIdentityByHref
type RoutingTableIdentity struct {
	// The unique identifier for this routing table.
	ID *string `json:"id,omitempty"`

	// The URL for this routing table.
	Href *string `json:"href,omitempty"`
}

func (*RoutingTableIdentity) isaRoutingTableIdentity() bool {
	return true
}

type RoutingTableIdentityIntf interface {
	isaRoutingTableIdentity() bool
}

// UnmarshalRoutingTableIdentity unmarshals an instance of RoutingTableIdentity from the specified map of raw messages.
func UnmarshalRoutingTableIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(RoutingTableIdentity)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// RoutingTablePatch : RoutingTablePatch struct
type RoutingTablePatch struct {
	// The user-defined name for this routing table. Names must be unique within the VPC the routing table resides in.
	Name *string `json:"name,omitempty"`

	// Indicates whether this routing table is used to route traffic that originates from
	// [Direct Link](https://cloud.ibm.com/docs/dl/) to this VPC. Updating to `true` selects this routing table, provided
	// no other routing table in the VPC already has this property set to `true`, and no subnets are attached to this
	// routing table. Updating to `false` deselects this routing table.
	//
	// Incoming traffic will be routed according to the routing table with one exception: routes with an `action` of
	// `deliver` are treated as `drop` unless the `next_hop` is an IP address within the VPC's address prefix ranges.
	// Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP address or a VPN gateway
	// connection, the packet will be dropped.
	RouteDirectLinkIngress *bool `json:"route_direct_link_ingress,omitempty"`

	// Indicates whether this routing table is used to route traffic that originates from
	// [Transit Gateway](https://cloud.ibm.com/cloud/transit-gateway/) to this VPC. Updating to
	// `true` selects this routing table, provided no other routing table in the VPC already has this property set to
	// `true`, and no subnets are attached to this routing table. Updating to `false` deselects this routing table.
	//
	// Incoming traffic will be routed according to the routing table with one exception: routes with an `action` of
	// `deliver` are treated as `drop` unless the `next_hop` is an IP address within the VPC's address prefix ranges.
	// Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP address or a VPN gateway
	// connection, the packet will be dropped.
	//
	// If [Classic Access](https://cloud.ibm.com/docs/vpc?topic=vpc-setting-up-access-to-classic-infrastructure) is enabled
	// for this VPC, and this property is set to `true`, its incoming traffic will also be routed according to this routing
	// table.
	RouteTransitGatewayIngress *bool `json:"route_transit_gateway_ingress,omitempty"`

	// Indicates whether this routing table is used to route traffic that originates from subnets in other zones in this
	// VPC. Updating to `true` selects this routing table, provided no other routing table in the VPC already has this
	// property set to `true`, and no subnets are attached to this routing table. Updating to `false` deselects this
	// routing table.
	//
	// Incoming traffic will be routed according to the routing table with one exception: routes with an `action` of
	// `deliver` are treated as `drop` unless the `next_hop` is an IP address within the VPC's address prefix ranges.
	// Therefore, if an incoming packet matches a route with a `next_hop` of an internet-bound IP address or a VPN gateway
	// connection, the packet will be dropped.
	RouteVPCZoneIngress *bool `json:"route_vpc_zone_ingress,omitempty"`
}

// UnmarshalRoutingTablePatch unmarshals an instance of RoutingTablePatch from the specified map of raw messages.
func UnmarshalRoutingTablePatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(RoutingTablePatch)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "route_direct_link_ingress", &obj.RouteDirectLinkIngress)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "route_transit_gateway_ingress", &obj.RouteTransitGatewayIngress)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "route_vpc_zone_ingress", &obj.RouteVPCZoneIngress)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the RoutingTablePatch
func (routingTablePatch *RoutingTablePatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(routingTablePatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// RoutingTableReference : RoutingTableReference struct
type RoutingTableReference struct {
	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *RoutingTableReferenceDeleted `json:"deleted,omitempty"`

	// The URL for this routing table.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this routing table.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this routing table.
	Name *string `json:"name" validate:"required"`

	// The resource type.
	ResourceType *string `json:"resource_type" validate:"required"`
}

// Constants associated with the RoutingTableReference.ResourceType property.
// The resource type.
const (
	RoutingTableReferenceResourceTypeRoutingTableConst = "routing_table"
)

// UnmarshalRoutingTableReference unmarshals an instance of RoutingTableReference from the specified map of raw messages.
func UnmarshalRoutingTableReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(RoutingTableReference)
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalRoutingTableReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// RoutingTableReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type RoutingTableReferenceDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalRoutingTableReferenceDeleted unmarshals an instance of RoutingTableReferenceDeleted from the specified map of raw messages.
func UnmarshalRoutingTableReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(RoutingTableReferenceDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroup : SecurityGroup struct
type SecurityGroup struct {
	// The date and time that this security group was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The security group's CRN.
	CRN *string `json:"crn" validate:"required"`

	// The security group's canonical URL.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this security group.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this security group. Names must be unique within the VPC the security group resides in.
	Name *string `json:"name" validate:"required"`

	// Array of references to network interfaces.
	NetworkInterfaces []NetworkInterfaceReference `json:"network_interfaces" validate:"required"`

	// The resource group for this security group.
	ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`

	// Array of rules for this security group. If no rules exist, all traffic will be denied.
	Rules []SecurityGroupRuleIntf `json:"rules" validate:"required"`

	// Array of references to targets.
	Targets []SecurityGroupTargetReferenceIntf `json:"targets" validate:"required"`

	// The VPC this security group is a part of.
	VPC *VPCReference `json:"vpc" validate:"required"`
}

// UnmarshalSecurityGroup unmarshals an instance of SecurityGroup from the specified map of raw messages.
func UnmarshalSecurityGroup(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroup)
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfaceReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "rules", &obj.Rules, UnmarshalSecurityGroupRule)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "targets", &obj.Targets, UnmarshalSecurityGroupTargetReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupCollection : SecurityGroupCollection struct
type SecurityGroupCollection struct {
	// A link to the first page of resources.
	First *SecurityGroupCollectionFirst `json:"first" validate:"required"`

	// The maximum number of resources that can be returned by the request.
	Limit *int64 `json:"limit" validate:"required"`

	// A link to the next page of resources. This property is present for all pages
	// except the last page.
	Next *SecurityGroupCollectionNext `json:"next,omitempty"`

	// Collection of security groups.
	SecurityGroups []SecurityGroup `json:"security_groups" validate:"required"`

	// The total number of resources across all pages.
	TotalCount *int64 `json:"total_count" validate:"required"`
}

// UnmarshalSecurityGroupCollection unmarshals an instance of SecurityGroupCollection from the specified map of raw messages.
func UnmarshalSecurityGroupCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupCollection)
	err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalSecurityGroupCollectionFirst)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalSecurityGroupCollectionNext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroup)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupCollectionFirst : A link to the first page of resources.
type SecurityGroupCollectionFirst struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalSecurityGroupCollectionFirst unmarshals an instance of SecurityGroupCollectionFirst from the specified map of raw messages.
func UnmarshalSecurityGroupCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupCollectionFirst)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
type SecurityGroupCollectionNext struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalSecurityGroupCollectionNext unmarshals an instance of SecurityGroupCollectionNext from the specified map of raw messages.
func UnmarshalSecurityGroupCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupCollectionNext)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupIdentity : Identifies a security group by a unique property.
// Models which "extend" this model:
// - SecurityGroupIdentityByID
// - SecurityGroupIdentityByCRN
// - SecurityGroupIdentityByHref
type SecurityGroupIdentity struct {
	// The unique identifier for this security group.
	ID *string `json:"id,omitempty"`

	// The security group's CRN.
	CRN *string `json:"crn,omitempty"`

	// The security group's canonical URL.
	Href *string `json:"href,omitempty"`
}

func (*SecurityGroupIdentity) isaSecurityGroupIdentity() bool {
	return true
}

type SecurityGroupIdentityIntf interface {
	isaSecurityGroupIdentity() bool
}

// UnmarshalSecurityGroupIdentity unmarshals an instance of SecurityGroupIdentity from the specified map of raw messages.
func UnmarshalSecurityGroupIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupIdentity)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupPatch : SecurityGroupPatch struct
type SecurityGroupPatch struct {
	// The user-defined name for this security group. Names must be unique within the VPC the security group resides in.
	Name *string `json:"name,omitempty"`
}

// UnmarshalSecurityGroupPatch unmarshals an instance of SecurityGroupPatch from the specified map of raw messages.
func UnmarshalSecurityGroupPatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupPatch)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the SecurityGroupPatch
func (securityGroupPatch *SecurityGroupPatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(securityGroupPatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// SecurityGroupReference : SecurityGroupReference struct
type SecurityGroupReference struct {
	// The security group's CRN.
	CRN *string `json:"crn" validate:"required"`

	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *SecurityGroupReferenceDeleted `json:"deleted,omitempty"`

	// The security group's canonical URL.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this security group.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this security group. Names must be unique within the VPC the security group resides in.
	Name *string `json:"name" validate:"required"`
}

// UnmarshalSecurityGroupReference unmarshals an instance of SecurityGroupReference from the specified map of raw messages.
func UnmarshalSecurityGroupReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupReference)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalSecurityGroupReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type SecurityGroupReferenceDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalSecurityGroupReferenceDeleted unmarshals an instance of SecurityGroupReferenceDeleted from the specified map of raw messages.
func UnmarshalSecurityGroupReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupReferenceDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupRule : SecurityGroupRule struct
// Models which "extend" this model:
// - SecurityGroupRuleSecurityGroupRuleProtocolAll
// - SecurityGroupRuleSecurityGroupRuleProtocolIcmp
// - SecurityGroupRuleSecurityGroupRuleProtocolTcpudp
type SecurityGroupRule struct {
	// The direction of traffic to enforce, either `inbound` or `outbound`.
	Direction *string `json:"direction" validate:"required"`

	// The URL for this security group rule.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this security group rule.
	ID *string `json:"id" validate:"required"`

	// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
	// used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
	// interfaces) in that group matching this IP version.
	IPVersion *string `json:"ip_version,omitempty"`

	// The protocol to enforce.
	Protocol *string `json:"protocol,omitempty"`

	// The IP addresses or security groups from which this rule allows traffic (or to which,
	// for outbound rules). Can be specified as an IP address, a CIDR block, or a security
	// group. A CIDR block of `0.0.0.0/0` allows traffic from any source (or to any source,
	// for outbound rules).
	Remote SecurityGroupRuleRemoteIntf `json:"remote" validate:"required"`

	// The ICMP traffic code to allow.
	Code *int64 `json:"code,omitempty"`

	// The ICMP traffic type to allow.
	Type *int64 `json:"type,omitempty"`

	// The inclusive upper bound of TCP/UDP port range.
	PortMax *int64 `json:"port_max,omitempty"`

	// The inclusive lower bound of TCP/UDP port range.
	PortMin *int64 `json:"port_min,omitempty"`
}

// Constants associated with the SecurityGroupRule.Direction property.
// The direction of traffic to enforce, either `inbound` or `outbound`.
const (
	SecurityGroupRuleDirectionInboundConst  = "inbound"
	SecurityGroupRuleDirectionOutboundConst = "outbound"
)

// Constants associated with the SecurityGroupRule.IPVersion property.
// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
// used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
// interfaces) in that group matching this IP version.
const (
	SecurityGroupRuleIPVersionIpv4Const = "ipv4"
)

func (*SecurityGroupRule) isaSecurityGroupRule() bool {
	return true
}

type SecurityGroupRuleIntf interface {
	isaSecurityGroupRule() bool
}

// UnmarshalSecurityGroupRule unmarshals an instance of SecurityGroupRule from the specified map of raw messages.
func UnmarshalSecurityGroupRule(m map[string]json.RawMessage, result interface{}) (err error) {
	// Retrieve discriminator value to determine correct "subclass".
	var discValue string
	err = core.UnmarshalPrimitive(m, "protocol", &discValue)
	if err != nil {
		err = fmt.Errorf("error unmarshalling discriminator property 'protocol': %s", err.Error())
		return
	}
	if discValue == "" {
		err = fmt.Errorf("required discriminator property 'protocol' not found in JSON object")
		return
	}
	if discValue == "all" {
		err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolAll)
	} else if discValue == "icmp" {
		err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolIcmp)
	} else if discValue == "tcp" {
		err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolTcpudp)
	} else if discValue == "udp" {
		err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolTcpudp)
	} else {
		err = fmt.Errorf("unrecognized value for discriminator property 'protocol': %s", discValue)
	}
	return
}

// SecurityGroupRuleCollection : Collection of rules in a security group.
type SecurityGroupRuleCollection struct {
	// Array of rules.
	Rules []SecurityGroupRuleIntf `json:"rules" validate:"required"`
}

// UnmarshalSecurityGroupRuleCollection unmarshals an instance of SecurityGroupRuleCollection from the specified map of raw messages.
func UnmarshalSecurityGroupRuleCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupRuleCollection)
	err = core.UnmarshalModel(m, "rules", &obj.Rules, UnmarshalSecurityGroupRule)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupRulePatch : SecurityGroupRulePatch struct
type SecurityGroupRulePatch struct {
	// The ICMP traffic code to allow. Specify `null` to remove an existing ICMP traffic code value.
	Code *int64 `json:"code,omitempty"`

	// The direction of traffic to enforce, either `inbound` or `outbound`.
	Direction *string `json:"direction,omitempty"`

	// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
	// used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
	// interfaces) in that group matching this IP version.
	IPVersion *string `json:"ip_version,omitempty"`

	// The inclusive upper bound of the protocol port range. Specify `null` to clear an existing upper bound. If a lower
	// bound has been set, the upper bound must also be set, and must not be smaller.
	PortMax *int64 `json:"port_max,omitempty"`

	// The inclusive lower bound of the protocol port range. Specify `null` to clear an existing lower bound. If an upper
	// bound has been set, the lower bound must also be set, and must not be larger.
	PortMin *int64 `json:"port_min,omitempty"`

	// The IP addresses or security groups from which this rule will allow traffic (or to
	// which, for outbound rules). Can be specified as an IP address, a CIDR block, or a
	// security group. A CIDR block of `0.0.0.0/0` will allow traffic from any source (or to
	// any source, for outbound rules).
	Remote SecurityGroupRuleRemotePatchIntf `json:"remote,omitempty"`

	// The ICMP traffic type to allow. Specify `null` to remove an existing ICMP traffic type value.
	Type *int64 `json:"type,omitempty"`
}

// Constants associated with the SecurityGroupRulePatch.Direction property.
// The direction of traffic to enforce, either `inbound` or `outbound`.
const (
	SecurityGroupRulePatchDirectionInboundConst  = "inbound"
	SecurityGroupRulePatchDirectionOutboundConst = "outbound"
)

// Constants associated with the SecurityGroupRulePatch.IPVersion property.
// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
// used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
// interfaces) in that group matching this IP version.
const (
	SecurityGroupRulePatchIPVersionIpv4Const = "ipv4"
)

// UnmarshalSecurityGroupRulePatch unmarshals an instance of SecurityGroupRulePatch from the specified map of raw messages.
func UnmarshalSecurityGroupRulePatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupRulePatch)
	err = core.UnmarshalPrimitive(m, "code", &obj.Code)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "direction", &obj.Direction)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "port_max", &obj.PortMax)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "port_min", &obj.PortMin)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRuleRemotePatch)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the SecurityGroupRulePatch
func (securityGroupRulePatch *SecurityGroupRulePatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(securityGroupRulePatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// SecurityGroupRulePrototype : SecurityGroupRulePrototype struct
// Models which "extend" this model:
// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll
// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp
// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp
type SecurityGroupRulePrototype struct {
	// The direction of traffic to enforce, either `inbound` or `outbound`.
	Direction *string `json:"direction" validate:"required"`

	// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
	// used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
	// interfaces) in that group matching this IP version.
	IPVersion *string `json:"ip_version,omitempty"`

	// The protocol to enforce.
	Protocol *string `json:"protocol,omitempty"`

	// The IP addresses or security groups from which this rule will allow traffic (or to
	// which, for outbound rules). Can be specified as an IP address, a CIDR block, or a
	// security group. If omitted, a CIDR block of `0.0.0.0/0` will be used to allow traffic
	// from any source (or to any source, for outbound rules).
	Remote SecurityGroupRuleRemotePrototypeIntf `json:"remote,omitempty"`

	// The ICMP traffic code to allow.
	Code *int64 `json:"code,omitempty"`

	// The ICMP traffic type to allow.
	Type *int64 `json:"type,omitempty"`

	// The inclusive upper bound of TCP/UDP port range.
	PortMax *int64 `json:"port_max,omitempty"`

	// The inclusive lower bound of TCP/UDP port range.
	PortMin *int64 `json:"port_min,omitempty"`
}

// Constants associated with the SecurityGroupRulePrototype.Direction property.
// The direction of traffic to enforce, either `inbound` or `outbound`.
const (
	SecurityGroupRulePrototypeDirectionInboundConst  = "inbound"
	SecurityGroupRulePrototypeDirectionOutboundConst = "outbound"
)

// Constants associated with the SecurityGroupRulePrototype.IPVersion property.
// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
// used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
// interfaces) in that group matching this IP version.
const (
	SecurityGroupRulePrototypeIPVersionIpv4Const = "ipv4"
)

func (*SecurityGroupRulePrototype) isaSecurityGroupRulePrototype() bool {
	return true
}

type SecurityGroupRulePrototypeIntf interface {
	isaSecurityGroupRulePrototype() bool
}

// UnmarshalSecurityGroupRulePrototype unmarshals an instance of SecurityGroupRulePrototype from the specified map of raw messages.
func UnmarshalSecurityGroupRulePrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	// Retrieve discriminator value to determine correct "subclass".
	var discValue string
	err = core.UnmarshalPrimitive(m, "protocol", &discValue)
	if err != nil {
		err = fmt.Errorf("error unmarshalling discriminator property 'protocol': %s", err.Error())
		return
	}
	if discValue == "" {
		err = fmt.Errorf("required discriminator property 'protocol' not found in JSON object")
		return
	}
	if discValue == "all" {
		err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAll)
	} else if discValue == "icmp" {
		err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp)
	} else if discValue == "tcp" {
		err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp)
	} else if discValue == "udp" {
		err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp)
	} else {
		err = fmt.Errorf("unrecognized value for discriminator property 'protocol': %s", discValue)
	}
	return
}

// SecurityGroupRuleRemote : The IP addresses or security groups from which this rule allows traffic (or to which, for outbound rules). Can be
// specified as an IP address, a CIDR block, or a security group. A CIDR block of `0.0.0.0/0` allows traffic from any
// source (or to any source, for outbound rules).
// Models which "extend" this model:
// - SecurityGroupRuleRemoteIP
// - SecurityGroupRuleRemoteCIDR
// - SecurityGroupRuleRemoteSecurityGroupReference
type SecurityGroupRuleRemote struct {
	// The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this
	// property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing
	// and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
	Address *string `json:"address,omitempty"`

	// The CIDR block. This property may add support for IPv6 CIDR blocks in the future. When processing a value in this
	// property, verify that the CIDR block is in an expected format. If it is not, log an error. Optionally halt
	// processing and surface the error, or bypass the resource on which the unexpected CIDR block format was encountered.
	CIDRBlock *string `json:"cidr_block,omitempty"`

	// The security group's CRN.
	CRN *string `json:"crn,omitempty"`

	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *SecurityGroupReferenceDeleted `json:"deleted,omitempty"`

	// The security group's canonical URL.
	Href *string `json:"href,omitempty"`

	// The unique identifier for this security group.
	ID *string `json:"id,omitempty"`

	// The user-defined name for this security group. Names must be unique within the VPC the security group resides in.
	Name *string `json:"name,omitempty"`
}

func (*SecurityGroupRuleRemote) isaSecurityGroupRuleRemote() bool {
	return true
}

type SecurityGroupRuleRemoteIntf interface {
	isaSecurityGroupRuleRemote() bool
}

// UnmarshalSecurityGroupRuleRemote unmarshals an instance of SecurityGroupRuleRemote from the specified map of raw messages.
func UnmarshalSecurityGroupRuleRemote(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupRuleRemote)
	err = core.UnmarshalPrimitive(m, "address", &obj.Address)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalSecurityGroupReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupRuleRemotePatch : The IP addresses or security groups from which this rule will allow traffic (or to which, for outbound rules). Can be
// specified as an IP address, a CIDR block, or a security group. A CIDR block of `0.0.0.0/0` will allow traffic from
// any source (or to any source, for outbound rules).
// Models which "extend" this model:
// - SecurityGroupRuleRemotePatchIP
// - SecurityGroupRuleRemotePatchCIDR
// - SecurityGroupRuleRemotePatchSecurityGroupIdentity
type SecurityGroupRuleRemotePatch struct {
	// The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this
	// property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing
	// and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
	Address *string `json:"address,omitempty"`

	// The CIDR block. This property may add support for IPv6 CIDR blocks in the future. When processing a value in this
	// property, verify that the CIDR block is in an expected format. If it is not, log an error. Optionally halt
	// processing and surface the error, or bypass the resource on which the unexpected CIDR block format was encountered.
	CIDRBlock *string `json:"cidr_block,omitempty"`

	// The unique identifier for this security group.
	ID *string `json:"id,omitempty"`

	// The security group's CRN.
	CRN *string `json:"crn,omitempty"`

	// The security group's canonical URL.
	Href *string `json:"href,omitempty"`
}

func (*SecurityGroupRuleRemotePatch) isaSecurityGroupRuleRemotePatch() bool {
	return true
}

type SecurityGroupRuleRemotePatchIntf interface {
	isaSecurityGroupRuleRemotePatch() bool
}

// UnmarshalSecurityGroupRuleRemotePatch unmarshals an instance of SecurityGroupRuleRemotePatch from the specified map of raw messages.
func UnmarshalSecurityGroupRuleRemotePatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupRuleRemotePatch)
	err = core.UnmarshalPrimitive(m, "address", &obj.Address)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupRuleRemotePrototype : The IP addresses or security groups from which this rule will allow traffic (or to which, for outbound rules). Can be
// specified as an IP address, a CIDR block, or a security group. If omitted, a CIDR block of `0.0.0.0/0` will be used
// to allow traffic from any source (or to any source, for outbound rules).
// Models which "extend" this model:
// - SecurityGroupRuleRemotePrototypeIP
// - SecurityGroupRuleRemotePrototypeCIDR
// - SecurityGroupRuleRemotePrototypeSecurityGroupIdentity
type SecurityGroupRuleRemotePrototype struct {
	// The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this
	// property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing
	// and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
	Address *string `json:"address,omitempty"`

	// The CIDR block. This property may add support for IPv6 CIDR blocks in the future. When processing a value in this
	// property, verify that the CIDR block is in an expected format. If it is not, log an error. Optionally halt
	// processing and surface the error, or bypass the resource on which the unexpected CIDR block format was encountered.
	CIDRBlock *string `json:"cidr_block,omitempty"`

	// The unique identifier for this security group.
	ID *string `json:"id,omitempty"`

	// The security group's CRN.
	CRN *string `json:"crn,omitempty"`

	// The security group's canonical URL.
	Href *string `json:"href,omitempty"`
}

func (*SecurityGroupRuleRemotePrototype) isaSecurityGroupRuleRemotePrototype() bool {
	return true
}

type SecurityGroupRuleRemotePrototypeIntf interface {
	isaSecurityGroupRuleRemotePrototype() bool
}

// UnmarshalSecurityGroupRuleRemotePrototype unmarshals an instance of SecurityGroupRuleRemotePrototype from the specified map of raw messages.
func UnmarshalSecurityGroupRuleRemotePrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupRuleRemotePrototype)
	err = core.UnmarshalPrimitive(m, "address", &obj.Address)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupTargetCollection : SecurityGroupTargetCollection struct
type SecurityGroupTargetCollection struct {
	// A link to the first page of resources.
	First *SecurityGroupTargetCollectionFirst `json:"first" validate:"required"`

	// The maximum number of resources that can be returned by the request.
	Limit *int64 `json:"limit" validate:"required"`

	// A link to the next page of resources. This property is present for all pages
	// except the last page.
	Next *SecurityGroupTargetCollectionNext `json:"next,omitempty"`

	// Collection of security group target references.
	Targets []SecurityGroupTargetReferenceIntf `json:"targets" validate:"required"`

	// The total number of resources across all pages.
	TotalCount *int64 `json:"total_count" validate:"required"`
}

// UnmarshalSecurityGroupTargetCollection unmarshals an instance of SecurityGroupTargetCollection from the specified map of raw messages.
func UnmarshalSecurityGroupTargetCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupTargetCollection)
	err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalSecurityGroupTargetCollectionFirst)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalSecurityGroupTargetCollectionNext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "targets", &obj.Targets, UnmarshalSecurityGroupTargetReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupTargetCollectionFirst : A link to the first page of resources.
type SecurityGroupTargetCollectionFirst struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalSecurityGroupTargetCollectionFirst unmarshals an instance of SecurityGroupTargetCollectionFirst from the specified map of raw messages.
func UnmarshalSecurityGroupTargetCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupTargetCollectionFirst)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupTargetCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
type SecurityGroupTargetCollectionNext struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalSecurityGroupTargetCollectionNext unmarshals an instance of SecurityGroupTargetCollectionNext from the specified map of raw messages.
func UnmarshalSecurityGroupTargetCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupTargetCollectionNext)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupTargetReference : The resource types that can be security group targets are expected to expand in the future. When iterating over
// security group targets, do not assume that every target resource will be from a known set of resource types.
// Optionally halt processing and surface an error, or bypass resources of unrecognized types.
// Models which "extend" this model:
// - SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext
// - SecurityGroupTargetReferenceLoadBalancerReference
type SecurityGroupTargetReference struct {
	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *NetworkInterfaceReferenceTargetContextDeleted `json:"deleted,omitempty"`

	// The URL for this network interface.
	Href *string `json:"href,omitempty"`

	// The unique identifier for this network interface.
	ID *string `json:"id,omitempty"`

	// The user-defined name for this network interface.
	Name *string `json:"name,omitempty"`

	// The resource type.
	ResourceType *string `json:"resource_type,omitempty"`

	// The load balancer's CRN.
	CRN *string `json:"crn,omitempty"`
}

// Constants associated with the SecurityGroupTargetReference.ResourceType property.
// The resource type.
const (
	SecurityGroupTargetReferenceResourceTypeNetworkInterfaceConst = "network_interface"
)

func (*SecurityGroupTargetReference) isaSecurityGroupTargetReference() bool {
	return true
}

type SecurityGroupTargetReferenceIntf interface {
	isaSecurityGroupTargetReference() bool
}

// UnmarshalSecurityGroupTargetReference unmarshals an instance of SecurityGroupTargetReference from the specified map of raw messages.
func UnmarshalSecurityGroupTargetReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupTargetReference)
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalNetworkInterfaceReferenceTargetContextDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SetSubnetPublicGatewayOptions : The SetSubnetPublicGateway options.
type SetSubnetPublicGatewayOptions struct {
	// The subnet identifier.
	ID *string `validate:"required,ne="`

	// The public gateway identity.
	PublicGatewayIdentity PublicGatewayIdentityIntf `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewSetSubnetPublicGatewayOptions : Instantiate SetSubnetPublicGatewayOptions
func (*VpcV1) NewSetSubnetPublicGatewayOptions(id string, publicGatewayIdentity PublicGatewayIdentityIntf) *SetSubnetPublicGatewayOptions {
	return &SetSubnetPublicGatewayOptions{
		ID:                    core.StringPtr(id),
		PublicGatewayIdentity: publicGatewayIdentity,
	}
}

// SetID : Allow user to set ID
func (options *SetSubnetPublicGatewayOptions) SetID(id string) *SetSubnetPublicGatewayOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetPublicGatewayIdentity : Allow user to set PublicGatewayIdentity
func (options *SetSubnetPublicGatewayOptions) SetPublicGatewayIdentity(publicGatewayIdentity PublicGatewayIdentityIntf) *SetSubnetPublicGatewayOptions {
	options.PublicGatewayIdentity = publicGatewayIdentity
	return options
}

// SetHeaders : Allow user to set Headers
func (options *SetSubnetPublicGatewayOptions) SetHeaders(param map[string]string) *SetSubnetPublicGatewayOptions {
	options.Headers = param
	return options
}

// Subnet : Subnet struct
type Subnet struct {
	// The number of IPv4 addresses in this subnet that are not in-use, and have not been reserved by the user or the
	// provider.
	AvailableIpv4AddressCount *int64 `json:"available_ipv4_address_count" validate:"required"`

	// The date and time that the subnet was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The CRN for this subnet.
	CRN *string `json:"crn" validate:"required"`

	// The URL for this subnet.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this subnet.
	ID *string `json:"id" validate:"required"`

	// The IP version(s) supported by this subnet.
	IPVersion *string `json:"ip_version" validate:"required"`

	// The IPv4 range of the subnet, expressed in CIDR format.
	Ipv4CIDRBlock *string `json:"ipv4_cidr_block" validate:"required"`

	// The user-defined name for this subnet.
	Name *string `json:"name" validate:"required"`

	// The network ACL for this subnet.
	NetworkACL *NetworkACLReference `json:"network_acl" validate:"required"`

	// The public gateway to handle internet bound traffic for this subnet.
	PublicGateway *PublicGatewayReference `json:"public_gateway,omitempty"`

	// The resource group for this subnet.
	ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`

	// The routing table for this subnet.
	RoutingTable *RoutingTableReference `json:"routing_table" validate:"required"`

	// The status of the subnet.
	Status *string `json:"status" validate:"required"`

	// The total number of IPv4 addresses in this subnet.
	//
	// Note: This is calculated as 2<sup>(32 − prefix length)</sup>. For example, the prefix length `/24` gives:<br>
	// 2<sup>(32 − 24)</sup> = 2<sup>8</sup> = 256 addresses.
	TotalIpv4AddressCount *int64 `json:"total_ipv4_address_count" validate:"required"`

	// The VPC this subnet is a part of.
	VPC *VPCReference `json:"vpc" validate:"required"`

	// The zone this subnet resides in.
	Zone *ZoneReference `json:"zone" validate:"required"`
}

// Constants associated with the Subnet.IPVersion property.
// The IP version(s) supported by this subnet.
const (
	SubnetIPVersionIpv4Const = "ipv4"
)

// Constants associated with the Subnet.Status property.
// The status of the subnet.
const (
	SubnetStatusAvailableConst = "available"
	SubnetStatusDeletingConst  = "deleting"
	SubnetStatusFailedConst    = "failed"
	SubnetStatusPendingConst   = "pending"
)

// UnmarshalSubnet unmarshals an instance of Subnet from the specified map of raw messages.
func UnmarshalSubnet(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(Subnet)
	err = core.UnmarshalPrimitive(m, "available_ipv4_address_count", &obj.AvailableIpv4AddressCount)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "ipv4_cidr_block", &obj.Ipv4CIDRBlock)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "network_acl", &obj.NetworkACL, UnmarshalNetworkACLReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "public_gateway", &obj.PublicGateway, UnmarshalPublicGatewayReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "routing_table", &obj.RoutingTable, UnmarshalRoutingTableReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "status", &obj.Status)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "total_ipv4_address_count", &obj.TotalIpv4AddressCount)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneReference)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SubnetCollection : SubnetCollection struct
type SubnetCollection struct {
	// A link to the first page of resources.
	First *SubnetCollectionFirst `json:"first" validate:"required"`

	// The maximum number of resources that can be returned by the request.
	Limit *int64 `json:"limit" validate:"required"`

	// A link to the next page of resources. This property is present for all pages
	// except the last page.
	Next *SubnetCollectionNext `json:"next,omitempty"`

	// Collection of subnets.
	Subnets []Subnet `json:"subnets" validate:"required"`

	// The total number of resources across all pages.
	TotalCount *int64 `json:"total_count" validate:"required"`
}

// UnmarshalSubnetCollection unmarshals an instance of SubnetCollection from the specified map of raw messages.
func UnmarshalSubnetCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SubnetCollection)
	err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalSubnetCollectionFirst)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalSubnetCollectionNext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "subnets", &obj.Subnets, UnmarshalSubnet)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SubnetCollectionFirst : A link to the first page of resources.
type SubnetCollectionFirst struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalSubnetCollectionFirst unmarshals an instance of SubnetCollectionFirst from the specified map of raw messages.
func UnmarshalSubnetCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SubnetCollectionFirst)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SubnetCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
type SubnetCollectionNext struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalSubnetCollectionNext unmarshals an instance of SubnetCollectionNext from the specified map of raw messages.
func UnmarshalSubnetCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SubnetCollectionNext)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SubnetIdentity : Identifies a subnet by a unique property.
// Models which "extend" this model:
// - SubnetIdentityByID
// - SubnetIdentityByCRN
// - SubnetIdentityByHref
type SubnetIdentity struct {
	// The unique identifier for this subnet.
	ID *string `json:"id,omitempty"`

	// The CRN for this subnet.
	CRN *string `json:"crn,omitempty"`

	// The URL for this subnet.
	Href *string `json:"href,omitempty"`
}

func (*SubnetIdentity) isaSubnetIdentity() bool {
	return true
}

type SubnetIdentityIntf interface {
	isaSubnetIdentity() bool
}

// UnmarshalSubnetIdentity unmarshals an instance of SubnetIdentity from the specified map of raw messages.
func UnmarshalSubnetIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SubnetIdentity)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SubnetPatch : SubnetPatch struct
type SubnetPatch struct {
	// The user-defined name for this subnet. Names must be unique within the VPC the subnet resides in.
	Name *string `json:"name,omitempty"`

	// The network ACL to use for this subnet.
	NetworkACL NetworkACLIdentityIntf `json:"network_acl,omitempty"`

	// The public gateway to handle internet bound traffic for this subnet.
	PublicGateway PublicGatewayIdentityIntf `json:"public_gateway,omitempty"`

	// The routing table to use for this subnet.  The routing table properties
	// `route_direct_link_ingress`, `route_transit_gateway_ingress`, and
	// `route_vpc_zone_ingress` must be `false`.
	RoutingTable RoutingTableIdentityIntf `json:"routing_table,omitempty"`
}

// UnmarshalSubnetPatch unmarshals an instance of SubnetPatch from the specified map of raw messages.
func UnmarshalSubnetPatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SubnetPatch)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "network_acl", &obj.NetworkACL, UnmarshalNetworkACLIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "public_gateway", &obj.PublicGateway, UnmarshalPublicGatewayIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "routing_table", &obj.RoutingTable, UnmarshalRoutingTableIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the SubnetPatch
func (subnetPatch *SubnetPatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(subnetPatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// SubnetPrototype : SubnetPrototype struct
// Models which "extend" this model:
// - SubnetPrototypeSubnetByTotalCount
// - SubnetPrototypeSubnetByCIDR
type SubnetPrototype struct {
	// The IP version(s) to support for this subnet.
	IPVersion *string `json:"ip_version,omitempty"`

	// The user-defined name for this subnet. Names must be unique within the VPC the subnet resides in. If unspecified,
	// the name will be a hyphenated list of randomly-selected words.
	Name *string `json:"name,omitempty"`

	// The network ACL to use for this subnet.
	NetworkACL NetworkACLIdentityIntf `json:"network_acl,omitempty"`

	// The public gateway to handle internet bound traffic for this subnet.
	PublicGateway PublicGatewayIdentityIntf `json:"public_gateway,omitempty"`

	// The resource group to use. If unspecified, the account's [default resource
	// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
	ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`

	// The routing table to use for this subnet. If unspecified, the default routing table
	// for the VPC is used. The routing table properties `route_direct_link_ingress`,
	// `route_transit_gateway_ingress`, and `route_vpc_zone_ingress` must be `false`.
	RoutingTable RoutingTableIdentityIntf `json:"routing_table,omitempty"`

	// The VPC the subnet is to be a part of.
	VPC VPCIdentityIntf `json:"vpc" validate:"required"`

	// The total number of IPv4 addresses required. Must be a power of 2. The VPC must have a default address prefix in the
	// specified zone, and that prefix must have a free CIDR range with at least this number of addresses.
	TotalIpv4AddressCount *int64 `json:"total_ipv4_address_count,omitempty"`

	// The zone this subnet will reside in.
	Zone ZoneIdentityIntf `json:"zone,omitempty"`

	// The IPv4 range of the subnet, expressed in CIDR format. The prefix length of the subnet's CIDR must be between `/9`
	// (8,388,608 addresses) and `/29` (8 addresses). The IPv4 range of the subnet's CIDR must fall within an existing
	// address prefix in the VPC. The subnet will be created in the zone of the address prefix that contains the IPv4 CIDR.
	// If zone is specified, it must match the zone of the address prefix that contains the subnet's IPv4 CIDR.
	Ipv4CIDRBlock *string `json:"ipv4_cidr_block,omitempty"`
}

// Constants associated with the SubnetPrototype.IPVersion property.
// The IP version(s) to support for this subnet.
const (
	SubnetPrototypeIPVersionIpv4Const = "ipv4"
)

func (*SubnetPrototype) isaSubnetPrototype() bool {
	return true
}

type SubnetPrototypeIntf interface {
	isaSubnetPrototype() bool
}

// UnmarshalSubnetPrototype unmarshals an instance of SubnetPrototype from the specified map of raw messages.
func UnmarshalSubnetPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SubnetPrototype)
	err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "network_acl", &obj.NetworkACL, UnmarshalNetworkACLIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "public_gateway", &obj.PublicGateway, UnmarshalPublicGatewayIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "routing_table", &obj.RoutingTable, UnmarshalRoutingTableIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "total_ipv4_address_count", &obj.TotalIpv4AddressCount)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "ipv4_cidr_block", &obj.Ipv4CIDRBlock)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SubnetReference : SubnetReference struct
type SubnetReference struct {
	// The CRN for this subnet.
	CRN *string `json:"crn" validate:"required"`

	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *SubnetReferenceDeleted `json:"deleted,omitempty"`

	// The URL for this subnet.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this subnet.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this subnet.
	Name *string `json:"name" validate:"required"`
}

// UnmarshalSubnetReference unmarshals an instance of SubnetReference from the specified map of raw messages.
func UnmarshalSubnetReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SubnetReference)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalSubnetReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SubnetReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type SubnetReferenceDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalSubnetReferenceDeleted unmarshals an instance of SubnetReferenceDeleted from the specified map of raw messages.
func UnmarshalSubnetReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SubnetReferenceDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// UnsetSubnetPublicGatewayOptions : The UnsetSubnetPublicGateway options.
type UnsetSubnetPublicGatewayOptions struct {
	// The subnet identifier.
	ID *string `validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUnsetSubnetPublicGatewayOptions : Instantiate UnsetSubnetPublicGatewayOptions
func (*VpcV1) NewUnsetSubnetPublicGatewayOptions(id string) *UnsetSubnetPublicGatewayOptions {
	return &UnsetSubnetPublicGatewayOptions{
		ID: core.StringPtr(id),
	}
}

// SetID : Allow user to set ID
func (options *UnsetSubnetPublicGatewayOptions) SetID(id string) *UnsetSubnetPublicGatewayOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UnsetSubnetPublicGatewayOptions) SetHeaders(param map[string]string) *UnsetSubnetPublicGatewayOptions {
	options.Headers = param
	return options
}

// UpdateDedicatedHostDiskOptions : The UpdateDedicatedHostDisk options.
type UpdateDedicatedHostDiskOptions struct {
	// The dedicated host identifier.
	DedicatedHostID *string `validate:"required,ne="`

	// The dedicated host disk identifier.
	ID *string `validate:"required,ne="`

	// The dedicated host disk patch.
	DedicatedHostDiskPatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateDedicatedHostDiskOptions : Instantiate UpdateDedicatedHostDiskOptions
func (*VpcV1) NewUpdateDedicatedHostDiskOptions(dedicatedHostID string, id string, dedicatedHostDiskPatch map[string]interface{}) *UpdateDedicatedHostDiskOptions {
	return &UpdateDedicatedHostDiskOptions{
		DedicatedHostID:        core.StringPtr(dedicatedHostID),
		ID:                     core.StringPtr(id),
		DedicatedHostDiskPatch: dedicatedHostDiskPatch,
	}
}

// SetDedicatedHostID : Allow user to set DedicatedHostID
func (options *UpdateDedicatedHostDiskOptions) SetDedicatedHostID(dedicatedHostID string) *UpdateDedicatedHostDiskOptions {
	options.DedicatedHostID = core.StringPtr(dedicatedHostID)
	return options
}

// SetID : Allow user to set ID
func (options *UpdateDedicatedHostDiskOptions) SetID(id string) *UpdateDedicatedHostDiskOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetDedicatedHostDiskPatch : Allow user to set DedicatedHostDiskPatch
func (options *UpdateDedicatedHostDiskOptions) SetDedicatedHostDiskPatch(dedicatedHostDiskPatch map[string]interface{}) *UpdateDedicatedHostDiskOptions {
	options.DedicatedHostDiskPatch = dedicatedHostDiskPatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateDedicatedHostDiskOptions) SetHeaders(param map[string]string) *UpdateDedicatedHostDiskOptions {
	options.Headers = param
	return options
}

// UpdateDedicatedHostGroupOptions : The UpdateDedicatedHostGroup options.
type UpdateDedicatedHostGroupOptions struct {
	// The dedicated host group identifier.
	ID *string `validate:"required,ne="`

	// The dedicated host group patch.
	DedicatedHostGroupPatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateDedicatedHostGroupOptions : Instantiate UpdateDedicatedHostGroupOptions
func (*VpcV1) NewUpdateDedicatedHostGroupOptions(id string, dedicatedHostGroupPatch map[string]interface{}) *UpdateDedicatedHostGroupOptions {
	return &UpdateDedicatedHostGroupOptions{
		ID:                      core.StringPtr(id),
		DedicatedHostGroupPatch: dedicatedHostGroupPatch,
	}
}

// SetID : Allow user to set ID
func (options *UpdateDedicatedHostGroupOptions) SetID(id string) *UpdateDedicatedHostGroupOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetDedicatedHostGroupPatch : Allow user to set DedicatedHostGroupPatch
func (options *UpdateDedicatedHostGroupOptions) SetDedicatedHostGroupPatch(dedicatedHostGroupPatch map[string]interface{}) *UpdateDedicatedHostGroupOptions {
	options.DedicatedHostGroupPatch = dedicatedHostGroupPatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateDedicatedHostGroupOptions) SetHeaders(param map[string]string) *UpdateDedicatedHostGroupOptions {
	options.Headers = param
	return options
}

// UpdateDedicatedHostOptions : The UpdateDedicatedHost options.
type UpdateDedicatedHostOptions struct {
	// The dedicated host identifier.
	ID *string `validate:"required,ne="`

	// The dedicated host patch.
	DedicatedHostPatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateDedicatedHostOptions : Instantiate UpdateDedicatedHostOptions
func (*VpcV1) NewUpdateDedicatedHostOptions(id string, dedicatedHostPatch map[string]interface{}) *UpdateDedicatedHostOptions {
	return &UpdateDedicatedHostOptions{
		ID:                 core.StringPtr(id),
		DedicatedHostPatch: dedicatedHostPatch,
	}
}

// SetID : Allow user to set ID
func (options *UpdateDedicatedHostOptions) SetID(id string) *UpdateDedicatedHostOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetDedicatedHostPatch : Allow user to set DedicatedHostPatch
func (options *UpdateDedicatedHostOptions) SetDedicatedHostPatch(dedicatedHostPatch map[string]interface{}) *UpdateDedicatedHostOptions {
	options.DedicatedHostPatch = dedicatedHostPatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateDedicatedHostOptions) SetHeaders(param map[string]string) *UpdateDedicatedHostOptions {
	options.Headers = param
	return options
}

// UpdateEndpointGatewayOptions : The UpdateEndpointGateway options.
type UpdateEndpointGatewayOptions struct {
	// The endpoint gateway identifier.
	ID *string `validate:"required,ne="`

	// The endpoint gateway patch.
	EndpointGatewayPatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateEndpointGatewayOptions : Instantiate UpdateEndpointGatewayOptions
func (*VpcV1) NewUpdateEndpointGatewayOptions(id string, endpointGatewayPatch map[string]interface{}) *UpdateEndpointGatewayOptions {
	return &UpdateEndpointGatewayOptions{
		ID:                   core.StringPtr(id),
		EndpointGatewayPatch: endpointGatewayPatch,
	}
}

// SetID : Allow user to set ID
func (options *UpdateEndpointGatewayOptions) SetID(id string) *UpdateEndpointGatewayOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetEndpointGatewayPatch : Allow user to set EndpointGatewayPatch
func (options *UpdateEndpointGatewayOptions) SetEndpointGatewayPatch(endpointGatewayPatch map[string]interface{}) *UpdateEndpointGatewayOptions {
	options.EndpointGatewayPatch = endpointGatewayPatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateEndpointGatewayOptions) SetHeaders(param map[string]string) *UpdateEndpointGatewayOptions {
	options.Headers = param
	return options
}

// UpdateFloatingIPOptions : The UpdateFloatingIP options.
type UpdateFloatingIPOptions struct {
	// The floating IP identifier.
	ID *string `validate:"required,ne="`

	// The floating IP patch.
	FloatingIPPatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateFloatingIPOptions : Instantiate UpdateFloatingIPOptions
func (*VpcV1) NewUpdateFloatingIPOptions(id string, floatingIPPatch map[string]interface{}) *UpdateFloatingIPOptions {
	return &UpdateFloatingIPOptions{
		ID:              core.StringPtr(id),
		FloatingIPPatch: floatingIPPatch,
	}
}

// SetID : Allow user to set ID
func (options *UpdateFloatingIPOptions) SetID(id string) *UpdateFloatingIPOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetFloatingIPPatch : Allow user to set FloatingIPPatch
func (options *UpdateFloatingIPOptions) SetFloatingIPPatch(floatingIPPatch map[string]interface{}) *UpdateFloatingIPOptions {
	options.FloatingIPPatch = floatingIPPatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateFloatingIPOptions) SetHeaders(param map[string]string) *UpdateFloatingIPOptions {
	options.Headers = param
	return options
}

// UpdateFlowLogCollectorOptions : The UpdateFlowLogCollector options.
type UpdateFlowLogCollectorOptions struct {
	// The flow log collector identifier.
	ID *string `validate:"required,ne="`

	// The flow log collector patch.
	FlowLogCollectorPatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateFlowLogCollectorOptions : Instantiate UpdateFlowLogCollectorOptions
func (*VpcV1) NewUpdateFlowLogCollectorOptions(id string, flowLogCollectorPatch map[string]interface{}) *UpdateFlowLogCollectorOptions {
	return &UpdateFlowLogCollectorOptions{
		ID:                    core.StringPtr(id),
		FlowLogCollectorPatch: flowLogCollectorPatch,
	}
}

// SetID : Allow user to set ID
func (options *UpdateFlowLogCollectorOptions) SetID(id string) *UpdateFlowLogCollectorOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetFlowLogCollectorPatch : Allow user to set FlowLogCollectorPatch
func (options *UpdateFlowLogCollectorOptions) SetFlowLogCollectorPatch(flowLogCollectorPatch map[string]interface{}) *UpdateFlowLogCollectorOptions {
	options.FlowLogCollectorPatch = flowLogCollectorPatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateFlowLogCollectorOptions) SetHeaders(param map[string]string) *UpdateFlowLogCollectorOptions {
	options.Headers = param
	return options
}

// UpdateIkePolicyOptions : The UpdateIkePolicy options.
type UpdateIkePolicyOptions struct {
	// The IKE policy identifier.
	ID *string `validate:"required,ne="`

	// The IKE policy patch.
	IkePolicyPatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateIkePolicyOptions : Instantiate UpdateIkePolicyOptions
func (*VpcV1) NewUpdateIkePolicyOptions(id string, ikePolicyPatch map[string]interface{}) *UpdateIkePolicyOptions {
	return &UpdateIkePolicyOptions{
		ID:             core.StringPtr(id),
		IkePolicyPatch: ikePolicyPatch,
	}
}

// SetID : Allow user to set ID
func (options *UpdateIkePolicyOptions) SetID(id string) *UpdateIkePolicyOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetIkePolicyPatch : Allow user to set IkePolicyPatch
func (options *UpdateIkePolicyOptions) SetIkePolicyPatch(ikePolicyPatch map[string]interface{}) *UpdateIkePolicyOptions {
	options.IkePolicyPatch = ikePolicyPatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateIkePolicyOptions) SetHeaders(param map[string]string) *UpdateIkePolicyOptions {
	options.Headers = param
	return options
}

// UpdateImageOptions : The UpdateImage options.
type UpdateImageOptions struct {
	// The image identifier.
	ID *string `validate:"required,ne="`

	// The image patch.
	ImagePatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateImageOptions : Instantiate UpdateImageOptions
func (*VpcV1) NewUpdateImageOptions(id string, imagePatch map[string]interface{}) *UpdateImageOptions {
	return &UpdateImageOptions{
		ID:         core.StringPtr(id),
		ImagePatch: imagePatch,
	}
}

// SetID : Allow user to set ID
func (options *UpdateImageOptions) SetID(id string) *UpdateImageOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetImagePatch : Allow user to set ImagePatch
func (options *UpdateImageOptions) SetImagePatch(imagePatch map[string]interface{}) *UpdateImageOptions {
	options.ImagePatch = imagePatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateImageOptions) SetHeaders(param map[string]string) *UpdateImageOptions {
	options.Headers = param
	return options
}

// UpdateInstanceDiskOptions : The UpdateInstanceDisk options.
type UpdateInstanceDiskOptions struct {
	// The instance identifier.
	InstanceID *string `validate:"required,ne="`

	// The instance disk identifier.
	ID *string `validate:"required,ne="`

	// The instance disk patch.
	InstanceDiskPatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateInstanceDiskOptions : Instantiate UpdateInstanceDiskOptions
func (*VpcV1) NewUpdateInstanceDiskOptions(instanceID string, id string, instanceDiskPatch map[string]interface{}) *UpdateInstanceDiskOptions {
	return &UpdateInstanceDiskOptions{
		InstanceID:        core.StringPtr(instanceID),
		ID:                core.StringPtr(id),
		InstanceDiskPatch: instanceDiskPatch,
	}
}

// SetInstanceID : Allow user to set InstanceID
func (options *UpdateInstanceDiskOptions) SetInstanceID(instanceID string) *UpdateInstanceDiskOptions {
	options.InstanceID = core.StringPtr(instanceID)
	return options
}

// SetID : Allow user to set ID
func (options *UpdateInstanceDiskOptions) SetID(id string) *UpdateInstanceDiskOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetInstanceDiskPatch : Allow user to set InstanceDiskPatch
func (options *UpdateInstanceDiskOptions) SetInstanceDiskPatch(instanceDiskPatch map[string]interface{}) *UpdateInstanceDiskOptions {
	options.InstanceDiskPatch = instanceDiskPatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateInstanceDiskOptions) SetHeaders(param map[string]string) *UpdateInstanceDiskOptions {
	options.Headers = param
	return options
}

// UpdateInstanceGroupManagerActionOptions : The UpdateInstanceGroupManagerAction options.
type UpdateInstanceGroupManagerActionOptions struct {
	// The instance group identifier.
	InstanceGroupID *string `validate:"required,ne="`

	// The instance group manager identifier.
	InstanceGroupManagerID *string `validate:"required,ne="`

	// The instance group manager action identifier.
	ID *string `validate:"required,ne="`

	// The instance group manager action patch.
	InstanceGroupManagerActionPatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateInstanceGroupManagerActionOptions : Instantiate UpdateInstanceGroupManagerActionOptions
func (*VpcV1) NewUpdateInstanceGroupManagerActionOptions(instanceGroupID string, instanceGroupManagerID string, id string, instanceGroupManagerActionPatch map[string]interface{}) *UpdateInstanceGroupManagerActionOptions {
	return &UpdateInstanceGroupManagerActionOptions{
		InstanceGroupID:                 core.StringPtr(instanceGroupID),
		InstanceGroupManagerID:          core.StringPtr(instanceGroupManagerID),
		ID:                              core.StringPtr(id),
		InstanceGroupManagerActionPatch: instanceGroupManagerActionPatch,
	}
}

// SetInstanceGroupID : Allow user to set InstanceGroupID
func (options *UpdateInstanceGroupManagerActionOptions) SetInstanceGroupID(instanceGroupID string) *UpdateInstanceGroupManagerActionOptions {
	options.InstanceGroupID = core.StringPtr(instanceGroupID)
	return options
}

// SetInstanceGroupManagerID : Allow user to set InstanceGroupManagerID
func (options *UpdateInstanceGroupManagerActionOptions) SetInstanceGroupManagerID(instanceGroupManagerID string) *UpdateInstanceGroupManagerActionOptions {
	options.InstanceGroupManagerID = core.StringPtr(instanceGroupManagerID)
	return options
}

// SetID : Allow user to set ID
func (options *UpdateInstanceGroupManagerActionOptions) SetID(id string) *UpdateInstanceGroupManagerActionOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetInstanceGroupManagerActionPatch : Allow user to set InstanceGroupManagerActionPatch
func (options *UpdateInstanceGroupManagerActionOptions) SetInstanceGroupManagerActionPatch(instanceGroupManagerActionPatch map[string]interface{}) *UpdateInstanceGroupManagerActionOptions {
	options.InstanceGroupManagerActionPatch = instanceGroupManagerActionPatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateInstanceGroupManagerActionOptions) SetHeaders(param map[string]string) *UpdateInstanceGroupManagerActionOptions {
	options.Headers = param
	return options
}

// UpdateInstanceGroupManagerOptions : The UpdateInstanceGroupManager options.
type UpdateInstanceGroupManagerOptions struct {
	// The instance group identifier.
	InstanceGroupID *string `validate:"required,ne="`

	// The instance group manager identifier.
	ID *string `validate:"required,ne="`

	// The instance group manager patch.
	InstanceGroupManagerPatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateInstanceGroupManagerOptions : Instantiate UpdateInstanceGroupManagerOptions
func (*VpcV1) NewUpdateInstanceGroupManagerOptions(instanceGroupID string, id string, instanceGroupManagerPatch map[string]interface{}) *UpdateInstanceGroupManagerOptions {
	return &UpdateInstanceGroupManagerOptions{
		InstanceGroupID:           core.StringPtr(instanceGroupID),
		ID:                        core.StringPtr(id),
		InstanceGroupManagerPatch: instanceGroupManagerPatch,
	}
}

// SetInstanceGroupID : Allow user to set InstanceGroupID
func (options *UpdateInstanceGroupManagerOptions) SetInstanceGroupID(instanceGroupID string) *UpdateInstanceGroupManagerOptions {
	options.InstanceGroupID = core.StringPtr(instanceGroupID)
	return options
}

// SetID : Allow user to set ID
func (options *UpdateInstanceGroupManagerOptions) SetID(id string) *UpdateInstanceGroupManagerOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetInstanceGroupManagerPatch : Allow user to set InstanceGroupManagerPatch
func (options *UpdateInstanceGroupManagerOptions) SetInstanceGroupManagerPatch(instanceGroupManagerPatch map[string]interface{}) *UpdateInstanceGroupManagerOptions {
	options.InstanceGroupManagerPatch = instanceGroupManagerPatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateInstanceGroupManagerOptions) SetHeaders(param map[string]string) *UpdateInstanceGroupManagerOptions {
	options.Headers = param
	return options
}

// UpdateInstanceGroupManagerPolicyOptions : The UpdateInstanceGroupManagerPolicy options.
type UpdateInstanceGroupManagerPolicyOptions struct {
	// The instance group identifier.
	InstanceGroupID *string `validate:"required,ne="`

	// The instance group manager identifier.
	InstanceGroupManagerID *string `validate:"required,ne="`

	// The instance group manager policy identifier.
	ID *string `validate:"required,ne="`

	// The instance group manager policy patch.
	InstanceGroupManagerPolicyPatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateInstanceGroupManagerPolicyOptions : Instantiate UpdateInstanceGroupManagerPolicyOptions
func (*VpcV1) NewUpdateInstanceGroupManagerPolicyOptions(instanceGroupID string, instanceGroupManagerID string, id string, instanceGroupManagerPolicyPatch map[string]interface{}) *UpdateInstanceGroupManagerPolicyOptions {
	return &UpdateInstanceGroupManagerPolicyOptions{
		InstanceGroupID:                 core.StringPtr(instanceGroupID),
		InstanceGroupManagerID:          core.StringPtr(instanceGroupManagerID),
		ID:                              core.StringPtr(id),
		InstanceGroupManagerPolicyPatch: instanceGroupManagerPolicyPatch,
	}
}

// SetInstanceGroupID : Allow user to set InstanceGroupID
func (options *UpdateInstanceGroupManagerPolicyOptions) SetInstanceGroupID(instanceGroupID string) *UpdateInstanceGroupManagerPolicyOptions {
	options.InstanceGroupID = core.StringPtr(instanceGroupID)
	return options
}

// SetInstanceGroupManagerID : Allow user to set InstanceGroupManagerID
func (options *UpdateInstanceGroupManagerPolicyOptions) SetInstanceGroupManagerID(instanceGroupManagerID string) *UpdateInstanceGroupManagerPolicyOptions {
	options.InstanceGroupManagerID = core.StringPtr(instanceGroupManagerID)
	return options
}

// SetID : Allow user to set ID
func (options *UpdateInstanceGroupManagerPolicyOptions) SetID(id string) *UpdateInstanceGroupManagerPolicyOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetInstanceGroupManagerPolicyPatch : Allow user to set InstanceGroupManagerPolicyPatch
func (options *UpdateInstanceGroupManagerPolicyOptions) SetInstanceGroupManagerPolicyPatch(instanceGroupManagerPolicyPatch map[string]interface{}) *UpdateInstanceGroupManagerPolicyOptions {
	options.InstanceGroupManagerPolicyPatch = instanceGroupManagerPolicyPatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateInstanceGroupManagerPolicyOptions) SetHeaders(param map[string]string) *UpdateInstanceGroupManagerPolicyOptions {
	options.Headers = param
	return options
}

// UpdateInstanceGroupMembershipOptions : The UpdateInstanceGroupMembership options.
type UpdateInstanceGroupMembershipOptions struct {
	// The instance group identifier.
	InstanceGroupID *string `validate:"required,ne="`

	// The instance group membership identifier.
	ID *string `validate:"required,ne="`

	// The instance group membership patch.
	InstanceGroupMembershipPatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateInstanceGroupMembershipOptions : Instantiate UpdateInstanceGroupMembershipOptions
func (*VpcV1) NewUpdateInstanceGroupMembershipOptions(instanceGroupID string, id string, instanceGroupMembershipPatch map[string]interface{}) *UpdateInstanceGroupMembershipOptions {
	return &UpdateInstanceGroupMembershipOptions{
		InstanceGroupID:              core.StringPtr(instanceGroupID),
		ID:                           core.StringPtr(id),
		InstanceGroupMembershipPatch: instanceGroupMembershipPatch,
	}
}

// SetInstanceGroupID : Allow user to set InstanceGroupID
func (options *UpdateInstanceGroupMembershipOptions) SetInstanceGroupID(instanceGroupID string) *UpdateInstanceGroupMembershipOptions {
	options.InstanceGroupID = core.StringPtr(instanceGroupID)
	return options
}

// SetID : Allow user to set ID
func (options *UpdateInstanceGroupMembershipOptions) SetID(id string) *UpdateInstanceGroupMembershipOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetInstanceGroupMembershipPatch : Allow user to set InstanceGroupMembershipPatch
func (options *UpdateInstanceGroupMembershipOptions) SetInstanceGroupMembershipPatch(instanceGroupMembershipPatch map[string]interface{}) *UpdateInstanceGroupMembershipOptions {
	options.InstanceGroupMembershipPatch = instanceGroupMembershipPatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateInstanceGroupMembershipOptions) SetHeaders(param map[string]string) *UpdateInstanceGroupMembershipOptions {
	options.Headers = param
	return options
}

// UpdateInstanceGroupOptions : The UpdateInstanceGroup options.
type UpdateInstanceGroupOptions struct {
	// The instance group identifier.
	ID *string `validate:"required,ne="`

	// The instance group patch.
	InstanceGroupPatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateInstanceGroupOptions : Instantiate UpdateInstanceGroupOptions
func (*VpcV1) NewUpdateInstanceGroupOptions(id string, instanceGroupPatch map[string]interface{}) *UpdateInstanceGroupOptions {
	return &UpdateInstanceGroupOptions{
		ID:                 core.StringPtr(id),
		InstanceGroupPatch: instanceGroupPatch,
	}
}

// SetID : Allow user to set ID
func (options *UpdateInstanceGroupOptions) SetID(id string) *UpdateInstanceGroupOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetInstanceGroupPatch : Allow user to set InstanceGroupPatch
func (options *UpdateInstanceGroupOptions) SetInstanceGroupPatch(instanceGroupPatch map[string]interface{}) *UpdateInstanceGroupOptions {
	options.InstanceGroupPatch = instanceGroupPatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateInstanceGroupOptions) SetHeaders(param map[string]string) *UpdateInstanceGroupOptions {
	options.Headers = param
	return options
}

// UpdateInstanceNetworkInterfaceOptions : The UpdateInstanceNetworkInterface options.
type UpdateInstanceNetworkInterfaceOptions struct {
	// The instance identifier.
	InstanceID *string `validate:"required,ne="`

	// The network interface identifier.
	ID *string `validate:"required,ne="`

	// The network interface patch.
	NetworkInterfacePatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateInstanceNetworkInterfaceOptions : Instantiate UpdateInstanceNetworkInterfaceOptions
func (*VpcV1) NewUpdateInstanceNetworkInterfaceOptions(instanceID string, id string, networkInterfacePatch map[string]interface{}) *UpdateInstanceNetworkInterfaceOptions {
	return &UpdateInstanceNetworkInterfaceOptions{
		InstanceID:            core.StringPtr(instanceID),
		ID:                    core.StringPtr(id),
		NetworkInterfacePatch: networkInterfacePatch,
	}
}

// SetInstanceID : Allow user to set InstanceID
func (options *UpdateInstanceNetworkInterfaceOptions) SetInstanceID(instanceID string) *UpdateInstanceNetworkInterfaceOptions {
	options.InstanceID = core.StringPtr(instanceID)
	return options
}

// SetID : Allow user to set ID
func (options *UpdateInstanceNetworkInterfaceOptions) SetID(id string) *UpdateInstanceNetworkInterfaceOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetNetworkInterfacePatch : Allow user to set NetworkInterfacePatch
func (options *UpdateInstanceNetworkInterfaceOptions) SetNetworkInterfacePatch(networkInterfacePatch map[string]interface{}) *UpdateInstanceNetworkInterfaceOptions {
	options.NetworkInterfacePatch = networkInterfacePatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateInstanceNetworkInterfaceOptions) SetHeaders(param map[string]string) *UpdateInstanceNetworkInterfaceOptions {
	options.Headers = param
	return options
}

// UpdateInstanceOptions : The UpdateInstance options.
type UpdateInstanceOptions struct {
	// The instance identifier.
	ID *string `validate:"required,ne="`

	// The instance patch.
	InstancePatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateInstanceOptions : Instantiate UpdateInstanceOptions
func (*VpcV1) NewUpdateInstanceOptions(id string, instancePatch map[string]interface{}) *UpdateInstanceOptions {
	return &UpdateInstanceOptions{
		ID:            core.StringPtr(id),
		InstancePatch: instancePatch,
	}
}

// SetID : Allow user to set ID
func (options *UpdateInstanceOptions) SetID(id string) *UpdateInstanceOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetInstancePatch : Allow user to set InstancePatch
func (options *UpdateInstanceOptions) SetInstancePatch(instancePatch map[string]interface{}) *UpdateInstanceOptions {
	options.InstancePatch = instancePatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateInstanceOptions) SetHeaders(param map[string]string) *UpdateInstanceOptions {
	options.Headers = param
	return options
}

// UpdateInstanceTemplateOptions : The UpdateInstanceTemplate options.
type UpdateInstanceTemplateOptions struct {
	// The instance template identifier.
	ID *string `validate:"required,ne="`

	// The instance template patch.
	InstanceTemplatePatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateInstanceTemplateOptions : Instantiate UpdateInstanceTemplateOptions
func (*VpcV1) NewUpdateInstanceTemplateOptions(id string, instanceTemplatePatch map[string]interface{}) *UpdateInstanceTemplateOptions {
	return &UpdateInstanceTemplateOptions{
		ID:                    core.StringPtr(id),
		InstanceTemplatePatch: instanceTemplatePatch,
	}
}

// SetID : Allow user to set ID
func (options *UpdateInstanceTemplateOptions) SetID(id string) *UpdateInstanceTemplateOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetInstanceTemplatePatch : Allow user to set InstanceTemplatePatch
func (options *UpdateInstanceTemplateOptions) SetInstanceTemplatePatch(instanceTemplatePatch map[string]interface{}) *UpdateInstanceTemplateOptions {
	options.InstanceTemplatePatch = instanceTemplatePatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateInstanceTemplateOptions) SetHeaders(param map[string]string) *UpdateInstanceTemplateOptions {
	options.Headers = param
	return options
}

// UpdateInstanceVolumeAttachmentOptions : The UpdateInstanceVolumeAttachment options.
type UpdateInstanceVolumeAttachmentOptions struct {
	// The instance identifier.
	InstanceID *string `validate:"required,ne="`

	// The volume attachment identifier.
	ID *string `validate:"required,ne="`

	// The volume attachment patch.
	VolumeAttachmentPatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateInstanceVolumeAttachmentOptions : Instantiate UpdateInstanceVolumeAttachmentOptions
func (*VpcV1) NewUpdateInstanceVolumeAttachmentOptions(instanceID string, id string, volumeAttachmentPatch map[string]interface{}) *UpdateInstanceVolumeAttachmentOptions {
	return &UpdateInstanceVolumeAttachmentOptions{
		InstanceID:            core.StringPtr(instanceID),
		ID:                    core.StringPtr(id),
		VolumeAttachmentPatch: volumeAttachmentPatch,
	}
}

// SetInstanceID : Allow user to set InstanceID
func (options *UpdateInstanceVolumeAttachmentOptions) SetInstanceID(instanceID string) *UpdateInstanceVolumeAttachmentOptions {
	options.InstanceID = core.StringPtr(instanceID)
	return options
}

// SetID : Allow user to set ID
func (options *UpdateInstanceVolumeAttachmentOptions) SetID(id string) *UpdateInstanceVolumeAttachmentOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetVolumeAttachmentPatch : Allow user to set VolumeAttachmentPatch
func (options *UpdateInstanceVolumeAttachmentOptions) SetVolumeAttachmentPatch(volumeAttachmentPatch map[string]interface{}) *UpdateInstanceVolumeAttachmentOptions {
	options.VolumeAttachmentPatch = volumeAttachmentPatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateInstanceVolumeAttachmentOptions) SetHeaders(param map[string]string) *UpdateInstanceVolumeAttachmentOptions {
	options.Headers = param
	return options
}

// UpdateIpsecPolicyOptions : The UpdateIpsecPolicy options.
type UpdateIpsecPolicyOptions struct {
	// The IPsec policy identifier.
	ID *string `validate:"required,ne="`

	// The IPsec policy patch.
	IPsecPolicyPatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateIpsecPolicyOptions : Instantiate UpdateIpsecPolicyOptions
func (*VpcV1) NewUpdateIpsecPolicyOptions(id string, iPsecPolicyPatch map[string]interface{}) *UpdateIpsecPolicyOptions {
	return &UpdateIpsecPolicyOptions{
		ID:               core.StringPtr(id),
		IPsecPolicyPatch: iPsecPolicyPatch,
	}
}

// SetID : Allow user to set ID
func (options *UpdateIpsecPolicyOptions) SetID(id string) *UpdateIpsecPolicyOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetIPsecPolicyPatch : Allow user to set IPsecPolicyPatch
func (options *UpdateIpsecPolicyOptions) SetIPsecPolicyPatch(iPsecPolicyPatch map[string]interface{}) *UpdateIpsecPolicyOptions {
	options.IPsecPolicyPatch = iPsecPolicyPatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateIpsecPolicyOptions) SetHeaders(param map[string]string) *UpdateIpsecPolicyOptions {
	options.Headers = param
	return options
}

// UpdateKeyOptions : The UpdateKey options.
type UpdateKeyOptions struct {
	// The key identifier.
	ID *string `validate:"required,ne="`

	// The key patch.
	KeyPatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateKeyOptions : Instantiate UpdateKeyOptions
func (*VpcV1) NewUpdateKeyOptions(id string, keyPatch map[string]interface{}) *UpdateKeyOptions {
	return &UpdateKeyOptions{
		ID:       core.StringPtr(id),
		KeyPatch: keyPatch,
	}
}

// SetID : Allow user to set ID
func (options *UpdateKeyOptions) SetID(id string) *UpdateKeyOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetKeyPatch : Allow user to set KeyPatch
func (options *UpdateKeyOptions) SetKeyPatch(keyPatch map[string]interface{}) *UpdateKeyOptions {
	options.KeyPatch = keyPatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateKeyOptions) SetHeaders(param map[string]string) *UpdateKeyOptions {
	options.Headers = param
	return options
}

// UpdateLoadBalancerListenerOptions : The UpdateLoadBalancerListener options.
type UpdateLoadBalancerListenerOptions struct {
	// The load balancer identifier.
	LoadBalancerID *string `validate:"required,ne="`

	// The listener identifier.
	ID *string `validate:"required,ne="`

	// The load balancer listener patch.
	LoadBalancerListenerPatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateLoadBalancerListenerOptions : Instantiate UpdateLoadBalancerListenerOptions
func (*VpcV1) NewUpdateLoadBalancerListenerOptions(loadBalancerID string, id string, loadBalancerListenerPatch map[string]interface{}) *UpdateLoadBalancerListenerOptions {
	return &UpdateLoadBalancerListenerOptions{
		LoadBalancerID:            core.StringPtr(loadBalancerID),
		ID:                        core.StringPtr(id),
		LoadBalancerListenerPatch: loadBalancerListenerPatch,
	}
}

// SetLoadBalancerID : Allow user to set LoadBalancerID
func (options *UpdateLoadBalancerListenerOptions) SetLoadBalancerID(loadBalancerID string) *UpdateLoadBalancerListenerOptions {
	options.LoadBalancerID = core.StringPtr(loadBalancerID)
	return options
}

// SetID : Allow user to set ID
func (options *UpdateLoadBalancerListenerOptions) SetID(id string) *UpdateLoadBalancerListenerOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetLoadBalancerListenerPatch : Allow user to set LoadBalancerListenerPatch
func (options *UpdateLoadBalancerListenerOptions) SetLoadBalancerListenerPatch(loadBalancerListenerPatch map[string]interface{}) *UpdateLoadBalancerListenerOptions {
	options.LoadBalancerListenerPatch = loadBalancerListenerPatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateLoadBalancerListenerOptions) SetHeaders(param map[string]string) *UpdateLoadBalancerListenerOptions {
	options.Headers = param
	return options
}

// UpdateLoadBalancerListenerPolicyOptions : The UpdateLoadBalancerListenerPolicy options.
type UpdateLoadBalancerListenerPolicyOptions struct {
	// The load balancer identifier.
	LoadBalancerID *string `validate:"required,ne="`

	// The listener identifier.
	ListenerID *string `validate:"required,ne="`

	// The policy identifier.
	ID *string `validate:"required,ne="`

	// The listener policy patch.
	LoadBalancerListenerPolicyPatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateLoadBalancerListenerPolicyOptions : Instantiate UpdateLoadBalancerListenerPolicyOptions
func (*VpcV1) NewUpdateLoadBalancerListenerPolicyOptions(loadBalancerID string, listenerID string, id string, loadBalancerListenerPolicyPatch map[string]interface{}) *UpdateLoadBalancerListenerPolicyOptions {
	return &UpdateLoadBalancerListenerPolicyOptions{
		LoadBalancerID:                  core.StringPtr(loadBalancerID),
		ListenerID:                      core.StringPtr(listenerID),
		ID:                              core.StringPtr(id),
		LoadBalancerListenerPolicyPatch: loadBalancerListenerPolicyPatch,
	}
}

// SetLoadBalancerID : Allow user to set LoadBalancerID
func (options *UpdateLoadBalancerListenerPolicyOptions) SetLoadBalancerID(loadBalancerID string) *UpdateLoadBalancerListenerPolicyOptions {
	options.LoadBalancerID = core.StringPtr(loadBalancerID)
	return options
}

// SetListenerID : Allow user to set ListenerID
func (options *UpdateLoadBalancerListenerPolicyOptions) SetListenerID(listenerID string) *UpdateLoadBalancerListenerPolicyOptions {
	options.ListenerID = core.StringPtr(listenerID)
	return options
}

// SetID : Allow user to set ID
func (options *UpdateLoadBalancerListenerPolicyOptions) SetID(id string) *UpdateLoadBalancerListenerPolicyOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetLoadBalancerListenerPolicyPatch : Allow user to set LoadBalancerListenerPolicyPatch
func (options *UpdateLoadBalancerListenerPolicyOptions) SetLoadBalancerListenerPolicyPatch(loadBalancerListenerPolicyPatch map[string]interface{}) *UpdateLoadBalancerListenerPolicyOptions {
	options.LoadBalancerListenerPolicyPatch = loadBalancerListenerPolicyPatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateLoadBalancerListenerPolicyOptions) SetHeaders(param map[string]string) *UpdateLoadBalancerListenerPolicyOptions {
	options.Headers = param
	return options
}

// UpdateLoadBalancerListenerPolicyRuleOptions : The UpdateLoadBalancerListenerPolicyRule options.
type UpdateLoadBalancerListenerPolicyRuleOptions struct {
	// The load balancer identifier.
	LoadBalancerID *string `validate:"required,ne="`

	// The listener identifier.
	ListenerID *string `validate:"required,ne="`

	// The policy identifier.
	PolicyID *string `validate:"required,ne="`

	// The rule identifier.
	ID *string `validate:"required,ne="`

	// The listener policy rule patch.
	LoadBalancerListenerPolicyRulePatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateLoadBalancerListenerPolicyRuleOptions : Instantiate UpdateLoadBalancerListenerPolicyRuleOptions
func (*VpcV1) NewUpdateLoadBalancerListenerPolicyRuleOptions(loadBalancerID string, listenerID string, policyID string, id string, loadBalancerListenerPolicyRulePatch map[string]interface{}) *UpdateLoadBalancerListenerPolicyRuleOptions {
	return &UpdateLoadBalancerListenerPolicyRuleOptions{
		LoadBalancerID:                      core.StringPtr(loadBalancerID),
		ListenerID:                          core.StringPtr(listenerID),
		PolicyID:                            core.StringPtr(policyID),
		ID:                                  core.StringPtr(id),
		LoadBalancerListenerPolicyRulePatch: loadBalancerListenerPolicyRulePatch,
	}
}

// SetLoadBalancerID : Allow user to set LoadBalancerID
func (options *UpdateLoadBalancerListenerPolicyRuleOptions) SetLoadBalancerID(loadBalancerID string) *UpdateLoadBalancerListenerPolicyRuleOptions {
	options.LoadBalancerID = core.StringPtr(loadBalancerID)
	return options
}

// SetListenerID : Allow user to set ListenerID
func (options *UpdateLoadBalancerListenerPolicyRuleOptions) SetListenerID(listenerID string) *UpdateLoadBalancerListenerPolicyRuleOptions {
	options.ListenerID = core.StringPtr(listenerID)
	return options
}

// SetPolicyID : Allow user to set PolicyID
func (options *UpdateLoadBalancerListenerPolicyRuleOptions) SetPolicyID(policyID string) *UpdateLoadBalancerListenerPolicyRuleOptions {
	options.PolicyID = core.StringPtr(policyID)
	return options
}

// SetID : Allow user to set ID
func (options *UpdateLoadBalancerListenerPolicyRuleOptions) SetID(id string) *UpdateLoadBalancerListenerPolicyRuleOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetLoadBalancerListenerPolicyRulePatch : Allow user to set LoadBalancerListenerPolicyRulePatch
func (options *UpdateLoadBalancerListenerPolicyRuleOptions) SetLoadBalancerListenerPolicyRulePatch(loadBalancerListenerPolicyRulePatch map[string]interface{}) *UpdateLoadBalancerListenerPolicyRuleOptions {
	options.LoadBalancerListenerPolicyRulePatch = loadBalancerListenerPolicyRulePatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateLoadBalancerListenerPolicyRuleOptions) SetHeaders(param map[string]string) *UpdateLoadBalancerListenerPolicyRuleOptions {
	options.Headers = param
	return options
}

// UpdateLoadBalancerOptions : The UpdateLoadBalancer options.
type UpdateLoadBalancerOptions struct {
	// The load balancer identifier.
	ID *string `validate:"required,ne="`

	// The load balancer patch.
	LoadBalancerPatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateLoadBalancerOptions : Instantiate UpdateLoadBalancerOptions
func (*VpcV1) NewUpdateLoadBalancerOptions(id string, loadBalancerPatch map[string]interface{}) *UpdateLoadBalancerOptions {
	return &UpdateLoadBalancerOptions{
		ID:                core.StringPtr(id),
		LoadBalancerPatch: loadBalancerPatch,
	}
}

// SetID : Allow user to set ID
func (options *UpdateLoadBalancerOptions) SetID(id string) *UpdateLoadBalancerOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetLoadBalancerPatch : Allow user to set LoadBalancerPatch
func (options *UpdateLoadBalancerOptions) SetLoadBalancerPatch(loadBalancerPatch map[string]interface{}) *UpdateLoadBalancerOptions {
	options.LoadBalancerPatch = loadBalancerPatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateLoadBalancerOptions) SetHeaders(param map[string]string) *UpdateLoadBalancerOptions {
	options.Headers = param
	return options
}

// UpdateLoadBalancerPoolMemberOptions : The UpdateLoadBalancerPoolMember options.
type UpdateLoadBalancerPoolMemberOptions struct {
	// The load balancer identifier.
	LoadBalancerID *string `validate:"required,ne="`

	// The pool identifier.
	PoolID *string `validate:"required,ne="`

	// The member identifier.
	ID *string `validate:"required,ne="`

	// The load balancer pool member patch.
	LoadBalancerPoolMemberPatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateLoadBalancerPoolMemberOptions : Instantiate UpdateLoadBalancerPoolMemberOptions
func (*VpcV1) NewUpdateLoadBalancerPoolMemberOptions(loadBalancerID string, poolID string, id string, loadBalancerPoolMemberPatch map[string]interface{}) *UpdateLoadBalancerPoolMemberOptions {
	return &UpdateLoadBalancerPoolMemberOptions{
		LoadBalancerID:              core.StringPtr(loadBalancerID),
		PoolID:                      core.StringPtr(poolID),
		ID:                          core.StringPtr(id),
		LoadBalancerPoolMemberPatch: loadBalancerPoolMemberPatch,
	}
}

// SetLoadBalancerID : Allow user to set LoadBalancerID
func (options *UpdateLoadBalancerPoolMemberOptions) SetLoadBalancerID(loadBalancerID string) *UpdateLoadBalancerPoolMemberOptions {
	options.LoadBalancerID = core.StringPtr(loadBalancerID)
	return options
}

// SetPoolID : Allow user to set PoolID
func (options *UpdateLoadBalancerPoolMemberOptions) SetPoolID(poolID string) *UpdateLoadBalancerPoolMemberOptions {
	options.PoolID = core.StringPtr(poolID)
	return options
}

// SetID : Allow user to set ID
func (options *UpdateLoadBalancerPoolMemberOptions) SetID(id string) *UpdateLoadBalancerPoolMemberOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetLoadBalancerPoolMemberPatch : Allow user to set LoadBalancerPoolMemberPatch
func (options *UpdateLoadBalancerPoolMemberOptions) SetLoadBalancerPoolMemberPatch(loadBalancerPoolMemberPatch map[string]interface{}) *UpdateLoadBalancerPoolMemberOptions {
	options.LoadBalancerPoolMemberPatch = loadBalancerPoolMemberPatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateLoadBalancerPoolMemberOptions) SetHeaders(param map[string]string) *UpdateLoadBalancerPoolMemberOptions {
	options.Headers = param
	return options
}

// UpdateLoadBalancerPoolOptions : The UpdateLoadBalancerPool options.
type UpdateLoadBalancerPoolOptions struct {
	// The load balancer identifier.
	LoadBalancerID *string `validate:"required,ne="`

	// The pool identifier.
	ID *string `validate:"required,ne="`

	// The load balancer pool patch.
	LoadBalancerPoolPatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateLoadBalancerPoolOptions : Instantiate UpdateLoadBalancerPoolOptions
func (*VpcV1) NewUpdateLoadBalancerPoolOptions(loadBalancerID string, id string, loadBalancerPoolPatch map[string]interface{}) *UpdateLoadBalancerPoolOptions {
	return &UpdateLoadBalancerPoolOptions{
		LoadBalancerID:        core.StringPtr(loadBalancerID),
		ID:                    core.StringPtr(id),
		LoadBalancerPoolPatch: loadBalancerPoolPatch,
	}
}

// SetLoadBalancerID : Allow user to set LoadBalancerID
func (options *UpdateLoadBalancerPoolOptions) SetLoadBalancerID(loadBalancerID string) *UpdateLoadBalancerPoolOptions {
	options.LoadBalancerID = core.StringPtr(loadBalancerID)
	return options
}

// SetID : Allow user to set ID
func (options *UpdateLoadBalancerPoolOptions) SetID(id string) *UpdateLoadBalancerPoolOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetLoadBalancerPoolPatch : Allow user to set LoadBalancerPoolPatch
func (options *UpdateLoadBalancerPoolOptions) SetLoadBalancerPoolPatch(loadBalancerPoolPatch map[string]interface{}) *UpdateLoadBalancerPoolOptions {
	options.LoadBalancerPoolPatch = loadBalancerPoolPatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateLoadBalancerPoolOptions) SetHeaders(param map[string]string) *UpdateLoadBalancerPoolOptions {
	options.Headers = param
	return options
}

// UpdateNetworkACLOptions : The UpdateNetworkACL options.
type UpdateNetworkACLOptions struct {
	// The network ACL identifier.
	ID *string `validate:"required,ne="`

	// The network ACL patch.
	NetworkACLPatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateNetworkACLOptions : Instantiate UpdateNetworkACLOptions
func (*VpcV1) NewUpdateNetworkACLOptions(id string, networkACLPatch map[string]interface{}) *UpdateNetworkACLOptions {
	return &UpdateNetworkACLOptions{
		ID:              core.StringPtr(id),
		NetworkACLPatch: networkACLPatch,
	}
}

// SetID : Allow user to set ID
func (options *UpdateNetworkACLOptions) SetID(id string) *UpdateNetworkACLOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetNetworkACLPatch : Allow user to set NetworkACLPatch
func (options *UpdateNetworkACLOptions) SetNetworkACLPatch(networkACLPatch map[string]interface{}) *UpdateNetworkACLOptions {
	options.NetworkACLPatch = networkACLPatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateNetworkACLOptions) SetHeaders(param map[string]string) *UpdateNetworkACLOptions {
	options.Headers = param
	return options
}

// UpdateNetworkACLRuleOptions : The UpdateNetworkACLRule options.
type UpdateNetworkACLRuleOptions struct {
	// The network ACL identifier.
	NetworkACLID *string `validate:"required,ne="`

	// The rule identifier.
	ID *string `validate:"required,ne="`

	// The network ACL rule patch.
	NetworkACLRulePatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateNetworkACLRuleOptions : Instantiate UpdateNetworkACLRuleOptions
func (*VpcV1) NewUpdateNetworkACLRuleOptions(networkACLID string, id string, networkACLRulePatch map[string]interface{}) *UpdateNetworkACLRuleOptions {
	return &UpdateNetworkACLRuleOptions{
		NetworkACLID:        core.StringPtr(networkACLID),
		ID:                  core.StringPtr(id),
		NetworkACLRulePatch: networkACLRulePatch,
	}
}

// SetNetworkACLID : Allow user to set NetworkACLID
func (options *UpdateNetworkACLRuleOptions) SetNetworkACLID(networkACLID string) *UpdateNetworkACLRuleOptions {
	options.NetworkACLID = core.StringPtr(networkACLID)
	return options
}

// SetID : Allow user to set ID
func (options *UpdateNetworkACLRuleOptions) SetID(id string) *UpdateNetworkACLRuleOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetNetworkACLRulePatch : Allow user to set NetworkACLRulePatch
func (options *UpdateNetworkACLRuleOptions) SetNetworkACLRulePatch(networkACLRulePatch map[string]interface{}) *UpdateNetworkACLRuleOptions {
	options.NetworkACLRulePatch = networkACLRulePatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateNetworkACLRuleOptions) SetHeaders(param map[string]string) *UpdateNetworkACLRuleOptions {
	options.Headers = param
	return options
}

// UpdatePublicGatewayOptions : The UpdatePublicGateway options.
type UpdatePublicGatewayOptions struct {
	// The public gateway identifier.
	ID *string `validate:"required,ne="`

	// The public gateway patch.
	PublicGatewayPatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdatePublicGatewayOptions : Instantiate UpdatePublicGatewayOptions
func (*VpcV1) NewUpdatePublicGatewayOptions(id string, publicGatewayPatch map[string]interface{}) *UpdatePublicGatewayOptions {
	return &UpdatePublicGatewayOptions{
		ID:                 core.StringPtr(id),
		PublicGatewayPatch: publicGatewayPatch,
	}
}

// SetID : Allow user to set ID
func (options *UpdatePublicGatewayOptions) SetID(id string) *UpdatePublicGatewayOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetPublicGatewayPatch : Allow user to set PublicGatewayPatch
func (options *UpdatePublicGatewayOptions) SetPublicGatewayPatch(publicGatewayPatch map[string]interface{}) *UpdatePublicGatewayOptions {
	options.PublicGatewayPatch = publicGatewayPatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdatePublicGatewayOptions) SetHeaders(param map[string]string) *UpdatePublicGatewayOptions {
	options.Headers = param
	return options
}

// UpdateSecurityGroupOptions : The UpdateSecurityGroup options.
type UpdateSecurityGroupOptions struct {
	// The security group identifier.
	ID *string `validate:"required,ne="`

	// The security group patch.
	SecurityGroupPatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateSecurityGroupOptions : Instantiate UpdateSecurityGroupOptions
func (*VpcV1) NewUpdateSecurityGroupOptions(id string, securityGroupPatch map[string]interface{}) *UpdateSecurityGroupOptions {
	return &UpdateSecurityGroupOptions{
		ID:                 core.StringPtr(id),
		SecurityGroupPatch: securityGroupPatch,
	}
}

// SetID : Allow user to set ID
func (options *UpdateSecurityGroupOptions) SetID(id string) *UpdateSecurityGroupOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetSecurityGroupPatch : Allow user to set SecurityGroupPatch
func (options *UpdateSecurityGroupOptions) SetSecurityGroupPatch(securityGroupPatch map[string]interface{}) *UpdateSecurityGroupOptions {
	options.SecurityGroupPatch = securityGroupPatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateSecurityGroupOptions) SetHeaders(param map[string]string) *UpdateSecurityGroupOptions {
	options.Headers = param
	return options
}

// UpdateSecurityGroupRuleOptions : The UpdateSecurityGroupRule options.
type UpdateSecurityGroupRuleOptions struct {
	// The security group identifier.
	SecurityGroupID *string `validate:"required,ne="`

	// The rule identifier.
	ID *string `validate:"required,ne="`

	// The security group rule patch.
	SecurityGroupRulePatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateSecurityGroupRuleOptions : Instantiate UpdateSecurityGroupRuleOptions
func (*VpcV1) NewUpdateSecurityGroupRuleOptions(securityGroupID string, id string, securityGroupRulePatch map[string]interface{}) *UpdateSecurityGroupRuleOptions {
	return &UpdateSecurityGroupRuleOptions{
		SecurityGroupID:        core.StringPtr(securityGroupID),
		ID:                     core.StringPtr(id),
		SecurityGroupRulePatch: securityGroupRulePatch,
	}
}

// SetSecurityGroupID : Allow user to set SecurityGroupID
func (options *UpdateSecurityGroupRuleOptions) SetSecurityGroupID(securityGroupID string) *UpdateSecurityGroupRuleOptions {
	options.SecurityGroupID = core.StringPtr(securityGroupID)
	return options
}

// SetID : Allow user to set ID
func (options *UpdateSecurityGroupRuleOptions) SetID(id string) *UpdateSecurityGroupRuleOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetSecurityGroupRulePatch : Allow user to set SecurityGroupRulePatch
func (options *UpdateSecurityGroupRuleOptions) SetSecurityGroupRulePatch(securityGroupRulePatch map[string]interface{}) *UpdateSecurityGroupRuleOptions {
	options.SecurityGroupRulePatch = securityGroupRulePatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateSecurityGroupRuleOptions) SetHeaders(param map[string]string) *UpdateSecurityGroupRuleOptions {
	options.Headers = param
	return options
}

// UpdateSubnetOptions : The UpdateSubnet options.
type UpdateSubnetOptions struct {
	// The subnet identifier.
	ID *string `validate:"required,ne="`

	// The subnet patch.
	SubnetPatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateSubnetOptions : Instantiate UpdateSubnetOptions
func (*VpcV1) NewUpdateSubnetOptions(id string, subnetPatch map[string]interface{}) *UpdateSubnetOptions {
	return &UpdateSubnetOptions{
		ID:          core.StringPtr(id),
		SubnetPatch: subnetPatch,
	}
}

// SetID : Allow user to set ID
func (options *UpdateSubnetOptions) SetID(id string) *UpdateSubnetOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetSubnetPatch : Allow user to set SubnetPatch
func (options *UpdateSubnetOptions) SetSubnetPatch(subnetPatch map[string]interface{}) *UpdateSubnetOptions {
	options.SubnetPatch = subnetPatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateSubnetOptions) SetHeaders(param map[string]string) *UpdateSubnetOptions {
	options.Headers = param
	return options
}

// UpdateSubnetReservedIPOptions : The UpdateSubnetReservedIP options.
type UpdateSubnetReservedIPOptions struct {
	// The subnet identifier.
	SubnetID *string `validate:"required,ne="`

	// The reserved IP identifier.
	ID *string `validate:"required,ne="`

	// The reserved IP patch.
	ReservedIPPatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateSubnetReservedIPOptions : Instantiate UpdateSubnetReservedIPOptions
func (*VpcV1) NewUpdateSubnetReservedIPOptions(subnetID string, id string, reservedIPPatch map[string]interface{}) *UpdateSubnetReservedIPOptions {
	return &UpdateSubnetReservedIPOptions{
		SubnetID:        core.StringPtr(subnetID),
		ID:              core.StringPtr(id),
		ReservedIPPatch: reservedIPPatch,
	}
}

// SetSubnetID : Allow user to set SubnetID
func (options *UpdateSubnetReservedIPOptions) SetSubnetID(subnetID string) *UpdateSubnetReservedIPOptions {
	options.SubnetID = core.StringPtr(subnetID)
	return options
}

// SetID : Allow user to set ID
func (options *UpdateSubnetReservedIPOptions) SetID(id string) *UpdateSubnetReservedIPOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetReservedIPPatch : Allow user to set ReservedIPPatch
func (options *UpdateSubnetReservedIPOptions) SetReservedIPPatch(reservedIPPatch map[string]interface{}) *UpdateSubnetReservedIPOptions {
	options.ReservedIPPatch = reservedIPPatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateSubnetReservedIPOptions) SetHeaders(param map[string]string) *UpdateSubnetReservedIPOptions {
	options.Headers = param
	return options
}

// UpdateVolumeOptions : The UpdateVolume options.
type UpdateVolumeOptions struct {
	// The volume identifier.
	ID *string `validate:"required,ne="`

	// The volume patch.
	VolumePatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateVolumeOptions : Instantiate UpdateVolumeOptions
func (*VpcV1) NewUpdateVolumeOptions(id string, volumePatch map[string]interface{}) *UpdateVolumeOptions {
	return &UpdateVolumeOptions{
		ID:          core.StringPtr(id),
		VolumePatch: volumePatch,
	}
}

// SetID : Allow user to set ID
func (options *UpdateVolumeOptions) SetID(id string) *UpdateVolumeOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetVolumePatch : Allow user to set VolumePatch
func (options *UpdateVolumeOptions) SetVolumePatch(volumePatch map[string]interface{}) *UpdateVolumeOptions {
	options.VolumePatch = volumePatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateVolumeOptions) SetHeaders(param map[string]string) *UpdateVolumeOptions {
	options.Headers = param
	return options
}

// UpdateVPCAddressPrefixOptions : The UpdateVPCAddressPrefix options.
type UpdateVPCAddressPrefixOptions struct {
	// The VPC identifier.
	VPCID *string `validate:"required,ne="`

	// The prefix identifier.
	ID *string `validate:"required,ne="`

	// The prefix patch.
	AddressPrefixPatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateVPCAddressPrefixOptions : Instantiate UpdateVPCAddressPrefixOptions
func (*VpcV1) NewUpdateVPCAddressPrefixOptions(vpcID string, id string, addressPrefixPatch map[string]interface{}) *UpdateVPCAddressPrefixOptions {
	return &UpdateVPCAddressPrefixOptions{
		VPCID:              core.StringPtr(vpcID),
		ID:                 core.StringPtr(id),
		AddressPrefixPatch: addressPrefixPatch,
	}
}

// SetVPCID : Allow user to set VPCID
func (options *UpdateVPCAddressPrefixOptions) SetVPCID(vpcID string) *UpdateVPCAddressPrefixOptions {
	options.VPCID = core.StringPtr(vpcID)
	return options
}

// SetID : Allow user to set ID
func (options *UpdateVPCAddressPrefixOptions) SetID(id string) *UpdateVPCAddressPrefixOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetAddressPrefixPatch : Allow user to set AddressPrefixPatch
func (options *UpdateVPCAddressPrefixOptions) SetAddressPrefixPatch(addressPrefixPatch map[string]interface{}) *UpdateVPCAddressPrefixOptions {
	options.AddressPrefixPatch = addressPrefixPatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateVPCAddressPrefixOptions) SetHeaders(param map[string]string) *UpdateVPCAddressPrefixOptions {
	options.Headers = param
	return options
}

// UpdateVPCOptions : The UpdateVPC options.
type UpdateVPCOptions struct {
	// The VPC identifier.
	ID *string `validate:"required,ne="`

	// The VPC patch.
	VPCPatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateVPCOptions : Instantiate UpdateVPCOptions
func (*VpcV1) NewUpdateVPCOptions(id string, vpcPatch map[string]interface{}) *UpdateVPCOptions {
	return &UpdateVPCOptions{
		ID:       core.StringPtr(id),
		VPCPatch: vpcPatch,
	}
}

// SetID : Allow user to set ID
func (options *UpdateVPCOptions) SetID(id string) *UpdateVPCOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetVPCPatch : Allow user to set VPCPatch
func (options *UpdateVPCOptions) SetVPCPatch(vpcPatch map[string]interface{}) *UpdateVPCOptions {
	options.VPCPatch = vpcPatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateVPCOptions) SetHeaders(param map[string]string) *UpdateVPCOptions {
	options.Headers = param
	return options
}

// UpdateVPCRouteOptions : The UpdateVPCRoute options.
type UpdateVPCRouteOptions struct {
	// The VPC identifier.
	VPCID *string `validate:"required,ne="`

	// The route identifier.
	ID *string `validate:"required,ne="`

	// The route patch.
	RoutePatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateVPCRouteOptions : Instantiate UpdateVPCRouteOptions
func (*VpcV1) NewUpdateVPCRouteOptions(vpcID string, id string, routePatch map[string]interface{}) *UpdateVPCRouteOptions {
	return &UpdateVPCRouteOptions{
		VPCID:      core.StringPtr(vpcID),
		ID:         core.StringPtr(id),
		RoutePatch: routePatch,
	}
}

// SetVPCID : Allow user to set VPCID
func (options *UpdateVPCRouteOptions) SetVPCID(vpcID string) *UpdateVPCRouteOptions {
	options.VPCID = core.StringPtr(vpcID)
	return options
}

// SetID : Allow user to set ID
func (options *UpdateVPCRouteOptions) SetID(id string) *UpdateVPCRouteOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetRoutePatch : Allow user to set RoutePatch
func (options *UpdateVPCRouteOptions) SetRoutePatch(routePatch map[string]interface{}) *UpdateVPCRouteOptions {
	options.RoutePatch = routePatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateVPCRouteOptions) SetHeaders(param map[string]string) *UpdateVPCRouteOptions {
	options.Headers = param
	return options
}

// UpdateVPCRoutingTableOptions : The UpdateVPCRoutingTable options.
type UpdateVPCRoutingTableOptions struct {
	// The VPC identifier.
	VPCID *string `validate:"required,ne="`

	// The routing table identifier.
	ID *string `validate:"required,ne="`

	// The routing table patch.
	RoutingTablePatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateVPCRoutingTableOptions : Instantiate UpdateVPCRoutingTableOptions
func (*VpcV1) NewUpdateVPCRoutingTableOptions(vpcID string, id string, routingTablePatch map[string]interface{}) *UpdateVPCRoutingTableOptions {
	return &UpdateVPCRoutingTableOptions{
		VPCID:             core.StringPtr(vpcID),
		ID:                core.StringPtr(id),
		RoutingTablePatch: routingTablePatch,
	}
}

// SetVPCID : Allow user to set VPCID
func (options *UpdateVPCRoutingTableOptions) SetVPCID(vpcID string) *UpdateVPCRoutingTableOptions {
	options.VPCID = core.StringPtr(vpcID)
	return options
}

// SetID : Allow user to set ID
func (options *UpdateVPCRoutingTableOptions) SetID(id string) *UpdateVPCRoutingTableOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetRoutingTablePatch : Allow user to set RoutingTablePatch
func (options *UpdateVPCRoutingTableOptions) SetRoutingTablePatch(routingTablePatch map[string]interface{}) *UpdateVPCRoutingTableOptions {
	options.RoutingTablePatch = routingTablePatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateVPCRoutingTableOptions) SetHeaders(param map[string]string) *UpdateVPCRoutingTableOptions {
	options.Headers = param
	return options
}

// UpdateVPCRoutingTableRouteOptions : The UpdateVPCRoutingTableRoute options.
type UpdateVPCRoutingTableRouteOptions struct {
	// The VPC identifier.
	VPCID *string `validate:"required,ne="`

	// The routing table identifier.
	RoutingTableID *string `validate:"required,ne="`

	// The VPC routing table route identifier.
	ID *string `validate:"required,ne="`

	// The VPC route patch.
	RoutePatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateVPCRoutingTableRouteOptions : Instantiate UpdateVPCRoutingTableRouteOptions
func (*VpcV1) NewUpdateVPCRoutingTableRouteOptions(vpcID string, routingTableID string, id string, routePatch map[string]interface{}) *UpdateVPCRoutingTableRouteOptions {
	return &UpdateVPCRoutingTableRouteOptions{
		VPCID:          core.StringPtr(vpcID),
		RoutingTableID: core.StringPtr(routingTableID),
		ID:             core.StringPtr(id),
		RoutePatch:     routePatch,
	}
}

// SetVPCID : Allow user to set VPCID
func (options *UpdateVPCRoutingTableRouteOptions) SetVPCID(vpcID string) *UpdateVPCRoutingTableRouteOptions {
	options.VPCID = core.StringPtr(vpcID)
	return options
}

// SetRoutingTableID : Allow user to set RoutingTableID
func (options *UpdateVPCRoutingTableRouteOptions) SetRoutingTableID(routingTableID string) *UpdateVPCRoutingTableRouteOptions {
	options.RoutingTableID = core.StringPtr(routingTableID)
	return options
}

// SetID : Allow user to set ID
func (options *UpdateVPCRoutingTableRouteOptions) SetID(id string) *UpdateVPCRoutingTableRouteOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetRoutePatch : Allow user to set RoutePatch
func (options *UpdateVPCRoutingTableRouteOptions) SetRoutePatch(routePatch map[string]interface{}) *UpdateVPCRoutingTableRouteOptions {
	options.RoutePatch = routePatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateVPCRoutingTableRouteOptions) SetHeaders(param map[string]string) *UpdateVPCRoutingTableRouteOptions {
	options.Headers = param
	return options
}

// UpdateVPNGatewayConnectionOptions : The UpdateVPNGatewayConnection options.
type UpdateVPNGatewayConnectionOptions struct {
	// The VPN gateway identifier.
	VPNGatewayID *string `validate:"required,ne="`

	// The VPN gateway connection identifier.
	ID *string `validate:"required,ne="`

	// The VPN gateway connection patch.
	VPNGatewayConnectionPatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateVPNGatewayConnectionOptions : Instantiate UpdateVPNGatewayConnectionOptions
func (*VpcV1) NewUpdateVPNGatewayConnectionOptions(vpnGatewayID string, id string, vpnGatewayConnectionPatch map[string]interface{}) *UpdateVPNGatewayConnectionOptions {
	return &UpdateVPNGatewayConnectionOptions{
		VPNGatewayID:              core.StringPtr(vpnGatewayID),
		ID:                        core.StringPtr(id),
		VPNGatewayConnectionPatch: vpnGatewayConnectionPatch,
	}
}

// SetVPNGatewayID : Allow user to set VPNGatewayID
func (options *UpdateVPNGatewayConnectionOptions) SetVPNGatewayID(vpnGatewayID string) *UpdateVPNGatewayConnectionOptions {
	options.VPNGatewayID = core.StringPtr(vpnGatewayID)
	return options
}

// SetID : Allow user to set ID
func (options *UpdateVPNGatewayConnectionOptions) SetID(id string) *UpdateVPNGatewayConnectionOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetVPNGatewayConnectionPatch : Allow user to set VPNGatewayConnectionPatch
func (options *UpdateVPNGatewayConnectionOptions) SetVPNGatewayConnectionPatch(vpnGatewayConnectionPatch map[string]interface{}) *UpdateVPNGatewayConnectionOptions {
	options.VPNGatewayConnectionPatch = vpnGatewayConnectionPatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateVPNGatewayConnectionOptions) SetHeaders(param map[string]string) *UpdateVPNGatewayConnectionOptions {
	options.Headers = param
	return options
}

// UpdateVPNGatewayOptions : The UpdateVPNGateway options.
type UpdateVPNGatewayOptions struct {
	// The VPN gateway identifier.
	ID *string `validate:"required,ne="`

	// The VPN gateway patch.
	VPNGatewayPatch map[string]interface{} `validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

// NewUpdateVPNGatewayOptions : Instantiate UpdateVPNGatewayOptions
func (*VpcV1) NewUpdateVPNGatewayOptions(id string, vpnGatewayPatch map[string]interface{}) *UpdateVPNGatewayOptions {
	return &UpdateVPNGatewayOptions{
		ID:              core.StringPtr(id),
		VPNGatewayPatch: vpnGatewayPatch,
	}
}

// SetID : Allow user to set ID
func (options *UpdateVPNGatewayOptions) SetID(id string) *UpdateVPNGatewayOptions {
	options.ID = core.StringPtr(id)
	return options
}

// SetVPNGatewayPatch : Allow user to set VPNGatewayPatch
func (options *UpdateVPNGatewayOptions) SetVPNGatewayPatch(vpnGatewayPatch map[string]interface{}) *UpdateVPNGatewayOptions {
	options.VPNGatewayPatch = vpnGatewayPatch
	return options
}

// SetHeaders : Allow user to set Headers
func (options *UpdateVPNGatewayOptions) SetHeaders(param map[string]string) *UpdateVPNGatewayOptions {
	options.Headers = param
	return options
}

// Vcpu : The VCPU configuration.
type Vcpu struct {
	// The VCPU architecture.
	Architecture *string `json:"architecture" validate:"required"`

	// The number of VCPUs assigned.
	Count *int64 `json:"count" validate:"required"`
}

// UnmarshalVcpu unmarshals an instance of Vcpu from the specified map of raw messages.
func UnmarshalVcpu(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(Vcpu)
	err = core.UnmarshalPrimitive(m, "architecture", &obj.Architecture)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "count", &obj.Count)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VPC : VPC struct
type VPC struct {
	// Indicates whether this VPC is connected to Classic Infrastructure. If true, this VPC's resources have private
	// network connectivity to the account's Classic Infrastructure resources. Only one VPC, per region, may be connected
	// in this way. This value is set at creation and subsequently immutable.
	ClassicAccess *bool `json:"classic_access" validate:"required"`

	// The date and time that the VPC was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The CRN for this VPC.
	CRN *string `json:"crn" validate:"required"`

	// Array of CSE ([Cloud Service Endpoint](https://cloud.ibm.com/docs/resources?topic=resources-service-endpoints))
	// source IP addresses for the VPC. The VPC will have one CSE source IP address per zone.
	CseSourceIps []VpccseSourceIP `json:"cse_source_ips,omitempty"`

	// The default network ACL to use for subnets created in this VPC.
	DefaultNetworkACL *NetworkACLReference `json:"default_network_acl" validate:"required"`

	// The default routing table to use for subnets created in this VPC.
	DefaultRoutingTable *RoutingTableReference `json:"default_routing_table" validate:"required"`

	// The default security group to use for network interfaces created in this VPC.
	DefaultSecurityGroup *SecurityGroupReference `json:"default_security_group" validate:"required"`

	// The URL for this VPC.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this VPC.
	ID *string `json:"id" validate:"required"`

	// The unique user-defined name for this VPC.
	Name *string `json:"name" validate:"required"`

	// The resource group for this VPC.
	ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`

	// The status of this VPC.
	Status *string `json:"status" validate:"required"`
}

// Constants associated with the VPC.Status property.
// The status of this VPC.
const (
	VPCStatusAvailableConst = "available"
	VPCStatusDeletingConst  = "deleting"
	VPCStatusFailedConst    = "failed"
	VPCStatusPendingConst   = "pending"
)

// UnmarshalVPC unmarshals an instance of VPC from the specified map of raw messages.
func UnmarshalVPC(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPC)
	err = core.UnmarshalPrimitive(m, "classic_access", &obj.ClassicAccess)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "cse_source_ips", &obj.CseSourceIps, UnmarshalVpccseSourceIP)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "default_network_acl", &obj.DefaultNetworkACL, UnmarshalNetworkACLReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "default_routing_table", &obj.DefaultRoutingTable, UnmarshalRoutingTableReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "default_security_group", &obj.DefaultSecurityGroup, UnmarshalSecurityGroupReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "status", &obj.Status)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VpccseSourceIP : VpccseSourceIP struct
type VpccseSourceIP struct {
	// The cloud service endpoint source IP address for this zone.
	IP *IP `json:"ip" validate:"required"`

	// The zone this cloud service endpoint source IP resides in.
	Zone *ZoneReference `json:"zone" validate:"required"`
}

// UnmarshalVpccseSourceIP unmarshals an instance of VpccseSourceIP from the specified map of raw messages.
func UnmarshalVpccseSourceIP(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VpccseSourceIP)
	err = core.UnmarshalModel(m, "ip", &obj.IP, UnmarshalIP)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneReference)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VPCCollection : VPCCollection struct
type VPCCollection struct {
	// A link to the first page of resources.
	First *VPCCollectionFirst `json:"first" validate:"required"`

	// The maximum number of resources that can be returned by the request.
	Limit *int64 `json:"limit" validate:"required"`

	// A link to the next page of resources. This property is present for all pages
	// except the last page.
	Next *VPCCollectionNext `json:"next,omitempty"`

	// The total number of resources across all pages.
	TotalCount *int64 `json:"total_count" validate:"required"`

	// Collection of VPCs.
	Vpcs []VPC `json:"vpcs" validate:"required"`
}

// UnmarshalVPCCollection unmarshals an instance of VPCCollection from the specified map of raw messages.
func UnmarshalVPCCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPCCollection)
	err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalVPCCollectionFirst)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalVPCCollectionNext)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "vpcs", &obj.Vpcs, UnmarshalVPC)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VPCCollectionFirst : A link to the first page of resources.
type VPCCollectionFirst struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalVPCCollectionFirst unmarshals an instance of VPCCollectionFirst from the specified map of raw messages.
func UnmarshalVPCCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPCCollectionFirst)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VPCCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
type VPCCollectionNext struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalVPCCollectionNext unmarshals an instance of VPCCollectionNext from the specified map of raw messages.
func UnmarshalVPCCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPCCollectionNext)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VPCIdentity : Identifies a VPC by a unique property.
// Models which "extend" this model:
// - VPCIdentityByID
// - VPCIdentityByCRN
// - VPCIdentityByHref
type VPCIdentity struct {
	// The unique identifier for this VPC.
	ID *string `json:"id,omitempty"`

	// The CRN for this VPC.
	CRN *string `json:"crn,omitempty"`

	// The URL for this VPC.
	Href *string `json:"href,omitempty"`
}

func (*VPCIdentity) isaVPCIdentity() bool {
	return true
}

type VPCIdentityIntf interface {
	isaVPCIdentity() bool
}

// UnmarshalVPCIdentity unmarshals an instance of VPCIdentity from the specified map of raw messages.
func UnmarshalVPCIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPCIdentity)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VPCPatch : VPCPatch struct
type VPCPatch struct {
	// The unique user-defined name for this VPC.
	Name *string `json:"name,omitempty"`
}

// UnmarshalVPCPatch unmarshals an instance of VPCPatch from the specified map of raw messages.
func UnmarshalVPCPatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPCPatch)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the VPCPatch
func (vpcPatch *VPCPatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(vpcPatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// VPCReference : VPCReference struct
type VPCReference struct {
	// The CRN for this VPC.
	CRN *string `json:"crn" validate:"required"`

	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *VPCReferenceDeleted `json:"deleted,omitempty"`

	// The URL for this VPC.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this VPC.
	ID *string `json:"id" validate:"required"`

	// The unique user-defined name for this VPC.
	Name *string `json:"name" validate:"required"`
}

// UnmarshalVPCReference unmarshals an instance of VPCReference from the specified map of raw messages.
func UnmarshalVPCReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPCReference)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVPCReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VPCReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type VPCReferenceDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalVPCReferenceDeleted unmarshals an instance of VPCReferenceDeleted from the specified map of raw messages.
func UnmarshalVPCReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPCReferenceDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VPNGateway : VPNGateway struct
// Models which "extend" this model:
// - VPNGatewayRouteMode
// - VPNGatewayPolicyMode
type VPNGateway struct {
	// Collection of references to VPN gateway connections.
	Connections []VPNGatewayConnectionReference `json:"connections" validate:"required"`

	// The date and time that this VPN gateway was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The VPN gateway's CRN.
	CRN *string `json:"crn" validate:"required"`

	// The VPN gateway's canonical URL.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this VPN gateway.
	ID *string `json:"id" validate:"required"`

	// Collection of VPN gateway members.
	Members []VPNGatewayMember `json:"members" validate:"required"`

	// The user-defined name for this VPN gateway.
	Name *string `json:"name" validate:"required"`

	// The resource group for this VPN gateway.
	ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`

	// The resource type.
	ResourceType *string `json:"resource_type" validate:"required"`

	// The status of the VPN gateway.
	Status *string `json:"status" validate:"required"`

	Subnet *SubnetReference `json:"subnet" validate:"required"`

	// Route mode VPN gateway.
	Mode *string `json:"mode,omitempty"`
}

// Constants associated with the VPNGateway.ResourceType property.
// The resource type.
const (
	VPNGatewayResourceTypeVPNGatewayConst = "vpn_gateway"
)

// Constants associated with the VPNGateway.Status property.
// The status of the VPN gateway.
const (
	VPNGatewayStatusAvailableConst = "available"
	VPNGatewayStatusDeletingConst  = "deleting"
	VPNGatewayStatusFailedConst    = "failed"
	VPNGatewayStatusPendingConst   = "pending"
)

// Constants associated with the VPNGateway.Mode property.
// Route mode VPN gateway.
const (
	VPNGatewayModeRouteConst = "route"
)

func (*VPNGateway) isaVPNGateway() bool {
	return true
}

type VPNGatewayIntf interface {
	isaVPNGateway() bool
}

// UnmarshalVPNGateway unmarshals an instance of VPNGateway from the specified map of raw messages.
func UnmarshalVPNGateway(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPNGateway)
	err = core.UnmarshalModel(m, "connections", &obj.Connections, UnmarshalVPNGatewayConnectionReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "members", &obj.Members, UnmarshalVPNGatewayMember)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "status", &obj.Status)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "mode", &obj.Mode)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VPNGatewayCollection : VPNGatewayCollection struct
type VPNGatewayCollection struct {
	// A link to the first page of resources.
	First *VPNGatewayCollectionFirst `json:"first" validate:"required"`

	// The maximum number of resources that can be returned by the request.
	Limit *int64 `json:"limit" validate:"required"`

	// A link to the next page of resources. This property is present for all pages
	// except the last page.
	Next *VPNGatewayCollectionNext `json:"next,omitempty"`

	// The total number of resources across all pages.
	TotalCount *int64 `json:"total_count" validate:"required"`

	// Collection of VPN gateways.
	VPNGateways []VPNGatewayIntf `json:"vpn_gateways" validate:"required"`
}

// UnmarshalVPNGatewayCollection unmarshals an instance of VPNGatewayCollection from the specified map of raw messages.
func UnmarshalVPNGatewayCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPNGatewayCollection)
	err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalVPNGatewayCollectionFirst)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalVPNGatewayCollectionNext)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "vpn_gateways", &obj.VPNGateways, UnmarshalVPNGateway)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VPNGatewayCollectionFirst : A link to the first page of resources.
type VPNGatewayCollectionFirst struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalVPNGatewayCollectionFirst unmarshals an instance of VPNGatewayCollectionFirst from the specified map of raw messages.
func UnmarshalVPNGatewayCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPNGatewayCollectionFirst)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VPNGatewayCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
type VPNGatewayCollectionNext struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalVPNGatewayCollectionNext unmarshals an instance of VPNGatewayCollectionNext from the specified map of raw messages.
func UnmarshalVPNGatewayCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPNGatewayCollectionNext)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VPNGatewayConnection : VPNGatewayConnection struct
// Models which "extend" this model:
// - VPNGatewayConnectionStaticRouteMode
// - VPNGatewayConnectionPolicyMode
type VPNGatewayConnection struct {
	// If set to false, the VPN gateway connection is shut down.
	AdminStateUp *bool `json:"admin_state_up" validate:"required"`

	// The authentication mode. Only `psk` is currently supported.
	AuthenticationMode *string `json:"authentication_mode" validate:"required"`

	// The date and time that this VPN gateway connection was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The Dead Peer Detection settings.
	DeadPeerDetection *VPNGatewayConnectionDpd `json:"dead_peer_detection" validate:"required"`

	// The VPN connection's canonical URL.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this VPN gateway connection.
	ID *string `json:"id" validate:"required"`

	// Optional IKE policy configuration. The absence of a policy indicates autonegotiation.
	IkePolicy *IkePolicyReference `json:"ike_policy,omitempty"`

	// Optional IPsec policy configuration. The absence of a policy indicates
	// autonegotiation.
	IpsecPolicy *IPsecPolicyReference `json:"ipsec_policy,omitempty"`

	// The mode of the VPN gateway.
	Mode *string `json:"mode" validate:"required"`

	// The user-defined name for this VPN gateway connection.
	Name *string `json:"name" validate:"required"`

	// The IP address of the peer VPN gateway.
	PeerAddress *string `json:"peer_address" validate:"required"`

	// The preshared key.
	Psk *string `json:"psk" validate:"required"`

	// The resource type.
	ResourceType *string `json:"resource_type" validate:"required"`

	// The status of a VPN gateway connection.
	Status *string `json:"status" validate:"required"`

	// Routing protocols are disabled for this VPN gateway connection.
	RoutingProtocol *string `json:"routing_protocol,omitempty"`

	// The VPN tunnel configuration for this VPN gateway connection (in static route mode).
	Tunnels []VPNGatewayConnectionStaticRouteModeTunnel `json:"tunnels,omitempty"`

	// A collection of local CIDRs for this resource.
	LocalCIDRs []string `json:"local_cidrs,omitempty"`

	// A collection of peer CIDRs for this resource.
	PeerCIDRs []string `json:"peer_cidrs,omitempty"`
}

// Constants associated with the VPNGatewayConnection.AuthenticationMode property.
// The authentication mode. Only `psk` is currently supported.
const (
	VPNGatewayConnectionAuthenticationModePskConst = "psk"
)

// Constants associated with the VPNGatewayConnection.Mode property.
// The mode of the VPN gateway.
const (
	VPNGatewayConnectionModePolicyConst = "policy"
	VPNGatewayConnectionModeRouteConst  = "route"
)

// Constants associated with the VPNGatewayConnection.ResourceType property.
// The resource type.
const (
	VPNGatewayConnectionResourceTypeVPNGatewayConnectionConst = "vpn_gateway_connection"
)

// Constants associated with the VPNGatewayConnection.Status property.
// The status of a VPN gateway connection.
const (
	VPNGatewayConnectionStatusDownConst = "down"
	VPNGatewayConnectionStatusUpConst   = "up"
)

// Constants associated with the VPNGatewayConnection.RoutingProtocol property.
// Routing protocols are disabled for this VPN gateway connection.
const (
	VPNGatewayConnectionRoutingProtocolNoneConst = "none"
)

func (*VPNGatewayConnection) isaVPNGatewayConnection() bool {
	return true
}

type VPNGatewayConnectionIntf interface {
	isaVPNGatewayConnection() bool
}

// UnmarshalVPNGatewayConnection unmarshals an instance of VPNGatewayConnection from the specified map of raw messages.
func UnmarshalVPNGatewayConnection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPNGatewayConnection)
	err = core.UnmarshalPrimitive(m, "admin_state_up", &obj.AdminStateUp)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "authentication_mode", &obj.AuthenticationMode)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "dead_peer_detection", &obj.DeadPeerDetection, UnmarshalVPNGatewayConnectionDpd)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalIkePolicyReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalIPsecPolicyReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "mode", &obj.Mode)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "peer_address", &obj.PeerAddress)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "psk", &obj.Psk)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "status", &obj.Status)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "routing_protocol", &obj.RoutingProtocol)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "tunnels", &obj.Tunnels, UnmarshalVPNGatewayConnectionStaticRouteModeTunnel)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "local_cidrs", &obj.LocalCIDRs)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "peer_cidrs", &obj.PeerCIDRs)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VPNGatewayConnectionCollection : Collection of VPN gateway connections in a VPN gateway.
type VPNGatewayConnectionCollection struct {
	// Array of VPN gateway connections.
	Connections []VPNGatewayConnectionIntf `json:"connections" validate:"required"`
}

// UnmarshalVPNGatewayConnectionCollection unmarshals an instance of VPNGatewayConnectionCollection from the specified map of raw messages.
func UnmarshalVPNGatewayConnectionCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPNGatewayConnectionCollection)
	err = core.UnmarshalModel(m, "connections", &obj.Connections, UnmarshalVPNGatewayConnection)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VPNGatewayConnectionDpd : The Dead Peer Detection settings.
type VPNGatewayConnectionDpd struct {
	// Dead Peer Detection actions.
	Action *string `json:"action" validate:"required"`

	// Dead Peer Detection interval in seconds.
	Interval *int64 `json:"interval" validate:"required"`

	// Dead Peer Detection timeout in seconds. Must be at least the interval.
	Timeout *int64 `json:"timeout" validate:"required"`
}

// Constants associated with the VPNGatewayConnectionDpd.Action property.
// Dead Peer Detection actions.
const (
	VPNGatewayConnectionDpdActionClearConst   = "clear"
	VPNGatewayConnectionDpdActionHoldConst    = "hold"
	VPNGatewayConnectionDpdActionNoneConst    = "none"
	VPNGatewayConnectionDpdActionRestartConst = "restart"
)

// UnmarshalVPNGatewayConnectionDpd unmarshals an instance of VPNGatewayConnectionDpd from the specified map of raw messages.
func UnmarshalVPNGatewayConnectionDpd(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPNGatewayConnectionDpd)
	err = core.UnmarshalPrimitive(m, "action", &obj.Action)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "interval", &obj.Interval)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "timeout", &obj.Timeout)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VPNGatewayConnectionDpdPrototype : The Dead Peer Detection settings.
type VPNGatewayConnectionDpdPrototype struct {
	// Dead Peer Detection actions.
	Action *string `json:"action,omitempty"`

	// Dead Peer Detection interval in seconds.
	Interval *int64 `json:"interval,omitempty"`

	// Dead Peer Detection timeout in seconds. Must be at least the interval.
	Timeout *int64 `json:"timeout,omitempty"`
}

// Constants associated with the VPNGatewayConnectionDpdPrototype.Action property.
// Dead Peer Detection actions.
const (
	VPNGatewayConnectionDpdPrototypeActionClearConst   = "clear"
	VPNGatewayConnectionDpdPrototypeActionHoldConst    = "hold"
	VPNGatewayConnectionDpdPrototypeActionNoneConst    = "none"
	VPNGatewayConnectionDpdPrototypeActionRestartConst = "restart"
)

// UnmarshalVPNGatewayConnectionDpdPrototype unmarshals an instance of VPNGatewayConnectionDpdPrototype from the specified map of raw messages.
func UnmarshalVPNGatewayConnectionDpdPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPNGatewayConnectionDpdPrototype)
	err = core.UnmarshalPrimitive(m, "action", &obj.Action)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "interval", &obj.Interval)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "timeout", &obj.Timeout)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VPNGatewayConnectionLocalCIDRs : VPNGatewayConnectionLocalCIDRs struct
type VPNGatewayConnectionLocalCIDRs struct {
	// A collection of local CIDRs for this resource.
	LocalCIDRs []string `json:"local_cidrs,omitempty"`
}

// UnmarshalVPNGatewayConnectionLocalCIDRs unmarshals an instance of VPNGatewayConnectionLocalCIDRs from the specified map of raw messages.
func UnmarshalVPNGatewayConnectionLocalCIDRs(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPNGatewayConnectionLocalCIDRs)
	err = core.UnmarshalPrimitive(m, "local_cidrs", &obj.LocalCIDRs)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VPNGatewayConnectionPatch : VPNGatewayConnectionPatch struct
// Models which "extend" this model:
// - VPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch
type VPNGatewayConnectionPatch struct {
	// If set to false, the VPN gateway connection is shut down.
	AdminStateUp *bool `json:"admin_state_up,omitempty"`

	// The Dead Peer Detection settings.
	DeadPeerDetection *VPNGatewayConnectionDpdPrototype `json:"dead_peer_detection,omitempty"`

	// Optional IKE policy configuration. The absence of a policy indicates autonegotiation.
	IkePolicy IkePolicyIdentityIntf `json:"ike_policy,omitempty"`

	// Optional IPsec policy configuration. The absence of a policy indicates
	// autonegotiation.
	IpsecPolicy IPsecPolicyIdentityIntf `json:"ipsec_policy,omitempty"`

	// The user-defined name for this VPN gateway connection.
	Name *string `json:"name,omitempty"`

	// The IP address of the peer VPN gateway.
	PeerAddress *string `json:"peer_address,omitempty"`

	// The preshared key.
	Psk *string `json:"psk,omitempty"`

	// Routing protocols are disabled for this VPN gateway connection.
	RoutingProtocol *string `json:"routing_protocol,omitempty"`
}

// Constants associated with the VPNGatewayConnectionPatch.RoutingProtocol property.
// Routing protocols are disabled for this VPN gateway connection.
const (
	VPNGatewayConnectionPatchRoutingProtocolNoneConst = "none"
)

func (*VPNGatewayConnectionPatch) isaVPNGatewayConnectionPatch() bool {
	return true
}

type VPNGatewayConnectionPatchIntf interface {
	isaVPNGatewayConnectionPatch() bool
}

// UnmarshalVPNGatewayConnectionPatch unmarshals an instance of VPNGatewayConnectionPatch from the specified map of raw messages.
func UnmarshalVPNGatewayConnectionPatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPNGatewayConnectionPatch)
	err = core.UnmarshalPrimitive(m, "admin_state_up", &obj.AdminStateUp)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "dead_peer_detection", &obj.DeadPeerDetection, UnmarshalVPNGatewayConnectionDpdPrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalIkePolicyIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalIPsecPolicyIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "peer_address", &obj.PeerAddress)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "psk", &obj.Psk)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "routing_protocol", &obj.RoutingProtocol)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the VPNGatewayConnectionPatch
func (vpnGatewayConnectionPatch *VPNGatewayConnectionPatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(vpnGatewayConnectionPatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// VPNGatewayConnectionPeerCIDRs : VPNGatewayConnectionPeerCIDRs struct
type VPNGatewayConnectionPeerCIDRs struct {
	// A collection of peer CIDRs for this resource.
	PeerCIDRs []string `json:"peer_cidrs,omitempty"`
}

// UnmarshalVPNGatewayConnectionPeerCIDRs unmarshals an instance of VPNGatewayConnectionPeerCIDRs from the specified map of raw messages.
func UnmarshalVPNGatewayConnectionPeerCIDRs(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPNGatewayConnectionPeerCIDRs)
	err = core.UnmarshalPrimitive(m, "peer_cidrs", &obj.PeerCIDRs)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VPNGatewayConnectionPrototype : VPNGatewayConnectionPrototype struct
// Models which "extend" this model:
// - VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype
// - VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype
type VPNGatewayConnectionPrototype struct {
	// If set to false, the VPN gateway connection is shut down.
	AdminStateUp *bool `json:"admin_state_up,omitempty"`

	// The Dead Peer Detection settings.
	DeadPeerDetection *VPNGatewayConnectionDpdPrototype `json:"dead_peer_detection,omitempty"`

	// Optional IKE policy configuration. The absence of a policy indicates autonegotiation.
	IkePolicy IkePolicyIdentityIntf `json:"ike_policy,omitempty"`

	// Optional IPsec policy configuration. The absence of a policy indicates
	// autonegotiation.
	IpsecPolicy IPsecPolicyIdentityIntf `json:"ipsec_policy,omitempty"`

	// The user-defined name for this VPN gateway connection.
	Name *string `json:"name,omitempty"`

	// The IP address of the peer VPN gateway.
	PeerAddress *string `json:"peer_address" validate:"required"`

	// The preshared key.
	Psk *string `json:"psk" validate:"required"`

	// Routing protocols are disabled for this VPN gateway connection.
	RoutingProtocol *string `json:"routing_protocol,omitempty"`

	// A collection of local CIDRs for this resource.
	LocalCIDRs []string `json:"local_cidrs,omitempty"`

	// A collection of peer CIDRs for this resource.
	PeerCIDRs []string `json:"peer_cidrs,omitempty"`
}

// Constants associated with the VPNGatewayConnectionPrototype.RoutingProtocol property.
// Routing protocols are disabled for this VPN gateway connection.
const (
	VPNGatewayConnectionPrototypeRoutingProtocolNoneConst = "none"
)

func (*VPNGatewayConnectionPrototype) isaVPNGatewayConnectionPrototype() bool {
	return true
}

type VPNGatewayConnectionPrototypeIntf interface {
	isaVPNGatewayConnectionPrototype() bool
}

// UnmarshalVPNGatewayConnectionPrototype unmarshals an instance of VPNGatewayConnectionPrototype from the specified map of raw messages.
func UnmarshalVPNGatewayConnectionPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPNGatewayConnectionPrototype)
	err = core.UnmarshalPrimitive(m, "admin_state_up", &obj.AdminStateUp)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "dead_peer_detection", &obj.DeadPeerDetection, UnmarshalVPNGatewayConnectionDpdPrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalIkePolicyIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalIPsecPolicyIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "peer_address", &obj.PeerAddress)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "psk", &obj.Psk)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "routing_protocol", &obj.RoutingProtocol)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "local_cidrs", &obj.LocalCIDRs)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "peer_cidrs", &obj.PeerCIDRs)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VPNGatewayConnectionReference : VPNGatewayConnectionReference struct
type VPNGatewayConnectionReference struct {
	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *VPNGatewayConnectionReferenceDeleted `json:"deleted,omitempty"`

	// The VPN connection's canonical URL.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this VPN gateway connection.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this VPN connection.
	Name *string `json:"name" validate:"required"`

	// The resource type.
	ResourceType *string `json:"resource_type" validate:"required"`
}

// Constants associated with the VPNGatewayConnectionReference.ResourceType property.
// The resource type.
const (
	VPNGatewayConnectionReferenceResourceTypeVPNGatewayConnectionConst = "vpn_gateway_connection"
)

// UnmarshalVPNGatewayConnectionReference unmarshals an instance of VPNGatewayConnectionReference from the specified map of raw messages.
func UnmarshalVPNGatewayConnectionReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPNGatewayConnectionReference)
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVPNGatewayConnectionReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VPNGatewayConnectionReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type VPNGatewayConnectionReferenceDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalVPNGatewayConnectionReferenceDeleted unmarshals an instance of VPNGatewayConnectionReferenceDeleted from the specified map of raw messages.
func UnmarshalVPNGatewayConnectionReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPNGatewayConnectionReferenceDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VPNGatewayConnectionStaticRouteModeTunnel : VPNGatewayConnectionStaticRouteModeTunnel struct
type VPNGatewayConnectionStaticRouteModeTunnel struct {
	// The IP address of the VPN gateway member in which the tunnel resides.
	PublicIP *IP `json:"public_ip" validate:"required"`

	// The status of the VPN Tunnel.
	Status *string `json:"status" validate:"required"`
}

// Constants associated with the VPNGatewayConnectionStaticRouteModeTunnel.Status property.
// The status of the VPN Tunnel.
const (
	VPNGatewayConnectionStaticRouteModeTunnelStatusDownConst = "down"
	VPNGatewayConnectionStaticRouteModeTunnelStatusUpConst   = "up"
)

// UnmarshalVPNGatewayConnectionStaticRouteModeTunnel unmarshals an instance of VPNGatewayConnectionStaticRouteModeTunnel from the specified map of raw messages.
func UnmarshalVPNGatewayConnectionStaticRouteModeTunnel(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPNGatewayConnectionStaticRouteModeTunnel)
	err = core.UnmarshalModel(m, "public_ip", &obj.PublicIP, UnmarshalIP)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "status", &obj.Status)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VPNGatewayMember : VPNGatewayMember struct
type VPNGatewayMember struct {
	// The private IP address assigned to the VPN gateway member. This
	// property will be present only when the VPN gateway status is
	// `available`.
	PrivateIP *IP `json:"private_ip,omitempty"`

	// The public IP address assigned to the VPN gateway member.
	PublicIP *IP `json:"public_ip" validate:"required"`

	// The high availability role assigned to the VPN gateway member.
	Role *string `json:"role" validate:"required"`

	// The status of the VPN gateway member.
	Status *string `json:"status" validate:"required"`
}

// Constants associated with the VPNGatewayMember.Role property.
// The high availability role assigned to the VPN gateway member.
const (
	VPNGatewayMemberRoleActiveConst  = "active"
	VPNGatewayMemberRoleStandbyConst = "standby"
)

// Constants associated with the VPNGatewayMember.Status property.
// The status of the VPN gateway member.
const (
	VPNGatewayMemberStatusAvailableConst = "available"
	VPNGatewayMemberStatusDeletingConst  = "deleting"
	VPNGatewayMemberStatusFailedConst    = "failed"
	VPNGatewayMemberStatusPendingConst   = "pending"
)

// UnmarshalVPNGatewayMember unmarshals an instance of VPNGatewayMember from the specified map of raw messages.
func UnmarshalVPNGatewayMember(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPNGatewayMember)
	err = core.UnmarshalModel(m, "private_ip", &obj.PrivateIP, UnmarshalIP)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "public_ip", &obj.PublicIP, UnmarshalIP)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "role", &obj.Role)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "status", &obj.Status)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VPNGatewayPatch : VPNGatewayPatch struct
type VPNGatewayPatch struct {
	// The user-defined name for this VPN gateway.
	Name *string `json:"name,omitempty"`
}

// UnmarshalVPNGatewayPatch unmarshals an instance of VPNGatewayPatch from the specified map of raw messages.
func UnmarshalVPNGatewayPatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPNGatewayPatch)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the VPNGatewayPatch
func (vpnGatewayPatch *VPNGatewayPatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(vpnGatewayPatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// VPNGatewayPrototype : VPNGatewayPrototype struct
// Models which "extend" this model:
// - VPNGatewayPrototypeVPNGatewayRouteModePrototype
// - VPNGatewayPrototypeVPNGatewayPolicyModePrototype
type VPNGatewayPrototype struct {
	// The user-defined name for this VPN gateway.
	Name *string `json:"name,omitempty"`

	// The resource group to use. If unspecified, the account's [default resource
	// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
	ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`

	// Identifies a subnet by a unique property.
	Subnet SubnetIdentityIntf `json:"subnet" validate:"required"`

	// Route mode VPN gateway.
	Mode *string `json:"mode,omitempty"`
}

// Constants associated with the VPNGatewayPrototype.Mode property.
// Route mode VPN gateway.
const (
	VPNGatewayPrototypeModeRouteConst = "route"
)

func (*VPNGatewayPrototype) isaVPNGatewayPrototype() bool {
	return true
}

type VPNGatewayPrototypeIntf interface {
	isaVPNGatewayPrototype() bool
}

// UnmarshalVPNGatewayPrototype unmarshals an instance of VPNGatewayPrototype from the specified map of raw messages.
func UnmarshalVPNGatewayPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPNGatewayPrototype)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "mode", &obj.Mode)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// Volume : Volume struct
type Volume struct {
	// The capacity of the volume in gigabytes. The specified minimum and maximum capacity values for creating or updating
	// volumes may expand in the future.
	Capacity *int64 `json:"capacity" validate:"required"`

	// The date and time that the volume was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The CRN for this volume.
	CRN *string `json:"crn" validate:"required"`

	// The type of encryption used on the volume.
	Encryption *string `json:"encryption" validate:"required"`

	// A reference to the root key used to wrap the data encryption key for the volume.
	//
	// This property will be present for volumes with an `encryption` type of
	// `user_managed`.
	EncryptionKey *EncryptionKeyReference `json:"encryption_key,omitempty"`

	// The URL for this volume.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this volume.
	ID *string `json:"id" validate:"required"`

	// The bandwidth for the volume.
	Iops *int64 `json:"iops" validate:"required"`

	// The unique user-defined name for this volume.
	Name *string `json:"name" validate:"required"`

	// The profile this volume uses.
	Profile *VolumeProfileReference `json:"profile" validate:"required"`

	// The resource group for this volume.
	ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`

	// The status of the volume.
	//
	// The enumerated values for this property will expand in the future. When processing this property, check for and log
	// unknown values. Optionally halt processing and surface the error, or bypass the volume on which the unexpected
	// property value was encountered.
	Status *string `json:"status" validate:"required"`

	// Array of reasons for the current status (if any).
	//
	// The enumerated reason code values for this property will expand in the future. When processing this property, check
	// for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the
	// unexpected reason code was encountered.
	StatusReasons []VolumeStatusReason `json:"status_reasons" validate:"required"`

	// The collection of volume attachments attaching instances to the volume.
	VolumeAttachments []VolumeAttachmentReferenceVolumeContext `json:"volume_attachments" validate:"required"`

	// The zone this volume resides in.
	Zone *ZoneReference `json:"zone" validate:"required"`
}

// Constants associated with the Volume.Encryption property.
// The type of encryption used on the volume.
const (
	VolumeEncryptionProviderManagedConst = "provider_managed"
	VolumeEncryptionUserManagedConst     = "user_managed"
)

// Constants associated with the Volume.Status property.
// The status of the volume.
//
// The enumerated values for this property will expand in the future. When processing this property, check for and log
// unknown values. Optionally halt processing and surface the error, or bypass the volume on which the unexpected
// property value was encountered.
const (
	VolumeStatusAvailableConst       = "available"
	VolumeStatusFailedConst          = "failed"
	VolumeStatusPendingConst         = "pending"
	VolumeStatusPendingDeletionConst = "pending_deletion"
	VolumeStatusUnusableConst        = "unusable"
)

// UnmarshalVolume unmarshals an instance of Volume from the specified map of raw messages.
func UnmarshalVolume(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(Volume)
	err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "encryption", &obj.Encryption)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "iops", &obj.Iops)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "status", &obj.Status)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "status_reasons", &obj.StatusReasons, UnmarshalVolumeStatusReason)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentReferenceVolumeContext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneReference)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumeAttachment : VolumeAttachment struct
type VolumeAttachment struct {
	// The date and time that the volume was attached.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// If set to true, when deleting the instance the volume will also be deleted.
	DeleteVolumeOnInstanceDelete *bool `json:"delete_volume_on_instance_delete,omitempty"`

	// Information about how the volume is exposed to the instance operating system.
	//
	// This property may be absent if the volume attachment's `status` is not `attached`.
	Device *VolumeAttachmentDevice `json:"device,omitempty"`

	// The URL for this volume attachment.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this volume attachment.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this volume attachment.
	Name *string `json:"name" validate:"required"`

	// The status of this volume attachment.
	Status *string `json:"status" validate:"required"`

	// The type of volume attachment.
	Type *string `json:"type" validate:"required"`

	// The attached volume.
	Volume *VolumeReference `json:"volume" validate:"required"`
}

// Constants associated with the VolumeAttachment.Status property.
// The status of this volume attachment.
const (
	VolumeAttachmentStatusAttachedConst  = "attached"
	VolumeAttachmentStatusAttachingConst = "attaching"
	VolumeAttachmentStatusDeletingConst  = "deleting"
	VolumeAttachmentStatusDetachingConst = "detaching"
)

// Constants associated with the VolumeAttachment.Type property.
// The type of volume attachment.
const (
	VolumeAttachmentTypeBootConst = "boot"
	VolumeAttachmentTypeDataConst = "data"
)

// UnmarshalVolumeAttachment unmarshals an instance of VolumeAttachment from the specified map of raw messages.
func UnmarshalVolumeAttachment(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumeAttachment)
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "delete_volume_on_instance_delete", &obj.DeleteVolumeOnInstanceDelete)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "device", &obj.Device, UnmarshalVolumeAttachmentDevice)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "status", &obj.Status)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "volume", &obj.Volume, UnmarshalVolumeReference)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumeAttachmentCollection : VolumeAttachmentCollection struct
type VolumeAttachmentCollection struct {
	// Collection of volume attachments.
	VolumeAttachments []VolumeAttachment `json:"volume_attachments" validate:"required"`
}

// UnmarshalVolumeAttachmentCollection unmarshals an instance of VolumeAttachmentCollection from the specified map of raw messages.
func UnmarshalVolumeAttachmentCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumeAttachmentCollection)
	err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachment)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumeAttachmentDevice : VolumeAttachmentDevice struct
type VolumeAttachmentDevice struct {
	// A unique identifier for the device which is exposed to the instance operating system.
	ID *string `json:"id,omitempty"`
}

// UnmarshalVolumeAttachmentDevice unmarshals an instance of VolumeAttachmentDevice from the specified map of raw messages.
func UnmarshalVolumeAttachmentDevice(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumeAttachmentDevice)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumeAttachmentPatch : VolumeAttachmentPatch struct
type VolumeAttachmentPatch struct {
	// If set to true, when deleting the instance the volume will also be deleted.
	DeleteVolumeOnInstanceDelete *bool `json:"delete_volume_on_instance_delete,omitempty"`

	// The user-defined name for this volume attachment.
	Name *string `json:"name,omitempty"`
}

// UnmarshalVolumeAttachmentPatch unmarshals an instance of VolumeAttachmentPatch from the specified map of raw messages.
func UnmarshalVolumeAttachmentPatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumeAttachmentPatch)
	err = core.UnmarshalPrimitive(m, "delete_volume_on_instance_delete", &obj.DeleteVolumeOnInstanceDelete)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the VolumeAttachmentPatch
func (volumeAttachmentPatch *VolumeAttachmentPatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(volumeAttachmentPatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// VolumeAttachmentPrototypeInstanceByImageContext : VolumeAttachmentPrototypeInstanceByImageContext struct
type VolumeAttachmentPrototypeInstanceByImageContext struct {
	// If set to true, when deleting the instance the volume will also be deleted.
	DeleteVolumeOnInstanceDelete *bool `json:"delete_volume_on_instance_delete,omitempty"`

	// The user-defined name for this volume attachment.
	Name *string `json:"name,omitempty"`

	// A prototype object for a new volume.
	Volume *VolumePrototypeInstanceByImageContext `json:"volume" validate:"required"`
}

// NewVolumeAttachmentPrototypeInstanceByImageContext : Instantiate VolumeAttachmentPrototypeInstanceByImageContext (Generic Model Constructor)
func (*VpcV1) NewVolumeAttachmentPrototypeInstanceByImageContext(volume *VolumePrototypeInstanceByImageContext) (model *VolumeAttachmentPrototypeInstanceByImageContext, err error) {
	model = &VolumeAttachmentPrototypeInstanceByImageContext{
		Volume: volume,
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

// UnmarshalVolumeAttachmentPrototypeInstanceByImageContext unmarshals an instance of VolumeAttachmentPrototypeInstanceByImageContext from the specified map of raw messages.
func UnmarshalVolumeAttachmentPrototypeInstanceByImageContext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumeAttachmentPrototypeInstanceByImageContext)
	err = core.UnmarshalPrimitive(m, "delete_volume_on_instance_delete", &obj.DeleteVolumeOnInstanceDelete)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "volume", &obj.Volume, UnmarshalVolumePrototypeInstanceByImageContext)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumeAttachmentPrototypeInstanceContext : VolumeAttachmentPrototypeInstanceContext struct
type VolumeAttachmentPrototypeInstanceContext struct {
	// If set to true, when deleting the instance the volume will also be deleted.
	DeleteVolumeOnInstanceDelete *bool `json:"delete_volume_on_instance_delete,omitempty"`

	// The user-defined name for this volume attachment.
	Name *string `json:"name,omitempty"`

	// The identity of the volume to attach to the instance, or a prototype object for a new
	// volume.
	Volume VolumeAttachmentVolumePrototypeInstanceContextIntf `json:"volume" validate:"required"`
}

// NewVolumeAttachmentPrototypeInstanceContext : Instantiate VolumeAttachmentPrototypeInstanceContext (Generic Model Constructor)
func (*VpcV1) NewVolumeAttachmentPrototypeInstanceContext(volume VolumeAttachmentVolumePrototypeInstanceContextIntf) (model *VolumeAttachmentPrototypeInstanceContext, err error) {
	model = &VolumeAttachmentPrototypeInstanceContext{
		Volume: volume,
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

// UnmarshalVolumeAttachmentPrototypeInstanceContext unmarshals an instance of VolumeAttachmentPrototypeInstanceContext from the specified map of raw messages.
func UnmarshalVolumeAttachmentPrototypeInstanceContext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumeAttachmentPrototypeInstanceContext)
	err = core.UnmarshalPrimitive(m, "delete_volume_on_instance_delete", &obj.DeleteVolumeOnInstanceDelete)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "volume", &obj.Volume, UnmarshalVolumeAttachmentVolumePrototypeInstanceContext)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumeAttachmentReferenceInstanceContext : VolumeAttachmentReferenceInstanceContext struct
type VolumeAttachmentReferenceInstanceContext struct {
	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *VolumeAttachmentReferenceInstanceContextDeleted `json:"deleted,omitempty"`

	// Information about how the volume is exposed to the instance operating system.
	//
	// This property may be absent if the volume attachment's `status` is not `attached`.
	Device *VolumeAttachmentDevice `json:"device,omitempty"`

	// The URL for this volume attachment.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this volume attachment.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this volume attachment.
	Name *string `json:"name" validate:"required"`

	// The attached volume.
	Volume *VolumeReference `json:"volume" validate:"required"`
}

// UnmarshalVolumeAttachmentReferenceInstanceContext unmarshals an instance of VolumeAttachmentReferenceInstanceContext from the specified map of raw messages.
func UnmarshalVolumeAttachmentReferenceInstanceContext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumeAttachmentReferenceInstanceContext)
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVolumeAttachmentReferenceInstanceContextDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "device", &obj.Device, UnmarshalVolumeAttachmentDevice)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "volume", &obj.Volume, UnmarshalVolumeReference)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumeAttachmentReferenceInstanceContextDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type VolumeAttachmentReferenceInstanceContextDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalVolumeAttachmentReferenceInstanceContextDeleted unmarshals an instance of VolumeAttachmentReferenceInstanceContextDeleted from the specified map of raw messages.
func UnmarshalVolumeAttachmentReferenceInstanceContextDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumeAttachmentReferenceInstanceContextDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumeAttachmentReferenceVolumeContext : VolumeAttachmentReferenceVolumeContext struct
type VolumeAttachmentReferenceVolumeContext struct {
	// If set to true, when deleting the instance the volume will also be deleted.
	DeleteVolumeOnInstanceDelete *bool `json:"delete_volume_on_instance_delete" validate:"required"`

	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *VolumeAttachmentReferenceVolumeContextDeleted `json:"deleted,omitempty"`

	// Information about how the volume is exposed to the instance operating system.
	//
	// This property may be absent if the volume attachment's `status` is not `attached`.
	Device *VolumeAttachmentDevice `json:"device,omitempty"`

	// The URL for this volume attachment.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this volume attachment.
	ID *string `json:"id" validate:"required"`

	// The attached instance.
	Instance *InstanceReference `json:"instance" validate:"required"`

	// The user-defined name for this volume attachment.
	Name *string `json:"name" validate:"required"`

	// The type of volume attachment.
	Type *string `json:"type" validate:"required"`
}

// Constants associated with the VolumeAttachmentReferenceVolumeContext.Type property.
// The type of volume attachment.
const (
	VolumeAttachmentReferenceVolumeContextTypeBootConst = "boot"
	VolumeAttachmentReferenceVolumeContextTypeDataConst = "data"
)

// UnmarshalVolumeAttachmentReferenceVolumeContext unmarshals an instance of VolumeAttachmentReferenceVolumeContext from the specified map of raw messages.
func UnmarshalVolumeAttachmentReferenceVolumeContext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumeAttachmentReferenceVolumeContext)
	err = core.UnmarshalPrimitive(m, "delete_volume_on_instance_delete", &obj.DeleteVolumeOnInstanceDelete)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVolumeAttachmentReferenceVolumeContextDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "device", &obj.Device, UnmarshalVolumeAttachmentDevice)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "instance", &obj.Instance, UnmarshalInstanceReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumeAttachmentReferenceVolumeContextDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type VolumeAttachmentReferenceVolumeContextDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalVolumeAttachmentReferenceVolumeContextDeleted unmarshals an instance of VolumeAttachmentReferenceVolumeContextDeleted from the specified map of raw messages.
func UnmarshalVolumeAttachmentReferenceVolumeContextDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumeAttachmentReferenceVolumeContextDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumeAttachmentVolumePrototypeInstanceContext : The identity of the volume to attach to the instance, or a prototype object for a new volume.
// Models which "extend" this model:
// - VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentity
// - VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContext
type VolumeAttachmentVolumePrototypeInstanceContext struct {
	// The unique identifier for this volume.
	ID *string `json:"id,omitempty"`

	// The CRN for this volume.
	CRN *string `json:"crn,omitempty"`

	// The URL for this volume.
	Href *string `json:"href,omitempty"`

	// The bandwidth for the volume.
	Iops *int64 `json:"iops,omitempty"`

	// The unique user-defined name for this volume.
	Name *string `json:"name,omitempty"`

	// The profile to use for this volume.
	Profile VolumeProfileIdentityIntf `json:"profile,omitempty"`

	// The capacity of the volume in gigabytes. The specified minimum and maximum capacity values for creating or updating
	// volumes may expand in the future.
	Capacity *int64 `json:"capacity,omitempty"`

	// The identity of the root key to use to wrap the data encryption key for the volume.
	//
	// If this property is not provided, the `encryption` type for the volume will be
	// `provider_managed`.
	EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"`
}

func (*VolumeAttachmentVolumePrototypeInstanceContext) isaVolumeAttachmentVolumePrototypeInstanceContext() bool {
	return true
}

type VolumeAttachmentVolumePrototypeInstanceContextIntf interface {
	isaVolumeAttachmentVolumePrototypeInstanceContext() bool
}

// UnmarshalVolumeAttachmentVolumePrototypeInstanceContext unmarshals an instance of VolumeAttachmentVolumePrototypeInstanceContext from the specified map of raw messages.
func UnmarshalVolumeAttachmentVolumePrototypeInstanceContext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumeAttachmentVolumePrototypeInstanceContext)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "iops", &obj.Iops)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumeCollection : VolumeCollection struct
type VolumeCollection struct {
	// A link to the first page of resources.
	First *VolumeCollectionFirst `json:"first" validate:"required"`

	// The maximum number of resources that can be returned by the request.
	Limit *int64 `json:"limit" validate:"required"`

	// A link to the next page of resources. This property is present for all pages
	// except the last page.
	Next *VolumeCollectionNext `json:"next,omitempty"`

	// Collection of volumes.
	Volumes []Volume `json:"volumes" validate:"required"`
}

// UnmarshalVolumeCollection unmarshals an instance of VolumeCollection from the specified map of raw messages.
func UnmarshalVolumeCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumeCollection)
	err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalVolumeCollectionFirst)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalVolumeCollectionNext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "volumes", &obj.Volumes, UnmarshalVolume)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumeCollectionFirst : A link to the first page of resources.
type VolumeCollectionFirst struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalVolumeCollectionFirst unmarshals an instance of VolumeCollectionFirst from the specified map of raw messages.
func UnmarshalVolumeCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumeCollectionFirst)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumeCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
type VolumeCollectionNext struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalVolumeCollectionNext unmarshals an instance of VolumeCollectionNext from the specified map of raw messages.
func UnmarshalVolumeCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumeCollectionNext)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumeIdentity : Identifies a volume by a unique property.
// Models which "extend" this model:
// - VolumeIdentityByID
// - VolumeIdentityByCRN
// - VolumeIdentityByHref
type VolumeIdentity struct {
	// The unique identifier for this volume.
	ID *string `json:"id,omitempty"`

	// The CRN for this volume.
	CRN *string `json:"crn,omitempty"`

	// The URL for this volume.
	Href *string `json:"href,omitempty"`
}

func (*VolumeIdentity) isaVolumeIdentity() bool {
	return true
}

type VolumeIdentityIntf interface {
	isaVolumeIdentity() bool
}

// UnmarshalVolumeIdentity unmarshals an instance of VolumeIdentity from the specified map of raw messages.
func UnmarshalVolumeIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumeIdentity)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumePatch : VolumePatch struct
type VolumePatch struct {
	// The unique user-defined name for this volume.
	Name *string `json:"name,omitempty"`
}

// UnmarshalVolumePatch unmarshals an instance of VolumePatch from the specified map of raw messages.
func UnmarshalVolumePatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumePatch)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// AsPatch returns a generic map representation of the VolumePatch
func (volumePatch *VolumePatch) AsPatch() (patch map[string]interface{}, err error) {
	var jsonData []byte
	jsonData, err = json.Marshal(volumePatch)
	if err == nil {
		err = json.Unmarshal(jsonData, &patch)
	}
	return
}

// VolumeProfile : VolumeProfile struct
type VolumeProfile struct {
	// The product family this volume profile belongs to.
	Family *string `json:"family,omitempty"`

	// The URL for this volume profile.
	Href *string `json:"href" validate:"required"`

	// The globally unique name for this volume profile.
	Name *string `json:"name" validate:"required"`
}

// UnmarshalVolumeProfile unmarshals an instance of VolumeProfile from the specified map of raw messages.
func UnmarshalVolumeProfile(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumeProfile)
	err = core.UnmarshalPrimitive(m, "family", &obj.Family)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumeProfileCollection : VolumeProfileCollection struct
type VolumeProfileCollection struct {
	// A link to the first page of resources.
	First *VolumeProfileCollectionFirst `json:"first" validate:"required"`

	// The maximum number of resources that can be returned by the request.
	Limit *int64 `json:"limit" validate:"required"`

	// A link to the next page of resources. This property is present for all pages
	// except the last page.
	Next *VolumeProfileCollectionNext `json:"next,omitempty"`

	// Collection of volume profiles.
	Profiles []VolumeProfile `json:"profiles" validate:"required"`

	// The total number of resources across all pages.
	TotalCount *int64 `json:"total_count" validate:"required"`
}

// UnmarshalVolumeProfileCollection unmarshals an instance of VolumeProfileCollection from the specified map of raw messages.
func UnmarshalVolumeProfileCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumeProfileCollection)
	err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalVolumeProfileCollectionFirst)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "limit", &obj.Limit)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalVolumeProfileCollectionNext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "profiles", &obj.Profiles, UnmarshalVolumeProfile)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumeProfileCollectionFirst : A link to the first page of resources.
type VolumeProfileCollectionFirst struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalVolumeProfileCollectionFirst unmarshals an instance of VolumeProfileCollectionFirst from the specified map of raw messages.
func UnmarshalVolumeProfileCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumeProfileCollectionFirst)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumeProfileCollectionNext : A link to the next page of resources. This property is present for all pages except the last page.
type VolumeProfileCollectionNext struct {
	// The URL for a page of resources.
	Href *string `json:"href" validate:"required"`
}

// UnmarshalVolumeProfileCollectionNext unmarshals an instance of VolumeProfileCollectionNext from the specified map of raw messages.
func UnmarshalVolumeProfileCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumeProfileCollectionNext)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumeProfileIdentity : Identifies a volume profile by a unique property.
// Models which "extend" this model:
// - VolumeProfileIdentityByName
// - VolumeProfileIdentityByHref
type VolumeProfileIdentity struct {
	// The globally unique name for this volume profile.
	Name *string `json:"name,omitempty"`

	// The URL for this volume profile.
	Href *string `json:"href,omitempty"`
}

func (*VolumeProfileIdentity) isaVolumeProfileIdentity() bool {
	return true
}

type VolumeProfileIdentityIntf interface {
	isaVolumeProfileIdentity() bool
}

// UnmarshalVolumeProfileIdentity unmarshals an instance of VolumeProfileIdentity from the specified map of raw messages.
func UnmarshalVolumeProfileIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumeProfileIdentity)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumeProfileReference : VolumeProfileReference struct
type VolumeProfileReference struct {
	// The URL for this volume profile.
	Href *string `json:"href" validate:"required"`

	// The globally unique name for this volume profile.
	Name *string `json:"name" validate:"required"`
}

// UnmarshalVolumeProfileReference unmarshals an instance of VolumeProfileReference from the specified map of raw messages.
func UnmarshalVolumeProfileReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumeProfileReference)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumePrototype : VolumePrototype struct
// Models which "extend" this model:
// - VolumePrototypeVolumeByCapacity
type VolumePrototype struct {
	// The bandwidth for the volume.
	Iops *int64 `json:"iops,omitempty"`

	// The unique user-defined name for this volume.
	Name *string `json:"name,omitempty"`

	// The profile to use for this volume.
	Profile VolumeProfileIdentityIntf `json:"profile" validate:"required"`

	// The resource group to use. If unspecified, the account's [default resource
	// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
	ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`

	// The zone this volume will reside in.
	Zone ZoneIdentityIntf `json:"zone" validate:"required"`

	// The capacity of the volume in gigabytes. The specified minimum and maximum capacity values for creating or updating
	// volumes may expand in the future.
	Capacity *int64 `json:"capacity,omitempty"`

	// The identity of the root key to use to wrap the data encryption key for the volume.
	//
	// If this property is not provided, the `encryption` type for the volume will be
	// `provider_managed`.
	EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"`
}

func (*VolumePrototype) isaVolumePrototype() bool {
	return true
}

type VolumePrototypeIntf interface {
	isaVolumePrototype() bool
}

// UnmarshalVolumePrototype unmarshals an instance of VolumePrototype from the specified map of raw messages.
func UnmarshalVolumePrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumePrototype)
	err = core.UnmarshalPrimitive(m, "iops", &obj.Iops)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumePrototypeInstanceByImageContext : VolumePrototypeInstanceByImageContext struct
type VolumePrototypeInstanceByImageContext struct {
	// The capacity of the volume in gigabytes. The specified minimum and maximum capacity values for creating or updating
	// volumes may expand in the future.
	Capacity *int64 `json:"capacity,omitempty"`

	// The identity of the root key to use to wrap the data encryption key for the volume.
	//
	// If this property is not provided but the image is encrypted, the image's
	// `encryption_key` will be used. Otherwise, the `encryption` type for the
	// volume will be `provider_managed`.
	EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"`

	// The bandwidth for the volume.
	Iops *int64 `json:"iops,omitempty"`

	// The unique user-defined name for this volume.
	Name *string `json:"name,omitempty"`

	// The profile to use for this volume.
	Profile VolumeProfileIdentityIntf `json:"profile" validate:"required"`
}

// NewVolumePrototypeInstanceByImageContext : Instantiate VolumePrototypeInstanceByImageContext (Generic Model Constructor)
func (*VpcV1) NewVolumePrototypeInstanceByImageContext(profile VolumeProfileIdentityIntf) (model *VolumePrototypeInstanceByImageContext, err error) {
	model = &VolumePrototypeInstanceByImageContext{
		Profile: profile,
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

// UnmarshalVolumePrototypeInstanceByImageContext unmarshals an instance of VolumePrototypeInstanceByImageContext from the specified map of raw messages.
func UnmarshalVolumePrototypeInstanceByImageContext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumePrototypeInstanceByImageContext)
	err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "iops", &obj.Iops)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumeReference : VolumeReference struct
type VolumeReference struct {
	// The CRN for this volume.
	CRN *string `json:"crn" validate:"required"`

	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *VolumeReferenceDeleted `json:"deleted,omitempty"`

	// The URL for this volume.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this volume.
	ID *string `json:"id" validate:"required"`

	// The unique user-defined name for this volume.
	Name *string `json:"name" validate:"required"`
}

// UnmarshalVolumeReference unmarshals an instance of VolumeReference from the specified map of raw messages.
func UnmarshalVolumeReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumeReference)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVolumeReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumeReferenceDeleted : If present, this property indicates the referenced resource has been deleted and provides some supplementary
// information.
type VolumeReferenceDeleted struct {
	// Link to documentation about deleted resources.
	MoreInfo *string `json:"more_info" validate:"required"`
}

// UnmarshalVolumeReferenceDeleted unmarshals an instance of VolumeReferenceDeleted from the specified map of raw messages.
func UnmarshalVolumeReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumeReferenceDeleted)
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumeStatusReason : VolumeStatusReason struct
type VolumeStatusReason struct {
	// A snake case string succinctly identifying the status reason.
	Code *string `json:"code" validate:"required"`

	// An explanation of the status reason.
	Message *string `json:"message" validate:"required"`

	// Link to documentation about this status reason.
	MoreInfo *string `json:"more_info,omitempty"`
}

// Constants associated with the VolumeStatusReason.Code property.
// A snake case string succinctly identifying the status reason.
const (
	VolumeStatusReasonCodeEncryptionKeyDeletedConst = "encryption_key_deleted"
)

// UnmarshalVolumeStatusReason unmarshals an instance of VolumeStatusReason from the specified map of raw messages.
func UnmarshalVolumeStatusReason(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumeStatusReason)
	err = core.UnmarshalPrimitive(m, "code", &obj.Code)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "message", &obj.Message)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// Zone : Zone struct
type Zone struct {
	// The URL for this zone.
	Href *string `json:"href" validate:"required"`

	// The globally unique name for this zone.
	Name *string `json:"name" validate:"required"`

	// The region this zone resides in.
	Region *RegionReference `json:"region" validate:"required"`

	// The availability status of this zone.
	Status *string `json:"status" validate:"required"`
}

// Constants associated with the Zone.Status property.
// The availability status of this zone.
const (
	ZoneStatusAvailableConst   = "available"
	ZoneStatusImpairedConst    = "impaired"
	ZoneStatusUnavailableConst = "unavailable"
)

// UnmarshalZone unmarshals an instance of Zone from the specified map of raw messages.
func UnmarshalZone(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(Zone)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "region", &obj.Region, UnmarshalRegionReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "status", &obj.Status)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ZoneCollection : ZoneCollection struct
type ZoneCollection struct {
	// Collection of zones.
	Zones []Zone `json:"zones" validate:"required"`
}

// UnmarshalZoneCollection unmarshals an instance of ZoneCollection from the specified map of raw messages.
func UnmarshalZoneCollection(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ZoneCollection)
	err = core.UnmarshalModel(m, "zones", &obj.Zones, UnmarshalZone)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ZoneIdentity : Identifies a zone by a unique property.
// Models which "extend" this model:
// - ZoneIdentityByName
// - ZoneIdentityByHref
type ZoneIdentity struct {
	// The globally unique name for this zone.
	Name *string `json:"name,omitempty"`

	// The URL for this zone.
	Href *string `json:"href,omitempty"`
}

func (*ZoneIdentity) isaZoneIdentity() bool {
	return true
}

type ZoneIdentityIntf interface {
	isaZoneIdentity() bool
}

// UnmarshalZoneIdentity unmarshals an instance of ZoneIdentity from the specified map of raw messages.
func UnmarshalZoneIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ZoneIdentity)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ZoneReference : ZoneReference struct
type ZoneReference struct {
	// The URL for this zone.
	Href *string `json:"href" validate:"required"`

	// The globally unique name for this zone.
	Name *string `json:"name" validate:"required"`
}

// UnmarshalZoneReference unmarshals an instance of ZoneReference from the specified map of raw messages.
func UnmarshalZoneReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ZoneReference)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// CertificateInstanceIdentityByCRN : CertificateInstanceIdentityByCRN struct
// This model "extends" CertificateInstanceIdentity
type CertificateInstanceIdentityByCRN struct {
	// The CRN for this certificate instance.
	CRN *string `json:"crn" validate:"required"`
}

// NewCertificateInstanceIdentityByCRN : Instantiate CertificateInstanceIdentityByCRN (Generic Model Constructor)
func (*VpcV1) NewCertificateInstanceIdentityByCRN(crn string) (model *CertificateInstanceIdentityByCRN, err error) {
	model = &CertificateInstanceIdentityByCRN{
		CRN: core.StringPtr(crn),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*CertificateInstanceIdentityByCRN) isaCertificateInstanceIdentity() bool {
	return true
}

// UnmarshalCertificateInstanceIdentityByCRN unmarshals an instance of CertificateInstanceIdentityByCRN from the specified map of raw messages.
func UnmarshalCertificateInstanceIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(CertificateInstanceIdentityByCRN)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// CloudObjectStorageBucketIdentityByName : CloudObjectStorageBucketIdentityByName struct
// This model "extends" CloudObjectStorageBucketIdentity
type CloudObjectStorageBucketIdentityByName struct {
	// The globally unique name of this COS bucket.
	Name *string `json:"name" validate:"required"`
}

// NewCloudObjectStorageBucketIdentityByName : Instantiate CloudObjectStorageBucketIdentityByName (Generic Model Constructor)
func (*VpcV1) NewCloudObjectStorageBucketIdentityByName(name string) (model *CloudObjectStorageBucketIdentityByName, err error) {
	model = &CloudObjectStorageBucketIdentityByName{
		Name: core.StringPtr(name),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*CloudObjectStorageBucketIdentityByName) isaCloudObjectStorageBucketIdentity() bool {
	return true
}

// UnmarshalCloudObjectStorageBucketIdentityByName unmarshals an instance of CloudObjectStorageBucketIdentityByName from the specified map of raw messages.
func UnmarshalCloudObjectStorageBucketIdentityByName(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(CloudObjectStorageBucketIdentityByName)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostGroupIdentityByCRN : DedicatedHostGroupIdentityByCRN struct
// This model "extends" DedicatedHostGroupIdentity
type DedicatedHostGroupIdentityByCRN struct {
	// The CRN for this dedicated host group.
	CRN *string `json:"crn" validate:"required"`
}

// NewDedicatedHostGroupIdentityByCRN : Instantiate DedicatedHostGroupIdentityByCRN (Generic Model Constructor)
func (*VpcV1) NewDedicatedHostGroupIdentityByCRN(crn string) (model *DedicatedHostGroupIdentityByCRN, err error) {
	model = &DedicatedHostGroupIdentityByCRN{
		CRN: core.StringPtr(crn),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*DedicatedHostGroupIdentityByCRN) isaDedicatedHostGroupIdentity() bool {
	return true
}

// UnmarshalDedicatedHostGroupIdentityByCRN unmarshals an instance of DedicatedHostGroupIdentityByCRN from the specified map of raw messages.
func UnmarshalDedicatedHostGroupIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostGroupIdentityByCRN)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostGroupIdentityByHref : DedicatedHostGroupIdentityByHref struct
// This model "extends" DedicatedHostGroupIdentity
type DedicatedHostGroupIdentityByHref struct {
	// The URL for this dedicated host group.
	Href *string `json:"href" validate:"required"`
}

// NewDedicatedHostGroupIdentityByHref : Instantiate DedicatedHostGroupIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewDedicatedHostGroupIdentityByHref(href string) (model *DedicatedHostGroupIdentityByHref, err error) {
	model = &DedicatedHostGroupIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*DedicatedHostGroupIdentityByHref) isaDedicatedHostGroupIdentity() bool {
	return true
}

// UnmarshalDedicatedHostGroupIdentityByHref unmarshals an instance of DedicatedHostGroupIdentityByHref from the specified map of raw messages.
func UnmarshalDedicatedHostGroupIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostGroupIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostGroupIdentityByID : DedicatedHostGroupIdentityByID struct
// This model "extends" DedicatedHostGroupIdentity
type DedicatedHostGroupIdentityByID struct {
	// The unique identifier for this dedicated host group.
	ID *string `json:"id" validate:"required"`
}

// NewDedicatedHostGroupIdentityByID : Instantiate DedicatedHostGroupIdentityByID (Generic Model Constructor)
func (*VpcV1) NewDedicatedHostGroupIdentityByID(id string) (model *DedicatedHostGroupIdentityByID, err error) {
	model = &DedicatedHostGroupIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*DedicatedHostGroupIdentityByID) isaDedicatedHostGroupIdentity() bool {
	return true
}

// UnmarshalDedicatedHostGroupIdentityByID unmarshals an instance of DedicatedHostGroupIdentityByID from the specified map of raw messages.
func UnmarshalDedicatedHostGroupIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostGroupIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostProfileIdentityByHref : DedicatedHostProfileIdentityByHref struct
// This model "extends" DedicatedHostProfileIdentity
type DedicatedHostProfileIdentityByHref struct {
	// The URL for this dedicated host profile.
	Href *string `json:"href" validate:"required"`
}

// NewDedicatedHostProfileIdentityByHref : Instantiate DedicatedHostProfileIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewDedicatedHostProfileIdentityByHref(href string) (model *DedicatedHostProfileIdentityByHref, err error) {
	model = &DedicatedHostProfileIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*DedicatedHostProfileIdentityByHref) isaDedicatedHostProfileIdentity() bool {
	return true
}

// UnmarshalDedicatedHostProfileIdentityByHref unmarshals an instance of DedicatedHostProfileIdentityByHref from the specified map of raw messages.
func UnmarshalDedicatedHostProfileIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostProfileIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostProfileIdentityByName : DedicatedHostProfileIdentityByName struct
// This model "extends" DedicatedHostProfileIdentity
type DedicatedHostProfileIdentityByName struct {
	// The globally unique name for this dedicated host profile.
	Name *string `json:"name" validate:"required"`
}

// NewDedicatedHostProfileIdentityByName : Instantiate DedicatedHostProfileIdentityByName (Generic Model Constructor)
func (*VpcV1) NewDedicatedHostProfileIdentityByName(name string) (model *DedicatedHostProfileIdentityByName, err error) {
	model = &DedicatedHostProfileIdentityByName{
		Name: core.StringPtr(name),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*DedicatedHostProfileIdentityByName) isaDedicatedHostProfileIdentity() bool {
	return true
}

// UnmarshalDedicatedHostProfileIdentityByName unmarshals an instance of DedicatedHostProfileIdentityByName from the specified map of raw messages.
func UnmarshalDedicatedHostProfileIdentityByName(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostProfileIdentityByName)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostProfileMemoryDependent : The memory value for a dedicated host with this profile depends on its configuration.
// This model "extends" DedicatedHostProfileMemory
type DedicatedHostProfileMemoryDependent struct {
	// The type for this profile field.
	Type *string `json:"type" validate:"required"`
}

// Constants associated with the DedicatedHostProfileMemoryDependent.Type property.
// The type for this profile field.
const (
	DedicatedHostProfileMemoryDependentTypeDependentConst = "dependent"
)

func (*DedicatedHostProfileMemoryDependent) isaDedicatedHostProfileMemory() bool {
	return true
}

// UnmarshalDedicatedHostProfileMemoryDependent unmarshals an instance of DedicatedHostProfileMemoryDependent from the specified map of raw messages.
func UnmarshalDedicatedHostProfileMemoryDependent(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostProfileMemoryDependent)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostProfileMemoryEnum : The permitted memory values (in gibibytes) for a dedicated host with this profile.
// This model "extends" DedicatedHostProfileMemory
type DedicatedHostProfileMemoryEnum struct {
	// The default value for this profile field.
	Default *int64 `json:"default" validate:"required"`

	// The type for this profile field.
	Type *string `json:"type" validate:"required"`

	// The permitted values for this profile field.
	Values []int64 `json:"values" validate:"required"`
}

// Constants associated with the DedicatedHostProfileMemoryEnum.Type property.
// The type for this profile field.
const (
	DedicatedHostProfileMemoryEnumTypeEnumConst = "enum"
)

func (*DedicatedHostProfileMemoryEnum) isaDedicatedHostProfileMemory() bool {
	return true
}

// UnmarshalDedicatedHostProfileMemoryEnum unmarshals an instance of DedicatedHostProfileMemoryEnum from the specified map of raw messages.
func UnmarshalDedicatedHostProfileMemoryEnum(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostProfileMemoryEnum)
	err = core.UnmarshalPrimitive(m, "default", &obj.Default)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "values", &obj.Values)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostProfileMemoryFixed : The memory (in gibibytes) for a dedicated host with this profile.
// This model "extends" DedicatedHostProfileMemory
type DedicatedHostProfileMemoryFixed struct {
	// The type for this profile field.
	Type *string `json:"type" validate:"required"`

	// The value for this profile field.
	Value *int64 `json:"value" validate:"required"`
}

// Constants associated with the DedicatedHostProfileMemoryFixed.Type property.
// The type for this profile field.
const (
	DedicatedHostProfileMemoryFixedTypeFixedConst = "fixed"
)

func (*DedicatedHostProfileMemoryFixed) isaDedicatedHostProfileMemory() bool {
	return true
}

// UnmarshalDedicatedHostProfileMemoryFixed unmarshals an instance of DedicatedHostProfileMemoryFixed from the specified map of raw messages.
func UnmarshalDedicatedHostProfileMemoryFixed(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostProfileMemoryFixed)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "value", &obj.Value)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostProfileMemoryRange : The permitted memory range (in gibibytes) for a dedicated host with this profile.
// This model "extends" DedicatedHostProfileMemory
type DedicatedHostProfileMemoryRange struct {
	// The default value for this profile field.
	Default *int64 `json:"default" validate:"required"`

	// The maximum value for this profile field.
	Max *int64 `json:"max" validate:"required"`

	// The minimum value for this profile field.
	Min *int64 `json:"min" validate:"required"`

	// The increment step value for this profile field.
	Step *int64 `json:"step" validate:"required"`

	// The type for this profile field.
	Type *string `json:"type" validate:"required"`
}

// Constants associated with the DedicatedHostProfileMemoryRange.Type property.
// The type for this profile field.
const (
	DedicatedHostProfileMemoryRangeTypeRangeConst = "range"
)

func (*DedicatedHostProfileMemoryRange) isaDedicatedHostProfileMemory() bool {
	return true
}

// UnmarshalDedicatedHostProfileMemoryRange unmarshals an instance of DedicatedHostProfileMemoryRange from the specified map of raw messages.
func UnmarshalDedicatedHostProfileMemoryRange(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostProfileMemoryRange)
	err = core.UnmarshalPrimitive(m, "default", &obj.Default)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "max", &obj.Max)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "min", &obj.Min)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "step", &obj.Step)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostProfileSocketDependent : The CPU socket count for a dedicated host with this profile depends on its configuration.
// This model "extends" DedicatedHostProfileSocket
type DedicatedHostProfileSocketDependent struct {
	// The type for this profile field.
	Type *string `json:"type" validate:"required"`
}

// Constants associated with the DedicatedHostProfileSocketDependent.Type property.
// The type for this profile field.
const (
	DedicatedHostProfileSocketDependentTypeDependentConst = "dependent"
)

func (*DedicatedHostProfileSocketDependent) isaDedicatedHostProfileSocket() bool {
	return true
}

// UnmarshalDedicatedHostProfileSocketDependent unmarshals an instance of DedicatedHostProfileSocketDependent from the specified map of raw messages.
func UnmarshalDedicatedHostProfileSocketDependent(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostProfileSocketDependent)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostProfileSocketEnum : The permitted values for CPU socket count for a dedicated host with this profile.
// This model "extends" DedicatedHostProfileSocket
type DedicatedHostProfileSocketEnum struct {
	// The default value for this profile field.
	Default *int64 `json:"default" validate:"required"`

	// The type for this profile field.
	Type *string `json:"type" validate:"required"`

	// The permitted values for this profile field.
	Values []int64 `json:"values" validate:"required"`
}

// Constants associated with the DedicatedHostProfileSocketEnum.Type property.
// The type for this profile field.
const (
	DedicatedHostProfileSocketEnumTypeEnumConst = "enum"
)

func (*DedicatedHostProfileSocketEnum) isaDedicatedHostProfileSocket() bool {
	return true
}

// UnmarshalDedicatedHostProfileSocketEnum unmarshals an instance of DedicatedHostProfileSocketEnum from the specified map of raw messages.
func UnmarshalDedicatedHostProfileSocketEnum(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostProfileSocketEnum)
	err = core.UnmarshalPrimitive(m, "default", &obj.Default)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "values", &obj.Values)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostProfileSocketFixed : The CPU socket count for a dedicated host with this profile.
// This model "extends" DedicatedHostProfileSocket
type DedicatedHostProfileSocketFixed struct {
	// The type for this profile field.
	Type *string `json:"type" validate:"required"`

	// The value for this profile field.
	Value *int64 `json:"value" validate:"required"`
}

// Constants associated with the DedicatedHostProfileSocketFixed.Type property.
// The type for this profile field.
const (
	DedicatedHostProfileSocketFixedTypeFixedConst = "fixed"
)

func (*DedicatedHostProfileSocketFixed) isaDedicatedHostProfileSocket() bool {
	return true
}

// UnmarshalDedicatedHostProfileSocketFixed unmarshals an instance of DedicatedHostProfileSocketFixed from the specified map of raw messages.
func UnmarshalDedicatedHostProfileSocketFixed(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostProfileSocketFixed)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "value", &obj.Value)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostProfileSocketRange : The permitted range for CPU socket count for a dedicated host with this profile.
// This model "extends" DedicatedHostProfileSocket
type DedicatedHostProfileSocketRange struct {
	// The default value for this profile field.
	Default *int64 `json:"default" validate:"required"`

	// The maximum value for this profile field.
	Max *int64 `json:"max" validate:"required"`

	// The minimum value for this profile field.
	Min *int64 `json:"min" validate:"required"`

	// The increment step value for this profile field.
	Step *int64 `json:"step" validate:"required"`

	// The type for this profile field.
	Type *string `json:"type" validate:"required"`
}

// Constants associated with the DedicatedHostProfileSocketRange.Type property.
// The type for this profile field.
const (
	DedicatedHostProfileSocketRangeTypeRangeConst = "range"
)

func (*DedicatedHostProfileSocketRange) isaDedicatedHostProfileSocket() bool {
	return true
}

// UnmarshalDedicatedHostProfileSocketRange unmarshals an instance of DedicatedHostProfileSocketRange from the specified map of raw messages.
func UnmarshalDedicatedHostProfileSocketRange(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostProfileSocketRange)
	err = core.UnmarshalPrimitive(m, "default", &obj.Default)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "max", &obj.Max)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "min", &obj.Min)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "step", &obj.Step)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostProfileVcpuDependent : The VCPU count for a dedicated host with this profile depends on its configuration.
// This model "extends" DedicatedHostProfileVcpu
type DedicatedHostProfileVcpuDependent struct {
	// The type for this profile field.
	Type *string `json:"type" validate:"required"`
}

// Constants associated with the DedicatedHostProfileVcpuDependent.Type property.
// The type for this profile field.
const (
	DedicatedHostProfileVcpuDependentTypeDependentConst = "dependent"
)

func (*DedicatedHostProfileVcpuDependent) isaDedicatedHostProfileVcpu() bool {
	return true
}

// UnmarshalDedicatedHostProfileVcpuDependent unmarshals an instance of DedicatedHostProfileVcpuDependent from the specified map of raw messages.
func UnmarshalDedicatedHostProfileVcpuDependent(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostProfileVcpuDependent)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostProfileVcpuEnum : The permitted values for VCPU count for a dedicated host with this profile.
// This model "extends" DedicatedHostProfileVcpu
type DedicatedHostProfileVcpuEnum struct {
	// The default value for this profile field.
	Default *int64 `json:"default" validate:"required"`

	// The type for this profile field.
	Type *string `json:"type" validate:"required"`

	// The permitted values for this profile field.
	Values []int64 `json:"values" validate:"required"`
}

// Constants associated with the DedicatedHostProfileVcpuEnum.Type property.
// The type for this profile field.
const (
	DedicatedHostProfileVcpuEnumTypeEnumConst = "enum"
)

func (*DedicatedHostProfileVcpuEnum) isaDedicatedHostProfileVcpu() bool {
	return true
}

// UnmarshalDedicatedHostProfileVcpuEnum unmarshals an instance of DedicatedHostProfileVcpuEnum from the specified map of raw messages.
func UnmarshalDedicatedHostProfileVcpuEnum(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostProfileVcpuEnum)
	err = core.UnmarshalPrimitive(m, "default", &obj.Default)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "values", &obj.Values)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostProfileVcpuFixed : The VCPU count for a dedicated host with this profile.
// This model "extends" DedicatedHostProfileVcpu
type DedicatedHostProfileVcpuFixed struct {
	// The type for this profile field.
	Type *string `json:"type" validate:"required"`

	// The value for this profile field.
	Value *int64 `json:"value" validate:"required"`
}

// Constants associated with the DedicatedHostProfileVcpuFixed.Type property.
// The type for this profile field.
const (
	DedicatedHostProfileVcpuFixedTypeFixedConst = "fixed"
)

func (*DedicatedHostProfileVcpuFixed) isaDedicatedHostProfileVcpu() bool {
	return true
}

// UnmarshalDedicatedHostProfileVcpuFixed unmarshals an instance of DedicatedHostProfileVcpuFixed from the specified map of raw messages.
func UnmarshalDedicatedHostProfileVcpuFixed(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostProfileVcpuFixed)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "value", &obj.Value)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostProfileVcpuRange : The permitted range for VCPU count for a dedicated host with this profile.
// This model "extends" DedicatedHostProfileVcpu
type DedicatedHostProfileVcpuRange struct {
	// The default value for this profile field.
	Default *int64 `json:"default" validate:"required"`

	// The maximum value for this profile field.
	Max *int64 `json:"max" validate:"required"`

	// The minimum value for this profile field.
	Min *int64 `json:"min" validate:"required"`

	// The increment step value for this profile field.
	Step *int64 `json:"step" validate:"required"`

	// The type for this profile field.
	Type *string `json:"type" validate:"required"`
}

// Constants associated with the DedicatedHostProfileVcpuRange.Type property.
// The type for this profile field.
const (
	DedicatedHostProfileVcpuRangeTypeRangeConst = "range"
)

func (*DedicatedHostProfileVcpuRange) isaDedicatedHostProfileVcpu() bool {
	return true
}

// UnmarshalDedicatedHostProfileVcpuRange unmarshals an instance of DedicatedHostProfileVcpuRange from the specified map of raw messages.
func UnmarshalDedicatedHostProfileVcpuRange(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostProfileVcpuRange)
	err = core.UnmarshalPrimitive(m, "default", &obj.Default)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "max", &obj.Max)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "min", &obj.Min)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "step", &obj.Step)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostPrototypeDedicatedHostByGroup : DedicatedHostPrototypeDedicatedHostByGroup struct
// This model "extends" DedicatedHostPrototype
type DedicatedHostPrototypeDedicatedHostByGroup struct {
	// If set to true, instances can be placed on this dedicated host.
	InstancePlacementEnabled *bool `json:"instance_placement_enabled,omitempty"`

	// The unique user-defined name for this dedicated host. If unspecified, the name will be a hyphenated list of
	// randomly-selected words.
	Name *string `json:"name,omitempty"`

	// The profile to use for this dedicated host.
	Profile DedicatedHostProfileIdentityIntf `json:"profile" validate:"required"`

	ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`

	// The dedicated host group for this dedicated host.
	Group DedicatedHostGroupIdentityIntf `json:"group" validate:"required"`
}

// NewDedicatedHostPrototypeDedicatedHostByGroup : Instantiate DedicatedHostPrototypeDedicatedHostByGroup (Generic Model Constructor)
func (*VpcV1) NewDedicatedHostPrototypeDedicatedHostByGroup(profile DedicatedHostProfileIdentityIntf, group DedicatedHostGroupIdentityIntf) (model *DedicatedHostPrototypeDedicatedHostByGroup, err error) {
	model = &DedicatedHostPrototypeDedicatedHostByGroup{
		Profile: profile,
		Group:   group,
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*DedicatedHostPrototypeDedicatedHostByGroup) isaDedicatedHostPrototype() bool {
	return true
}

// UnmarshalDedicatedHostPrototypeDedicatedHostByGroup unmarshals an instance of DedicatedHostPrototypeDedicatedHostByGroup from the specified map of raw messages.
func UnmarshalDedicatedHostPrototypeDedicatedHostByGroup(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostPrototypeDedicatedHostByGroup)
	err = core.UnmarshalPrimitive(m, "instance_placement_enabled", &obj.InstancePlacementEnabled)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalDedicatedHostProfileIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalDedicatedHostGroupIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// DedicatedHostPrototypeDedicatedHostByZone : DedicatedHostPrototypeDedicatedHostByZone struct
// This model "extends" DedicatedHostPrototype
type DedicatedHostPrototypeDedicatedHostByZone struct {
	// If set to true, instances can be placed on this dedicated host.
	InstancePlacementEnabled *bool `json:"instance_placement_enabled,omitempty"`

	// The unique user-defined name for this dedicated host. If unspecified, the name will be a hyphenated list of
	// randomly-selected words.
	Name *string `json:"name,omitempty"`

	// The profile to use for this dedicated host.
	Profile DedicatedHostProfileIdentityIntf `json:"profile" validate:"required"`

	ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`

	Group *DedicatedHostGroupPrototypeDedicatedHostByZoneContext `json:"group,omitempty"`

	// The zone this dedicated host will reside in.
	Zone ZoneIdentityIntf `json:"zone" validate:"required"`
}

// NewDedicatedHostPrototypeDedicatedHostByZone : Instantiate DedicatedHostPrototypeDedicatedHostByZone (Generic Model Constructor)
func (*VpcV1) NewDedicatedHostPrototypeDedicatedHostByZone(profile DedicatedHostProfileIdentityIntf, zone ZoneIdentityIntf) (model *DedicatedHostPrototypeDedicatedHostByZone, err error) {
	model = &DedicatedHostPrototypeDedicatedHostByZone{
		Profile: profile,
		Zone:    zone,
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*DedicatedHostPrototypeDedicatedHostByZone) isaDedicatedHostPrototype() bool {
	return true
}

// UnmarshalDedicatedHostPrototypeDedicatedHostByZone unmarshals an instance of DedicatedHostPrototypeDedicatedHostByZone from the specified map of raw messages.
func UnmarshalDedicatedHostPrototypeDedicatedHostByZone(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(DedicatedHostPrototypeDedicatedHostByZone)
	err = core.UnmarshalPrimitive(m, "instance_placement_enabled", &obj.InstancePlacementEnabled)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalDedicatedHostProfileIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalDedicatedHostGroupPrototypeDedicatedHostByZoneContext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// EncryptionKeyIdentityByCRN : EncryptionKeyIdentityByCRN struct
// This model "extends" EncryptionKeyIdentity
type EncryptionKeyIdentityByCRN struct {
	// The CRN of the [Key Protect Root
	// Key](https://cloud.ibm.com/docs/key-protect?topic=key-protect-getting-started-tutorial) or [Hyper Protect Crypto
	// Service Root Key](https://cloud.ibm.com/docs/hs-crypto?topic=hs-crypto-get-started) for this resource.
	CRN *string `json:"crn" validate:"required"`
}

// NewEncryptionKeyIdentityByCRN : Instantiate EncryptionKeyIdentityByCRN (Generic Model Constructor)
func (*VpcV1) NewEncryptionKeyIdentityByCRN(crn string) (model *EncryptionKeyIdentityByCRN, err error) {
	model = &EncryptionKeyIdentityByCRN{
		CRN: core.StringPtr(crn),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*EncryptionKeyIdentityByCRN) isaEncryptionKeyIdentity() bool {
	return true
}

// UnmarshalEncryptionKeyIdentityByCRN unmarshals an instance of EncryptionKeyIdentityByCRN from the specified map of raw messages.
func UnmarshalEncryptionKeyIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(EncryptionKeyIdentityByCRN)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// EndpointGatewayReservedIPReservedIPIdentity : Identifies a reserved IP by a unique property.
// Models which "extend" this model:
// - EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByID
// - EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByHref
// This model "extends" EndpointGatewayReservedIP
type EndpointGatewayReservedIPReservedIPIdentity struct {
	// The unique identifier for this reserved IP.
	ID *string `json:"id,omitempty"`

	// The URL for this reserved IP.
	Href *string `json:"href,omitempty"`
}

func (*EndpointGatewayReservedIPReservedIPIdentity) isaEndpointGatewayReservedIPReservedIPIdentity() bool {
	return true
}

type EndpointGatewayReservedIPReservedIPIdentityIntf interface {
	EndpointGatewayReservedIPIntf
	isaEndpointGatewayReservedIPReservedIPIdentity() bool
}

func (*EndpointGatewayReservedIPReservedIPIdentity) isaEndpointGatewayReservedIP() bool {
	return true
}

// UnmarshalEndpointGatewayReservedIPReservedIPIdentity unmarshals an instance of EndpointGatewayReservedIPReservedIPIdentity from the specified map of raw messages.
func UnmarshalEndpointGatewayReservedIPReservedIPIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(EndpointGatewayReservedIPReservedIPIdentity)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// EndpointGatewayReservedIPReservedIPPrototypeTargetContext : EndpointGatewayReservedIPReservedIPPrototypeTargetContext struct
// This model "extends" EndpointGatewayReservedIP
type EndpointGatewayReservedIPReservedIPPrototypeTargetContext struct {
	// If set to `true`, this reserved IP will be automatically deleted when the target is deleted or when the reserved IP
	// is unbound.
	AutoDelete *bool `json:"auto_delete,omitempty"`

	// The user-defined name for this reserved IP. If not specified, the name will be a hyphenated list of
	// randomly-selected words. Names must be unique within the subnet the reserved IP resides in. Names beginning with
	// `ibm-` are reserved for provider-owned resources.
	Name *string `json:"name,omitempty"`

	// The subnet in which to create this reserved IP.
	Subnet SubnetIdentityIntf `json:"subnet" validate:"required"`
}

// NewEndpointGatewayReservedIPReservedIPPrototypeTargetContext : Instantiate EndpointGatewayReservedIPReservedIPPrototypeTargetContext (Generic Model Constructor)
func (*VpcV1) NewEndpointGatewayReservedIPReservedIPPrototypeTargetContext(subnet SubnetIdentityIntf) (model *EndpointGatewayReservedIPReservedIPPrototypeTargetContext, err error) {
	model = &EndpointGatewayReservedIPReservedIPPrototypeTargetContext{
		Subnet: subnet,
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*EndpointGatewayReservedIPReservedIPPrototypeTargetContext) isaEndpointGatewayReservedIP() bool {
	return true
}

// UnmarshalEndpointGatewayReservedIPReservedIPPrototypeTargetContext unmarshals an instance of EndpointGatewayReservedIPReservedIPPrototypeTargetContext from the specified map of raw messages.
func UnmarshalEndpointGatewayReservedIPReservedIPPrototypeTargetContext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(EndpointGatewayReservedIPReservedIPPrototypeTargetContext)
	err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// EndpointGatewayTargetPrototypeProviderCloudServiceIdentity : EndpointGatewayTargetPrototypeProviderCloudServiceIdentity struct
// Models which "extend" this model:
// - EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN
// This model "extends" EndpointGatewayTargetPrototype
type EndpointGatewayTargetPrototypeProviderCloudServiceIdentity struct {
	// The type of target for this endpoint gateway.
	ResourceType *string `json:"resource_type" validate:"required"`

	// The CRN for this provider cloud service, or the CRN for the user's instance of a provider cloud service.
	CRN *string `json:"crn,omitempty"`
}

// Constants associated with the EndpointGatewayTargetPrototypeProviderCloudServiceIdentity.ResourceType property.
// The type of target for this endpoint gateway.
const (
	EndpointGatewayTargetPrototypeProviderCloudServiceIdentityResourceTypeProviderCloudServiceConst          = "provider_cloud_service"
	EndpointGatewayTargetPrototypeProviderCloudServiceIdentityResourceTypeProviderInfrastructureServiceConst = "provider_infrastructure_service"
)

func (*EndpointGatewayTargetPrototypeProviderCloudServiceIdentity) isaEndpointGatewayTargetPrototypeProviderCloudServiceIdentity() bool {
	return true
}

type EndpointGatewayTargetPrototypeProviderCloudServiceIdentityIntf interface {
	EndpointGatewayTargetPrototypeIntf
	isaEndpointGatewayTargetPrototypeProviderCloudServiceIdentity() bool
}

func (*EndpointGatewayTargetPrototypeProviderCloudServiceIdentity) isaEndpointGatewayTargetPrototype() bool {
	return true
}

// UnmarshalEndpointGatewayTargetPrototypeProviderCloudServiceIdentity unmarshals an instance of EndpointGatewayTargetPrototypeProviderCloudServiceIdentity from the specified map of raw messages.
func UnmarshalEndpointGatewayTargetPrototypeProviderCloudServiceIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(EndpointGatewayTargetPrototypeProviderCloudServiceIdentity)
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity : EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity struct
// Models which "extend" this model:
// - EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName
// This model "extends" EndpointGatewayTargetPrototype
type EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity struct {
	// The type of target for this endpoint gateway.
	ResourceType *string `json:"resource_type" validate:"required"`

	// The name of a provider infrastructure service. Must be:
	// - `ibm-ntp-server`: An NTP (Network Time Protocol) server provided by IBM.
	Name *string `json:"name,omitempty"`
}

// Constants associated with the EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity.ResourceType property.
// The type of target for this endpoint gateway.
const (
	EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityResourceTypeProviderCloudServiceConst          = "provider_cloud_service"
	EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityResourceTypeProviderInfrastructureServiceConst = "provider_infrastructure_service"
)

func (*EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity) isaEndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity() bool {
	return true
}

type EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityIntf interface {
	EndpointGatewayTargetPrototypeIntf
	isaEndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity() bool
}

func (*EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity) isaEndpointGatewayTargetPrototype() bool {
	return true
}

// UnmarshalEndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity unmarshals an instance of EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity from the specified map of raw messages.
func UnmarshalEndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity)
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// EndpointGatewayTargetProviderCloudServiceReference : EndpointGatewayTargetProviderCloudServiceReference struct
// This model "extends" EndpointGatewayTarget
type EndpointGatewayTargetProviderCloudServiceReference struct {
	// The CRN for this provider cloud service, or the CRN for the user's instance of a provider cloud service.
	CRN *string `json:"crn" validate:"required"`

	// The type of target.
	ResourceType *string `json:"resource_type" validate:"required"`
}

// Constants associated with the EndpointGatewayTargetProviderCloudServiceReference.ResourceType property.
// The type of target.
const (
	EndpointGatewayTargetProviderCloudServiceReferenceResourceTypeProviderCloudServiceConst = "provider_cloud_service"
)

func (*EndpointGatewayTargetProviderCloudServiceReference) isaEndpointGatewayTarget() bool {
	return true
}

// UnmarshalEndpointGatewayTargetProviderCloudServiceReference unmarshals an instance of EndpointGatewayTargetProviderCloudServiceReference from the specified map of raw messages.
func UnmarshalEndpointGatewayTargetProviderCloudServiceReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(EndpointGatewayTargetProviderCloudServiceReference)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// EndpointGatewayTargetProviderInfrastructureServiceReference : The name of this provider infrastructure service.
// This model "extends" EndpointGatewayTarget
type EndpointGatewayTargetProviderInfrastructureServiceReference struct {
	// The name of a provider infrastructure service. Must be:
	// - `ibm-ntp-server`: An NTP (Network Time Protocol) server provided by IBM.
	Name *string `json:"name" validate:"required"`

	// The type of target.
	ResourceType *string `json:"resource_type" validate:"required"`
}

// Constants associated with the EndpointGatewayTargetProviderInfrastructureServiceReference.ResourceType property.
// The type of target.
const (
	EndpointGatewayTargetProviderInfrastructureServiceReferenceResourceTypeProviderInfrastructureServiceConst = "provider_infrastructure_service"
)

func (*EndpointGatewayTargetProviderInfrastructureServiceReference) isaEndpointGatewayTarget() bool {
	return true
}

// UnmarshalEndpointGatewayTargetProviderInfrastructureServiceReference unmarshals an instance of EndpointGatewayTargetProviderInfrastructureServiceReference from the specified map of raw messages.
func UnmarshalEndpointGatewayTargetProviderInfrastructureServiceReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(EndpointGatewayTargetProviderInfrastructureServiceReference)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref : FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref struct
// This model "extends" FloatingIPByTargetNetworkInterfaceIdentity
type FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref struct {
	// The URL for this network interface.
	Href *string `json:"href" validate:"required"`
}

// NewFloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref : Instantiate FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewFloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(href string) (model *FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref, err error) {
	model = &FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref) isaFloatingIPByTargetNetworkInterfaceIdentity() bool {
	return true
}

// UnmarshalFloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref unmarshals an instance of FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref from the specified map of raw messages.
func UnmarshalFloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID : FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID struct
// This model "extends" FloatingIPByTargetNetworkInterfaceIdentity
type FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID struct {
	// The unique identifier for this network interface.
	ID *string `json:"id" validate:"required"`
}

// NewFloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID : Instantiate FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID (Generic Model Constructor)
func (*VpcV1) NewFloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID(id string) (model *FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID, err error) {
	model = &FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID) isaFloatingIPByTargetNetworkInterfaceIdentity() bool {
	return true
}

// UnmarshalFloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID unmarshals an instance of FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID from the specified map of raw messages.
func UnmarshalFloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FloatingIPByTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref : FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref struct
// This model "extends" FloatingIPPatchTargetNetworkInterfaceIdentity
type FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref struct {
	// The URL for this network interface.
	Href *string `json:"href" validate:"required"`
}

// NewFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref : Instantiate FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(href string) (model *FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref, err error) {
	model = &FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref) isaFloatingIPPatchTargetNetworkInterfaceIdentity() bool {
	return true
}

// UnmarshalFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref unmarshals an instance of FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref from the specified map of raw messages.
func UnmarshalFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID : FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID struct
// This model "extends" FloatingIPPatchTargetNetworkInterfaceIdentity
type FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID struct {
	// The unique identifier for this network interface.
	ID *string `json:"id" validate:"required"`
}

// NewFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID : Instantiate FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID (Generic Model Constructor)
func (*VpcV1) NewFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID(id string) (model *FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID, err error) {
	model = &FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID) isaFloatingIPPatchTargetNetworkInterfaceIdentity() bool {
	return true
}

// UnmarshalFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID unmarshals an instance of FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID from the specified map of raw messages.
func UnmarshalFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FloatingIPPrototypeFloatingIPByTarget : FloatingIPPrototypeFloatingIPByTarget struct
// This model "extends" FloatingIPPrototype
type FloatingIPPrototypeFloatingIPByTarget struct {
	// The unique user-defined name for this floating IP. If unspecified, the name will be a hyphenated list of
	// randomly-selected words.
	Name *string `json:"name,omitempty"`

	ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`

	// The network interface this floating IP is to be bound to.
	Target FloatingIPByTargetNetworkInterfaceIdentityIntf `json:"target" validate:"required"`
}

// NewFloatingIPPrototypeFloatingIPByTarget : Instantiate FloatingIPPrototypeFloatingIPByTarget (Generic Model Constructor)
func (*VpcV1) NewFloatingIPPrototypeFloatingIPByTarget(target FloatingIPByTargetNetworkInterfaceIdentityIntf) (model *FloatingIPPrototypeFloatingIPByTarget, err error) {
	model = &FloatingIPPrototypeFloatingIPByTarget{
		Target: target,
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*FloatingIPPrototypeFloatingIPByTarget) isaFloatingIPPrototype() bool {
	return true
}

// UnmarshalFloatingIPPrototypeFloatingIPByTarget unmarshals an instance of FloatingIPPrototypeFloatingIPByTarget from the specified map of raw messages.
func UnmarshalFloatingIPPrototypeFloatingIPByTarget(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FloatingIPPrototypeFloatingIPByTarget)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalFloatingIPByTargetNetworkInterfaceIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FloatingIPPrototypeFloatingIPByZone : FloatingIPPrototypeFloatingIPByZone struct
// This model "extends" FloatingIPPrototype
type FloatingIPPrototypeFloatingIPByZone struct {
	// The unique user-defined name for this floating IP. If unspecified, the name will be a hyphenated list of
	// randomly-selected words.
	Name *string `json:"name,omitempty"`

	ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`

	// The zone this floating IP will reside in.
	Zone ZoneIdentityIntf `json:"zone" validate:"required"`
}

// NewFloatingIPPrototypeFloatingIPByZone : Instantiate FloatingIPPrototypeFloatingIPByZone (Generic Model Constructor)
func (*VpcV1) NewFloatingIPPrototypeFloatingIPByZone(zone ZoneIdentityIntf) (model *FloatingIPPrototypeFloatingIPByZone, err error) {
	model = &FloatingIPPrototypeFloatingIPByZone{
		Zone: zone,
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*FloatingIPPrototypeFloatingIPByZone) isaFloatingIPPrototype() bool {
	return true
}

// UnmarshalFloatingIPPrototypeFloatingIPByZone unmarshals an instance of FloatingIPPrototypeFloatingIPByZone from the specified map of raw messages.
func UnmarshalFloatingIPPrototypeFloatingIPByZone(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FloatingIPPrototypeFloatingIPByZone)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FloatingIPTargetNetworkInterfaceReference : FloatingIPTargetNetworkInterfaceReference struct
// This model "extends" FloatingIPTarget
type FloatingIPTargetNetworkInterfaceReference struct {
	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *NetworkInterfaceReferenceDeleted `json:"deleted,omitempty"`

	// The URL for this network interface.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this network interface.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this network interface.
	Name *string `json:"name" validate:"required"`

	// The primary IPv4 address.
	PrimaryIpv4Address *string `json:"primary_ipv4_address" validate:"required"`

	// The resource type.
	ResourceType *string `json:"resource_type" validate:"required"`
}

// Constants associated with the FloatingIPTargetNetworkInterfaceReference.ResourceType property.
// The resource type.
const (
	FloatingIPTargetNetworkInterfaceReferenceResourceTypeNetworkInterfaceConst = "network_interface"
)

func (*FloatingIPTargetNetworkInterfaceReference) isaFloatingIPTarget() bool {
	return true
}

// UnmarshalFloatingIPTargetNetworkInterfaceReference unmarshals an instance of FloatingIPTargetNetworkInterfaceReference from the specified map of raw messages.
func UnmarshalFloatingIPTargetNetworkInterfaceReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FloatingIPTargetNetworkInterfaceReference)
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalNetworkInterfaceReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "primary_ipv4_address", &obj.PrimaryIpv4Address)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FloatingIPTargetPublicGatewayReference : FloatingIPTargetPublicGatewayReference struct
// This model "extends" FloatingIPTarget
type FloatingIPTargetPublicGatewayReference struct {
	// The CRN for this public gateway.
	CRN *string `json:"crn" validate:"required"`

	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *PublicGatewayReferenceDeleted `json:"deleted,omitempty"`

	// The URL for this public gateway.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this public gateway.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this public gateway.
	Name *string `json:"name" validate:"required"`

	// The resource type.
	ResourceType *string `json:"resource_type" validate:"required"`
}

// Constants associated with the FloatingIPTargetPublicGatewayReference.ResourceType property.
// The resource type.
const (
	FloatingIPTargetPublicGatewayReferenceResourceTypePublicGatewayConst = "public_gateway"
)

func (*FloatingIPTargetPublicGatewayReference) isaFloatingIPTarget() bool {
	return true
}

// UnmarshalFloatingIPTargetPublicGatewayReference unmarshals an instance of FloatingIPTargetPublicGatewayReference from the specified map of raw messages.
func UnmarshalFloatingIPTargetPublicGatewayReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FloatingIPTargetPublicGatewayReference)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalPublicGatewayReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FlowLogCollectorTargetPrototypeInstanceIdentity : Identifies a virtual server instance by a unique property.
// Models which "extend" this model:
// - FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID
// - FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN
// - FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref
// This model "extends" FlowLogCollectorTargetPrototype
type FlowLogCollectorTargetPrototypeInstanceIdentity struct {
	// The unique identifier for this virtual server instance.
	ID *string `json:"id,omitempty"`

	// The CRN for this virtual server instance.
	CRN *string `json:"crn,omitempty"`

	// The URL for this virtual server instance.
	Href *string `json:"href,omitempty"`
}

func (*FlowLogCollectorTargetPrototypeInstanceIdentity) isaFlowLogCollectorTargetPrototypeInstanceIdentity() bool {
	return true
}

type FlowLogCollectorTargetPrototypeInstanceIdentityIntf interface {
	FlowLogCollectorTargetPrototypeIntf
	isaFlowLogCollectorTargetPrototypeInstanceIdentity() bool
}

func (*FlowLogCollectorTargetPrototypeInstanceIdentity) isaFlowLogCollectorTargetPrototype() bool {
	return true
}

// UnmarshalFlowLogCollectorTargetPrototypeInstanceIdentity unmarshals an instance of FlowLogCollectorTargetPrototypeInstanceIdentity from the specified map of raw messages.
func UnmarshalFlowLogCollectorTargetPrototypeInstanceIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FlowLogCollectorTargetPrototypeInstanceIdentity)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity : Identifies a network interface by a unique property.
// Models which "extend" this model:
// - FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID
// - FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref
// This model "extends" FlowLogCollectorTargetPrototype
type FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity struct {
	// The unique identifier for this network interface.
	ID *string `json:"id,omitempty"`

	// The URL for this network interface.
	Href *string `json:"href,omitempty"`
}

func (*FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity) isaFlowLogCollectorTargetPrototypeNetworkInterfaceIdentity() bool {
	return true
}

type FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityIntf interface {
	FlowLogCollectorTargetPrototypeIntf
	isaFlowLogCollectorTargetPrototypeNetworkInterfaceIdentity() bool
}

func (*FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity) isaFlowLogCollectorTargetPrototype() bool {
	return true
}

// UnmarshalFlowLogCollectorTargetPrototypeNetworkInterfaceIdentity unmarshals an instance of FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity from the specified map of raw messages.
func UnmarshalFlowLogCollectorTargetPrototypeNetworkInterfaceIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FlowLogCollectorTargetPrototypeSubnetIdentity : Identifies a subnet by a unique property.
// Models which "extend" this model:
// - FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID
// - FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN
// - FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref
// This model "extends" FlowLogCollectorTargetPrototype
type FlowLogCollectorTargetPrototypeSubnetIdentity struct {
	// The unique identifier for this subnet.
	ID *string `json:"id,omitempty"`

	// The CRN for this subnet.
	CRN *string `json:"crn,omitempty"`

	// The URL for this subnet.
	Href *string `json:"href,omitempty"`
}

func (*FlowLogCollectorTargetPrototypeSubnetIdentity) isaFlowLogCollectorTargetPrototypeSubnetIdentity() bool {
	return true
}

type FlowLogCollectorTargetPrototypeSubnetIdentityIntf interface {
	FlowLogCollectorTargetPrototypeIntf
	isaFlowLogCollectorTargetPrototypeSubnetIdentity() bool
}

func (*FlowLogCollectorTargetPrototypeSubnetIdentity) isaFlowLogCollectorTargetPrototype() bool {
	return true
}

// UnmarshalFlowLogCollectorTargetPrototypeSubnetIdentity unmarshals an instance of FlowLogCollectorTargetPrototypeSubnetIdentity from the specified map of raw messages.
func UnmarshalFlowLogCollectorTargetPrototypeSubnetIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FlowLogCollectorTargetPrototypeSubnetIdentity)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FlowLogCollectorTargetPrototypeVPCIdentity : Identifies a VPC by a unique property.
// Models which "extend" this model:
// - FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID
// - FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN
// - FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref
// This model "extends" FlowLogCollectorTargetPrototype
type FlowLogCollectorTargetPrototypeVPCIdentity struct {
	// The unique identifier for this VPC.
	ID *string `json:"id,omitempty"`

	// The CRN for this VPC.
	CRN *string `json:"crn,omitempty"`

	// The URL for this VPC.
	Href *string `json:"href,omitempty"`
}

func (*FlowLogCollectorTargetPrototypeVPCIdentity) isaFlowLogCollectorTargetPrototypeVPCIdentity() bool {
	return true
}

type FlowLogCollectorTargetPrototypeVPCIdentityIntf interface {
	FlowLogCollectorTargetPrototypeIntf
	isaFlowLogCollectorTargetPrototypeVPCIdentity() bool
}

func (*FlowLogCollectorTargetPrototypeVPCIdentity) isaFlowLogCollectorTargetPrototype() bool {
	return true
}

// UnmarshalFlowLogCollectorTargetPrototypeVPCIdentity unmarshals an instance of FlowLogCollectorTargetPrototypeVPCIdentity from the specified map of raw messages.
func UnmarshalFlowLogCollectorTargetPrototypeVPCIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FlowLogCollectorTargetPrototypeVPCIdentity)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FlowLogCollectorTargetInstanceReference : FlowLogCollectorTargetInstanceReference struct
// This model "extends" FlowLogCollectorTarget
type FlowLogCollectorTargetInstanceReference struct {
	// The CRN for this virtual server instance.
	CRN *string `json:"crn" validate:"required"`

	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *InstanceReferenceDeleted `json:"deleted,omitempty"`

	// The URL for this virtual server instance.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this virtual server instance.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this virtual server instance (and default system hostname).
	Name *string `json:"name" validate:"required"`
}

func (*FlowLogCollectorTargetInstanceReference) isaFlowLogCollectorTarget() bool {
	return true
}

// UnmarshalFlowLogCollectorTargetInstanceReference unmarshals an instance of FlowLogCollectorTargetInstanceReference from the specified map of raw messages.
func UnmarshalFlowLogCollectorTargetInstanceReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FlowLogCollectorTargetInstanceReference)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalInstanceReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext : FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext struct
// This model "extends" FlowLogCollectorTarget
type FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext struct {
	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *NetworkInterfaceReferenceTargetContextDeleted `json:"deleted,omitempty"`

	// The URL for this network interface.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this network interface.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this network interface.
	Name *string `json:"name" validate:"required"`

	// The resource type.
	ResourceType *string `json:"resource_type" validate:"required"`
}

// Constants associated with the FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext.ResourceType property.
// The resource type.
const (
	FlowLogCollectorTargetNetworkInterfaceReferenceTargetContextResourceTypeNetworkInterfaceConst = "network_interface"
)

func (*FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext) isaFlowLogCollectorTarget() bool {
	return true
}

// UnmarshalFlowLogCollectorTargetNetworkInterfaceReferenceTargetContext unmarshals an instance of FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext from the specified map of raw messages.
func UnmarshalFlowLogCollectorTargetNetworkInterfaceReferenceTargetContext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext)
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalNetworkInterfaceReferenceTargetContextDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FlowLogCollectorTargetSubnetReference : FlowLogCollectorTargetSubnetReference struct
// This model "extends" FlowLogCollectorTarget
type FlowLogCollectorTargetSubnetReference struct {
	// The CRN for this subnet.
	CRN *string `json:"crn" validate:"required"`

	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *SubnetReferenceDeleted `json:"deleted,omitempty"`

	// The URL for this subnet.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this subnet.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this subnet.
	Name *string `json:"name" validate:"required"`
}

func (*FlowLogCollectorTargetSubnetReference) isaFlowLogCollectorTarget() bool {
	return true
}

// UnmarshalFlowLogCollectorTargetSubnetReference unmarshals an instance of FlowLogCollectorTargetSubnetReference from the specified map of raw messages.
func UnmarshalFlowLogCollectorTargetSubnetReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FlowLogCollectorTargetSubnetReference)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalSubnetReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FlowLogCollectorTargetVPCReference : FlowLogCollectorTargetVPCReference struct
// This model "extends" FlowLogCollectorTarget
type FlowLogCollectorTargetVPCReference struct {
	// The CRN for this VPC.
	CRN *string `json:"crn" validate:"required"`

	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *VPCReferenceDeleted `json:"deleted,omitempty"`

	// The URL for this VPC.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this VPC.
	ID *string `json:"id" validate:"required"`

	// The unique user-defined name for this VPC.
	Name *string `json:"name" validate:"required"`
}

func (*FlowLogCollectorTargetVPCReference) isaFlowLogCollectorTarget() bool {
	return true
}

// UnmarshalFlowLogCollectorTargetVPCReference unmarshals an instance of FlowLogCollectorTargetVPCReference from the specified map of raw messages.
func UnmarshalFlowLogCollectorTargetVPCReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FlowLogCollectorTargetVPCReference)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVPCReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// IkePolicyIdentityByHref : IkePolicyIdentityByHref struct
// This model "extends" IkePolicyIdentity
type IkePolicyIdentityByHref struct {
	// The IKE policy's canonical URL.
	Href *string `json:"href" validate:"required"`
}

// NewIkePolicyIdentityByHref : Instantiate IkePolicyIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewIkePolicyIdentityByHref(href string) (model *IkePolicyIdentityByHref, err error) {
	model = &IkePolicyIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*IkePolicyIdentityByHref) isaIkePolicyIdentity() bool {
	return true
}

// UnmarshalIkePolicyIdentityByHref unmarshals an instance of IkePolicyIdentityByHref from the specified map of raw messages.
func UnmarshalIkePolicyIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(IkePolicyIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// IkePolicyIdentityByID : IkePolicyIdentityByID struct
// This model "extends" IkePolicyIdentity
type IkePolicyIdentityByID struct {
	// The unique identifier for this IKE policy.
	ID *string `json:"id" validate:"required"`
}

// NewIkePolicyIdentityByID : Instantiate IkePolicyIdentityByID (Generic Model Constructor)
func (*VpcV1) NewIkePolicyIdentityByID(id string) (model *IkePolicyIdentityByID, err error) {
	model = &IkePolicyIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*IkePolicyIdentityByID) isaIkePolicyIdentity() bool {
	return true
}

// UnmarshalIkePolicyIdentityByID unmarshals an instance of IkePolicyIdentityByID from the specified map of raw messages.
func UnmarshalIkePolicyIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(IkePolicyIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// IPsecPolicyIdentityByHref : IPsecPolicyIdentityByHref struct
// This model "extends" IPsecPolicyIdentity
type IPsecPolicyIdentityByHref struct {
	// The IPsec policy's canonical URL.
	Href *string `json:"href" validate:"required"`
}

// NewIPsecPolicyIdentityByHref : Instantiate IPsecPolicyIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewIPsecPolicyIdentityByHref(href string) (model *IPsecPolicyIdentityByHref, err error) {
	model = &IPsecPolicyIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*IPsecPolicyIdentityByHref) isaIPsecPolicyIdentity() bool {
	return true
}

// UnmarshalIPsecPolicyIdentityByHref unmarshals an instance of IPsecPolicyIdentityByHref from the specified map of raw messages.
func UnmarshalIPsecPolicyIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(IPsecPolicyIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// IPsecPolicyIdentityByID : IPsecPolicyIdentityByID struct
// This model "extends" IPsecPolicyIdentity
type IPsecPolicyIdentityByID struct {
	// The unique identifier for this IPsec policy.
	ID *string `json:"id" validate:"required"`
}

// NewIPsecPolicyIdentityByID : Instantiate IPsecPolicyIdentityByID (Generic Model Constructor)
func (*VpcV1) NewIPsecPolicyIdentityByID(id string) (model *IPsecPolicyIdentityByID, err error) {
	model = &IPsecPolicyIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*IPsecPolicyIdentityByID) isaIPsecPolicyIdentity() bool {
	return true
}

// UnmarshalIPsecPolicyIdentityByID unmarshals an instance of IPsecPolicyIdentityByID from the specified map of raw messages.
func UnmarshalIPsecPolicyIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(IPsecPolicyIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ImageIdentityByCRN : ImageIdentityByCRN struct
// This model "extends" ImageIdentity
type ImageIdentityByCRN struct {
	// The CRN for this image.
	CRN *string `json:"crn" validate:"required"`
}

// NewImageIdentityByCRN : Instantiate ImageIdentityByCRN (Generic Model Constructor)
func (*VpcV1) NewImageIdentityByCRN(crn string) (model *ImageIdentityByCRN, err error) {
	model = &ImageIdentityByCRN{
		CRN: core.StringPtr(crn),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*ImageIdentityByCRN) isaImageIdentity() bool {
	return true
}

// UnmarshalImageIdentityByCRN unmarshals an instance of ImageIdentityByCRN from the specified map of raw messages.
func UnmarshalImageIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ImageIdentityByCRN)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ImageIdentityByHref : ImageIdentityByHref struct
// This model "extends" ImageIdentity
type ImageIdentityByHref struct {
	// The URL for this image.
	Href *string `json:"href" validate:"required"`
}

// NewImageIdentityByHref : Instantiate ImageIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewImageIdentityByHref(href string) (model *ImageIdentityByHref, err error) {
	model = &ImageIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*ImageIdentityByHref) isaImageIdentity() bool {
	return true
}

// UnmarshalImageIdentityByHref unmarshals an instance of ImageIdentityByHref from the specified map of raw messages.
func UnmarshalImageIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ImageIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ImageIdentityByID : ImageIdentityByID struct
// This model "extends" ImageIdentity
type ImageIdentityByID struct {
	// The unique identifier for this image.
	ID *string `json:"id" validate:"required"`
}

// NewImageIdentityByID : Instantiate ImageIdentityByID (Generic Model Constructor)
func (*VpcV1) NewImageIdentityByID(id string) (model *ImageIdentityByID, err error) {
	model = &ImageIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*ImageIdentityByID) isaImageIdentity() bool {
	return true
}

// UnmarshalImageIdentityByID unmarshals an instance of ImageIdentityByID from the specified map of raw messages.
func UnmarshalImageIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ImageIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ImagePrototypeImageByFile : ImagePrototypeImageByFile struct
// This model "extends" ImagePrototype
type ImagePrototypeImageByFile struct {
	// The unique user-defined name for this image. Names starting with "ibm-" are not allowed. If unspecified, the name
	// will be a hyphenated list of randomly-selected words.
	Name *string `json:"name,omitempty"`

	ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`

	// A base64-encoded, encrypted representation of the key that was used to encrypt the data for this image.
	//
	// That representation is created by wrapping the key's value with the `encryption_key` root key (which must also be
	// provided), using either [Key Protect](https://cloud.ibm.com/docs/key-protect?topic=key-protect-wrap-keys) or the
	// [Hyper Protect Crypto Service](https://cloud.ibm.com/docs/services/hs-crypto?topic=hs-crypto-wrap-keys).
	//
	// If this property is not provided, the imported image is treated as unencrypted.
	EncryptedDataKey *string `json:"encrypted_data_key,omitempty"`

	// The identity of the root key that was used to wrap the data key (which is ultimately
	// represented as `encrypted_data_key`). Additionally, the root key will be used to encrypt
	// volumes created from this image (unless an alternate `encryption_key` is provided at
	// volume creation).
	//
	// If this property is not provided, the imported image is treated as unencrypted.
	EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"`

	// The file from which to create the image.
	File *ImageFilePrototype `json:"file" validate:"required"`

	// The identity of the [supported operating
	// system](https://cloud.ibm.com/apidocs/vpc#list-operating-systems) included in
	// this image.
	OperatingSystem OperatingSystemIdentityIntf `json:"operating_system" validate:"required"`
}

// NewImagePrototypeImageByFile : Instantiate ImagePrototypeImageByFile (Generic Model Constructor)
func (*VpcV1) NewImagePrototypeImageByFile(file *ImageFilePrototype, operatingSystem OperatingSystemIdentityIntf) (model *ImagePrototypeImageByFile, err error) {
	model = &ImagePrototypeImageByFile{
		File:            file,
		OperatingSystem: operatingSystem,
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*ImagePrototypeImageByFile) isaImagePrototype() bool {
	return true
}

// UnmarshalImagePrototypeImageByFile unmarshals an instance of ImagePrototypeImageByFile from the specified map of raw messages.
func UnmarshalImagePrototypeImageByFile(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ImagePrototypeImageByFile)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "encrypted_data_key", &obj.EncryptedDataKey)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "file", &obj.File, UnmarshalImageFilePrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "operating_system", &obj.OperatingSystem, UnmarshalOperatingSystemIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerActionPatchScheduledActionPatch : InstanceGroupManagerActionPatchScheduledActionPatch struct
// This model "extends" InstanceGroupManagerActionPatch
type InstanceGroupManagerActionPatchScheduledActionPatch struct {
	// The user-defined name for this instance group manager action. Names must be unique within the instance group
	// manager.
	Name *string `json:"name,omitempty"`

	// The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min
	// period.
	CronSpec *string `json:"cron_spec,omitempty"`

	Group *InstanceGroupManagerScheduledActionGroupPatch `json:"group,omitempty"`

	Manager InstanceGroupManagerScheduledActionByManagerPatchManagerIntf `json:"manager,omitempty"`

	// The date and time the scheduled action will run.
	RunAt *strfmt.DateTime `json:"run_at,omitempty"`
}

func (*InstanceGroupManagerActionPatchScheduledActionPatch) isaInstanceGroupManagerActionPatch() bool {
	return true
}

// UnmarshalInstanceGroupManagerActionPatchScheduledActionPatch unmarshals an instance of InstanceGroupManagerActionPatchScheduledActionPatch from the specified map of raw messages.
func UnmarshalInstanceGroupManagerActionPatchScheduledActionPatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerActionPatchScheduledActionPatch)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroupPatch)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionByManagerPatchManager)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "run_at", &obj.RunAt)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerActionPrototypeScheduledActionPrototype : InstanceGroupManagerActionPrototypeScheduledActionPrototype struct
// Models which "extend" this model:
// - InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt
// - InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec
// This model "extends" InstanceGroupManagerActionPrototype
type InstanceGroupManagerActionPrototypeScheduledActionPrototype struct {
	// The user-defined name for this instance group manager action. Names must be unique within the instance group
	// manager.
	Name *string `json:"name,omitempty"`

	// The date and time the scheduled action will run.
	RunAt *strfmt.DateTime `json:"run_at,omitempty"`

	Group *InstanceGroupManagerScheduledActionGroupPrototype `json:"group,omitempty"`

	Manager InstanceGroupManagerScheduledActionByManagerManagerIntf `json:"manager,omitempty"`

	// The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min
	// period.
	CronSpec *string `json:"cron_spec,omitempty"`
}

func (*InstanceGroupManagerActionPrototypeScheduledActionPrototype) isaInstanceGroupManagerActionPrototypeScheduledActionPrototype() bool {
	return true
}

type InstanceGroupManagerActionPrototypeScheduledActionPrototypeIntf interface {
	InstanceGroupManagerActionPrototypeIntf
	isaInstanceGroupManagerActionPrototypeScheduledActionPrototype() bool
}

func (*InstanceGroupManagerActionPrototypeScheduledActionPrototype) isaInstanceGroupManagerActionPrototype() bool {
	return true
}

// UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototype unmarshals an instance of InstanceGroupManagerActionPrototypeScheduledActionPrototype from the specified map of raw messages.
func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototype)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "run_at", &obj.RunAt)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroupPrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionByManagerManager)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerActionScheduledAction : InstanceGroupManagerActionScheduledAction struct
// Models which "extend" this model:
// - InstanceGroupManagerActionScheduledActionGroup
// - InstanceGroupManagerActionScheduledActionManager
// This model "extends" InstanceGroupManagerAction
type InstanceGroupManagerActionScheduledAction struct {
	// If set to `true`, this scheduled action will be automatically deleted after it has finished and the
	// `auto_delete_timeout` time has passed.
	AutoDelete *bool `json:"auto_delete" validate:"required"`

	// Amount of time in hours that are required to pass before the scheduled action will be automatically deleted once it
	// has finished. If this value is 0, the action will be deleted on completion.
	AutoDeleteTimeout *int64 `json:"auto_delete_timeout" validate:"required"`

	// The date and time that the instance group manager action was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The URL for this instance group manager action.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this instance group manager action.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this instance group manager action. Names must be unique within the instance group
	// manager.
	Name *string `json:"name" validate:"required"`

	// The resource type.
	ResourceType *string `json:"resource_type" validate:"required"`

	// The status of the instance group action
	// - `active`: Action is ready to be run
	// - `completed`: Action was completed successfully
	// - `failed`: Action could not be completed successfully
	// - `incompatible`: Action parameters are not compatible with the group or manager
	// - `omitted`: Action was not applied because this action's manager was disabled.
	Status *string `json:"status" validate:"required"`

	// The date and time that the instance group manager action was modified.
	UpdatedAt *strfmt.DateTime `json:"updated_at" validate:"required"`

	// The type of action for the instance group.
	ActionType *string `json:"action_type" validate:"required"`

	// The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min
	// period.
	CronSpec *string `json:"cron_spec,omitempty"`

	// The date and time the scheduled action was last applied. If empty the action has never been applied.
	LastAppliedAt *strfmt.DateTime `json:"last_applied_at,omitempty"`

	// The date and time the scheduled action will next run. If empty the system is currently calculating the next run
	// time.
	NextRunAt *strfmt.DateTime `json:"next_run_at,omitempty"`

	Group *InstanceGroupManagerScheduledActionGroupGroup `json:"group,omitempty"`

	Manager InstanceGroupManagerScheduledActionManagerManagerIntf `json:"manager,omitempty"`
}

// Constants associated with the InstanceGroupManagerActionScheduledAction.ResourceType property.
// The resource type.
const (
	InstanceGroupManagerActionScheduledActionResourceTypeInstanceGroupManagerActionConst = "instance_group_manager_action"
)

// Constants associated with the InstanceGroupManagerActionScheduledAction.Status property.
// The status of the instance group action
// - `active`: Action is ready to be run
// - `completed`: Action was completed successfully
// - `failed`: Action could not be completed successfully
// - `incompatible`: Action parameters are not compatible with the group or manager
// - `omitted`: Action was not applied because this action's manager was disabled.
const (
	InstanceGroupManagerActionScheduledActionStatusActiveConst       = "active"
	InstanceGroupManagerActionScheduledActionStatusCompletedConst    = "completed"
	InstanceGroupManagerActionScheduledActionStatusFailedConst       = "failed"
	InstanceGroupManagerActionScheduledActionStatusIncompatibleConst = "incompatible"
	InstanceGroupManagerActionScheduledActionStatusOmittedConst      = "omitted"
)

// Constants associated with the InstanceGroupManagerActionScheduledAction.ActionType property.
// The type of action for the instance group.
const (
	InstanceGroupManagerActionScheduledActionActionTypeScheduledConst = "scheduled"
)

func (*InstanceGroupManagerActionScheduledAction) isaInstanceGroupManagerActionScheduledAction() bool {
	return true
}

type InstanceGroupManagerActionScheduledActionIntf interface {
	InstanceGroupManagerActionIntf
	isaInstanceGroupManagerActionScheduledAction() bool
}

func (*InstanceGroupManagerActionScheduledAction) isaInstanceGroupManagerAction() bool {
	return true
}

// UnmarshalInstanceGroupManagerActionScheduledAction unmarshals an instance of InstanceGroupManagerActionScheduledAction from the specified map of raw messages.
func UnmarshalInstanceGroupManagerActionScheduledAction(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerActionScheduledAction)
	err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "auto_delete_timeout", &obj.AutoDeleteTimeout)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "status", &obj.Status)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "action_type", &obj.ActionType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "last_applied_at", &obj.LastAppliedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "next_run_at", &obj.NextRunAt)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroupGroup)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionManagerManager)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerAutoScale : InstanceGroupManagerAutoScale struct
// This model "extends" InstanceGroupManager
type InstanceGroupManagerAutoScale struct {
	// The date and time that the instance group manager was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The URL for this instance group manager.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this instance group manager.
	ID *string `json:"id" validate:"required"`

	// If set to `true`, this manager will control the instance group.
	ManagementEnabled *bool `json:"management_enabled" validate:"required"`

	// The user-defined name for this instance group manager. Names must be unique within the instance group.
	Name *string `json:"name" validate:"required"`

	// The date and time that the instance group manager was updated.
	UpdatedAt *strfmt.DateTime `json:"updated_at" validate:"required"`

	// The time window in seconds to aggregate metrics prior to evaluation.
	AggregationWindow *int64 `json:"aggregation_window" validate:"required"`

	// The duration of time in seconds to pause further scale actions after scaling has taken place.
	Cooldown *int64 `json:"cooldown" validate:"required"`

	// The type of instance group manager.
	ManagerType *string `json:"manager_type" validate:"required"`

	// The maximum number of members in a managed instance group.
	MaxMembershipCount *int64 `json:"max_membership_count" validate:"required"`

	// The minimum number of members in a managed instance group.
	MinMembershipCount *int64 `json:"min_membership_count" validate:"required"`

	// The policies of the instance group manager.
	Policies []InstanceGroupManagerPolicyReference `json:"policies" validate:"required"`
}

// Constants associated with the InstanceGroupManagerAutoScale.ManagerType property.
// The type of instance group manager.
const (
	InstanceGroupManagerAutoScaleManagerTypeAutoscaleConst = "autoscale"
)

func (*InstanceGroupManagerAutoScale) isaInstanceGroupManager() bool {
	return true
}

// UnmarshalInstanceGroupManagerAutoScale unmarshals an instance of InstanceGroupManagerAutoScale from the specified map of raw messages.
func UnmarshalInstanceGroupManagerAutoScale(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerAutoScale)
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "management_enabled", &obj.ManagementEnabled)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "aggregation_window", &obj.AggregationWindow)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "cooldown", &obj.Cooldown)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "manager_type", &obj.ManagerType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "policies", &obj.Policies, UnmarshalInstanceGroupManagerPolicyReference)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype : InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype struct
// This model "extends" InstanceGroupManagerPolicyPrototype
type InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype struct {
	// The user-defined name for this instance group manager policy. Names must be unique within the instance group
	// manager.
	Name *string `json:"name,omitempty"`

	// The type of metric to be evaluated.
	MetricType *string `json:"metric_type" validate:"required"`

	// The metric value to be evaluated.
	MetricValue *int64 `json:"metric_value" validate:"required"`

	// The type of policy for the instance group.
	PolicyType *string `json:"policy_type" validate:"required"`
}

// Constants associated with the InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype.MetricType property.
// The type of metric to be evaluated.
const (
	InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototypeMetricTypeCpuConst        = "cpu"
	InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototypeMetricTypeMemoryConst     = "memory"
	InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototypeMetricTypeNetworkInConst  = "network_in"
	InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototypeMetricTypeNetworkOutConst = "network_out"
)

// Constants associated with the InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype.PolicyType property.
// The type of policy for the instance group.
const (
	InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototypePolicyTypeTargetConst = "target"
)

// NewInstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype : Instantiate InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype (Generic Model Constructor)
func (*VpcV1) NewInstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype(metricType string, metricValue int64, policyType string) (model *InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype, err error) {
	model = &InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype{
		MetricType:  core.StringPtr(metricType),
		MetricValue: core.Int64Ptr(metricValue),
		PolicyType:  core.StringPtr(policyType),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype) isaInstanceGroupManagerPolicyPrototype() bool {
	return true
}

// UnmarshalInstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype unmarshals an instance of InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype from the specified map of raw messages.
func UnmarshalInstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "metric_type", &obj.MetricType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "metric_value", &obj.MetricValue)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "policy_type", &obj.PolicyType)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy : InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy struct
// This model "extends" InstanceGroupManagerPolicy
type InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy struct {
	// The date and time that the instance group manager policy was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The URL for this instance group manager policy.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this instance group manager policy.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this instance group manager policy. Names must be unique within the instance group
	// manager.
	Name *string `json:"name" validate:"required"`

	// The date and time that the instance group manager policy was updated.
	UpdatedAt *strfmt.DateTime `json:"updated_at" validate:"required"`

	// The type of metric to be evaluated.
	MetricType *string `json:"metric_type" validate:"required"`

	// The metric value to be evaluated.
	MetricValue *int64 `json:"metric_value" validate:"required"`

	// The type of policy for the instance group.
	PolicyType *string `json:"policy_type" validate:"required"`
}

// Constants associated with the InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy.MetricType property.
// The type of metric to be evaluated.
const (
	InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicyMetricTypeCpuConst        = "cpu"
	InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicyMetricTypeMemoryConst     = "memory"
	InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicyMetricTypeNetworkInConst  = "network_in"
	InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicyMetricTypeNetworkOutConst = "network_out"
)

// Constants associated with the InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy.PolicyType property.
// The type of policy for the instance group.
const (
	InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicyPolicyTypeTargetConst = "target"
)

func (*InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy) isaInstanceGroupManagerPolicy() bool {
	return true
}

// UnmarshalInstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy unmarshals an instance of InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy from the specified map of raw messages.
func UnmarshalInstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy)
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "metric_type", &obj.MetricType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "metric_value", &obj.MetricValue)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "policy_type", &obj.PolicyType)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype : InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype struct
// This model "extends" InstanceGroupManagerPrototype
type InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype struct {
	// If set to `true`, this manager will control the instance group.
	ManagementEnabled *bool `json:"management_enabled,omitempty"`

	// The user-defined name for this instance group manager. Names must be unique within the instance group.
	Name *string `json:"name,omitempty"`

	// The time window in seconds to aggregate metrics prior to evaluation.
	AggregationWindow *int64 `json:"aggregation_window,omitempty"`

	// The duration of time in seconds to pause further scale actions after scaling has taken place.
	Cooldown *int64 `json:"cooldown,omitempty"`

	// The type of instance group manager.
	ManagerType *string `json:"manager_type" validate:"required"`

	// The maximum number of members in a managed instance group.
	MaxMembershipCount *int64 `json:"max_membership_count" validate:"required"`

	// The minimum number of members in a managed instance group.
	MinMembershipCount *int64 `json:"min_membership_count,omitempty"`
}

// Constants associated with the InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype.ManagerType property.
// The type of instance group manager.
const (
	InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototypeManagerTypeAutoscaleConst = "autoscale"
)

// NewInstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype : Instantiate InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype (Generic Model Constructor)
func (*VpcV1) NewInstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype(managerType string, maxMembershipCount int64) (model *InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype, err error) {
	model = &InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype{
		ManagerType:        core.StringPtr(managerType),
		MaxMembershipCount: core.Int64Ptr(maxMembershipCount),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype) isaInstanceGroupManagerPrototype() bool {
	return true
}

// UnmarshalInstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype unmarshals an instance of InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype from the specified map of raw messages.
func UnmarshalInstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype)
	err = core.UnmarshalPrimitive(m, "management_enabled", &obj.ManagementEnabled)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "aggregation_window", &obj.AggregationWindow)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "cooldown", &obj.Cooldown)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "manager_type", &obj.ManagerType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype : InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype struct
// This model "extends" InstanceGroupManagerPrototype
type InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype struct {
	// If set to `true`, this manager will control the instance group.
	ManagementEnabled *bool `json:"management_enabled,omitempty"`

	// The user-defined name for this instance group manager. Names must be unique within the instance group.
	Name *string `json:"name,omitempty"`

	// The type of instance group manager.
	ManagerType *string `json:"manager_type" validate:"required"`
}

// Constants associated with the InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype.ManagerType property.
// The type of instance group manager.
const (
	InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototypeManagerTypeScheduledConst = "scheduled"
)

// NewInstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype : Instantiate InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype (Generic Model Constructor)
func (*VpcV1) NewInstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype(managerType string) (model *InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype, err error) {
	model = &InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype{
		ManagerType: core.StringPtr(managerType),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype) isaInstanceGroupManagerPrototype() bool {
	return true
}

// UnmarshalInstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype unmarshals an instance of InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype from the specified map of raw messages.
func UnmarshalInstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype)
	err = core.UnmarshalPrimitive(m, "management_enabled", &obj.ManagementEnabled)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "manager_type", &obj.ManagerType)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerScheduled : InstanceGroupManagerScheduled struct
// This model "extends" InstanceGroupManager
type InstanceGroupManagerScheduled struct {
	// The date and time that the instance group manager was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The URL for this instance group manager.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this instance group manager.
	ID *string `json:"id" validate:"required"`

	// If set to `true`, this manager will control the instance group.
	ManagementEnabled *bool `json:"management_enabled" validate:"required"`

	// The user-defined name for this instance group manager. Names must be unique within the instance group.
	Name *string `json:"name" validate:"required"`

	// The date and time that the instance group manager was updated.
	UpdatedAt *strfmt.DateTime `json:"updated_at" validate:"required"`

	// The actions of the instance group manager.
	Actions []InstanceGroupManagerActionReference `json:"actions" validate:"required"`

	// The type of instance group manager.
	ManagerType *string `json:"manager_type" validate:"required"`
}

// Constants associated with the InstanceGroupManagerScheduled.ManagerType property.
// The type of instance group manager.
const (
	InstanceGroupManagerScheduledManagerTypeScheduledConst = "scheduled"
)

func (*InstanceGroupManagerScheduled) isaInstanceGroupManager() bool {
	return true
}

// UnmarshalInstanceGroupManagerScheduled unmarshals an instance of InstanceGroupManagerScheduled from the specified map of raw messages.
func UnmarshalInstanceGroupManagerScheduled(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerScheduled)
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "management_enabled", &obj.ManagementEnabled)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "actions", &obj.Actions, UnmarshalInstanceGroupManagerActionReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "manager_type", &obj.ManagerType)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototype : The identity of the auto scale manager to update and the property or properties to be updated. Exactly one of `id` or
// `href` must be provided in addition to at least one of
// `min_membership_count` and `max_membership_count`.
// Models which "extend" this model:
// - InstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototypeInstanceGroupManagerScheduledActionManagerAutoScalePrototypeInstanceGroupManagerIdentityByID
// - InstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototypeInstanceGroupManagerScheduledActionManagerAutoScalePrototypeInstanceGroupManagerIdentityByHref
// This model "extends" InstanceGroupManagerScheduledActionByManagerManager
type InstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototype struct {
	// The maximum number of members the instance group should have at the scheduled time.
	MaxMembershipCount *int64 `json:"max_membership_count,omitempty"`

	// The minimum number of members the instance group should have at the scheduled time.
	MinMembershipCount *int64 `json:"min_membership_count,omitempty"`

	// The unique identifier for this instance group manager.
	ID *string `json:"id,omitempty"`

	// The URL for this instance group manager.
	Href *string `json:"href,omitempty"`
}

func (*InstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototype) isaInstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototype() bool {
	return true
}

type InstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototypeIntf interface {
	InstanceGroupManagerScheduledActionByManagerManagerIntf
	isaInstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototype() bool
}

func (*InstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototype) isaInstanceGroupManagerScheduledActionByManagerManager() bool {
	return true
}

// UnmarshalInstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototype unmarshals an instance of InstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototype from the specified map of raw messages.
func UnmarshalInstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototype)
	err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerScheduledActionByManagerPatchManagerAutoScalePatch : InstanceGroupManagerScheduledActionByManagerPatchManagerAutoScalePatch struct
// This model "extends" InstanceGroupManagerScheduledActionByManagerPatchManager
type InstanceGroupManagerScheduledActionByManagerPatchManagerAutoScalePatch struct {
	// The maximum number of members the instance group should have at the scheduled time.
	MaxMembershipCount *int64 `json:"max_membership_count,omitempty"`

	// The minimum number of members the instance group should have at the scheduled time.
	MinMembershipCount *int64 `json:"min_membership_count,omitempty"`
}

func (*InstanceGroupManagerScheduledActionByManagerPatchManagerAutoScalePatch) isaInstanceGroupManagerScheduledActionByManagerPatchManager() bool {
	return true
}

// UnmarshalInstanceGroupManagerScheduledActionByManagerPatchManagerAutoScalePatch unmarshals an instance of InstanceGroupManagerScheduledActionByManagerPatchManagerAutoScalePatch from the specified map of raw messages.
func UnmarshalInstanceGroupManagerScheduledActionByManagerPatchManagerAutoScalePatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerScheduledActionByManagerPatchManagerAutoScalePatch)
	err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerScheduledActionManagerManagerAutoScale : InstanceGroupManagerScheduledActionManagerManagerAutoScale struct
// This model "extends" InstanceGroupManagerScheduledActionManagerManager
type InstanceGroupManagerScheduledActionManagerManagerAutoScale struct {
	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *InstanceGroupManagerReferenceDeleted `json:"deleted,omitempty"`

	// The URL for this instance group manager.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this instance group manager.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this instance group manager. Names must be unique within the instance group.
	Name *string `json:"name" validate:"required"`

	// The maximum number of members the instance group should have at the scheduled time.
	MaxMembershipCount *int64 `json:"max_membership_count,omitempty"`

	// The minimum number of members the instance group should have at the scheduled time.
	MinMembershipCount *int64 `json:"min_membership_count,omitempty"`
}

func (*InstanceGroupManagerScheduledActionManagerManagerAutoScale) isaInstanceGroupManagerScheduledActionManagerManager() bool {
	return true
}

// UnmarshalInstanceGroupManagerScheduledActionManagerManagerAutoScale unmarshals an instance of InstanceGroupManagerScheduledActionManagerManagerAutoScale from the specified map of raw messages.
func UnmarshalInstanceGroupManagerScheduledActionManagerManagerAutoScale(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerScheduledActionManagerManagerAutoScale)
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalInstanceGroupManagerReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstancePatchProfileInstanceProfileIdentityByHref : InstancePatchProfileInstanceProfileIdentityByHref struct
// This model "extends" InstancePatchProfile
type InstancePatchProfileInstanceProfileIdentityByHref struct {
	// The URL for this virtual server instance profile.
	Href *string `json:"href" validate:"required"`
}

// NewInstancePatchProfileInstanceProfileIdentityByHref : Instantiate InstancePatchProfileInstanceProfileIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewInstancePatchProfileInstanceProfileIdentityByHref(href string) (model *InstancePatchProfileInstanceProfileIdentityByHref, err error) {
	model = &InstancePatchProfileInstanceProfileIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*InstancePatchProfileInstanceProfileIdentityByHref) isaInstancePatchProfile() bool {
	return true
}

// UnmarshalInstancePatchProfileInstanceProfileIdentityByHref unmarshals an instance of InstancePatchProfileInstanceProfileIdentityByHref from the specified map of raw messages.
func UnmarshalInstancePatchProfileInstanceProfileIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstancePatchProfileInstanceProfileIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstancePatchProfileInstanceProfileIdentityByName : InstancePatchProfileInstanceProfileIdentityByName struct
// This model "extends" InstancePatchProfile
type InstancePatchProfileInstanceProfileIdentityByName struct {
	// The globally unique name for this virtual server instance profile.
	Name *string `json:"name" validate:"required"`
}

// NewInstancePatchProfileInstanceProfileIdentityByName : Instantiate InstancePatchProfileInstanceProfileIdentityByName (Generic Model Constructor)
func (*VpcV1) NewInstancePatchProfileInstanceProfileIdentityByName(name string) (model *InstancePatchProfileInstanceProfileIdentityByName, err error) {
	model = &InstancePatchProfileInstanceProfileIdentityByName{
		Name: core.StringPtr(name),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*InstancePatchProfileInstanceProfileIdentityByName) isaInstancePatchProfile() bool {
	return true
}

// UnmarshalInstancePatchProfileInstanceProfileIdentityByName unmarshals an instance of InstancePatchProfileInstanceProfileIdentityByName from the specified map of raw messages.
func UnmarshalInstancePatchProfileInstanceProfileIdentityByName(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstancePatchProfileInstanceProfileIdentityByName)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstancePlacementTargetPrototypeDedicatedHostGroupIdentity : Identifies a dedicated host group by a unique property.
// Models which "extend" this model:
// - InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID
// - InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN
// - InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref
// This model "extends" InstancePlacementTargetPrototype
type InstancePlacementTargetPrototypeDedicatedHostGroupIdentity struct {
	// The unique identifier for this dedicated host group.
	ID *string `json:"id,omitempty"`

	// The CRN for this dedicated host group.
	CRN *string `json:"crn,omitempty"`

	// The URL for this dedicated host group.
	Href *string `json:"href,omitempty"`
}

func (*InstancePlacementTargetPrototypeDedicatedHostGroupIdentity) isaInstancePlacementTargetPrototypeDedicatedHostGroupIdentity() bool {
	return true
}

type InstancePlacementTargetPrototypeDedicatedHostGroupIdentityIntf interface {
	InstancePlacementTargetPrototypeIntf
	isaInstancePlacementTargetPrototypeDedicatedHostGroupIdentity() bool
}

func (*InstancePlacementTargetPrototypeDedicatedHostGroupIdentity) isaInstancePlacementTargetPrototype() bool {
	return true
}

// UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentity unmarshals an instance of InstancePlacementTargetPrototypeDedicatedHostGroupIdentity from the specified map of raw messages.
func UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstancePlacementTargetPrototypeDedicatedHostGroupIdentity)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstancePlacementTargetPrototypeDedicatedHostIdentity : Identifies a dedicated host by a unique property.
// Models which "extend" this model:
// - InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID
// - InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN
// - InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref
// This model "extends" InstancePlacementTargetPrototype
type InstancePlacementTargetPrototypeDedicatedHostIdentity struct {
	// The unique identifier for this dedicated host.
	ID *string `json:"id,omitempty"`

	// The CRN for this dedicated host.
	CRN *string `json:"crn,omitempty"`

	// The URL for this dedicated host.
	Href *string `json:"href,omitempty"`
}

func (*InstancePlacementTargetPrototypeDedicatedHostIdentity) isaInstancePlacementTargetPrototypeDedicatedHostIdentity() bool {
	return true
}

type InstancePlacementTargetPrototypeDedicatedHostIdentityIntf interface {
	InstancePlacementTargetPrototypeIntf
	isaInstancePlacementTargetPrototypeDedicatedHostIdentity() bool
}

func (*InstancePlacementTargetPrototypeDedicatedHostIdentity) isaInstancePlacementTargetPrototype() bool {
	return true
}

// UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentity unmarshals an instance of InstancePlacementTargetPrototypeDedicatedHostIdentity from the specified map of raw messages.
func UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstancePlacementTargetPrototypeDedicatedHostIdentity)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfileBandwidthDependent : The total bandwidth shared across the network interfaces and storage volumes of an instance with this profile depends
// on its configuration.
// This model "extends" InstanceProfileBandwidth
type InstanceProfileBandwidthDependent struct {
	// The type for this profile field.
	Type *string `json:"type" validate:"required"`
}

// Constants associated with the InstanceProfileBandwidthDependent.Type property.
// The type for this profile field.
const (
	InstanceProfileBandwidthDependentTypeDependentConst = "dependent"
)

func (*InstanceProfileBandwidthDependent) isaInstanceProfileBandwidth() bool {
	return true
}

// UnmarshalInstanceProfileBandwidthDependent unmarshals an instance of InstanceProfileBandwidthDependent from the specified map of raw messages.
func UnmarshalInstanceProfileBandwidthDependent(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfileBandwidthDependent)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfileBandwidthEnum : The permitted total bandwidth values (in megabits per second) shared across the network interfaces of an instance
// with this profile.
// This model "extends" InstanceProfileBandwidth
type InstanceProfileBandwidthEnum struct {
	// The default value for this profile field.
	Default *int64 `json:"default" validate:"required"`

	// The type for this profile field.
	Type *string `json:"type" validate:"required"`

	// The permitted values for this profile field.
	Values []int64 `json:"values" validate:"required"`
}

// Constants associated with the InstanceProfileBandwidthEnum.Type property.
// The type for this profile field.
const (
	InstanceProfileBandwidthEnumTypeEnumConst = "enum"
)

func (*InstanceProfileBandwidthEnum) isaInstanceProfileBandwidth() bool {
	return true
}

// UnmarshalInstanceProfileBandwidthEnum unmarshals an instance of InstanceProfileBandwidthEnum from the specified map of raw messages.
func UnmarshalInstanceProfileBandwidthEnum(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfileBandwidthEnum)
	err = core.UnmarshalPrimitive(m, "default", &obj.Default)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "values", &obj.Values)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfileBandwidthFixed : The total bandwidth (in megabits per second) shared across the network interfaces and storage volumes of an instance
// with this profile.
// This model "extends" InstanceProfileBandwidth
type InstanceProfileBandwidthFixed struct {
	// The type for this profile field.
	Type *string `json:"type" validate:"required"`

	// The value for this profile field.
	Value *int64 `json:"value" validate:"required"`
}

// Constants associated with the InstanceProfileBandwidthFixed.Type property.
// The type for this profile field.
const (
	InstanceProfileBandwidthFixedTypeFixedConst = "fixed"
)

func (*InstanceProfileBandwidthFixed) isaInstanceProfileBandwidth() bool {
	return true
}

// UnmarshalInstanceProfileBandwidthFixed unmarshals an instance of InstanceProfileBandwidthFixed from the specified map of raw messages.
func UnmarshalInstanceProfileBandwidthFixed(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfileBandwidthFixed)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "value", &obj.Value)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfileBandwidthRange : The permitted total bandwidth range (in megabits per second) shared across the network interfaces and storage volumes
// of an instance with this profile.
// This model "extends" InstanceProfileBandwidth
type InstanceProfileBandwidthRange struct {
	// The default value for this profile field.
	Default *int64 `json:"default" validate:"required"`

	// The maximum value for this profile field.
	Max *int64 `json:"max" validate:"required"`

	// The minimum value for this profile field.
	Min *int64 `json:"min" validate:"required"`

	// The increment step value for this profile field.
	Step *int64 `json:"step" validate:"required"`

	// The type for this profile field.
	Type *string `json:"type" validate:"required"`
}

// Constants associated with the InstanceProfileBandwidthRange.Type property.
// The type for this profile field.
const (
	InstanceProfileBandwidthRangeTypeRangeConst = "range"
)

func (*InstanceProfileBandwidthRange) isaInstanceProfileBandwidth() bool {
	return true
}

// UnmarshalInstanceProfileBandwidthRange unmarshals an instance of InstanceProfileBandwidthRange from the specified map of raw messages.
func UnmarshalInstanceProfileBandwidthRange(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfileBandwidthRange)
	err = core.UnmarshalPrimitive(m, "default", &obj.Default)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "max", &obj.Max)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "min", &obj.Min)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "step", &obj.Step)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfileDiskQuantityDependent : The number of disks of this configuration for an instance with this profile depends on its instance configuration.
// This model "extends" InstanceProfileDiskQuantity
type InstanceProfileDiskQuantityDependent struct {
	// The type for this profile field.
	Type *string `json:"type" validate:"required"`
}

// Constants associated with the InstanceProfileDiskQuantityDependent.Type property.
// The type for this profile field.
const (
	InstanceProfileDiskQuantityDependentTypeDependentConst = "dependent"
)

func (*InstanceProfileDiskQuantityDependent) isaInstanceProfileDiskQuantity() bool {
	return true
}

// UnmarshalInstanceProfileDiskQuantityDependent unmarshals an instance of InstanceProfileDiskQuantityDependent from the specified map of raw messages.
func UnmarshalInstanceProfileDiskQuantityDependent(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfileDiskQuantityDependent)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfileDiskQuantityEnum : The permitted the number of disks of this configuration for an instance with this profile.
// This model "extends" InstanceProfileDiskQuantity
type InstanceProfileDiskQuantityEnum struct {
	// The default value for this profile field.
	Default *int64 `json:"default" validate:"required"`

	// The type for this profile field.
	Type *string `json:"type" validate:"required"`

	// The permitted values for this profile field.
	Values []int64 `json:"values" validate:"required"`
}

// Constants associated with the InstanceProfileDiskQuantityEnum.Type property.
// The type for this profile field.
const (
	InstanceProfileDiskQuantityEnumTypeEnumConst = "enum"
)

func (*InstanceProfileDiskQuantityEnum) isaInstanceProfileDiskQuantity() bool {
	return true
}

// UnmarshalInstanceProfileDiskQuantityEnum unmarshals an instance of InstanceProfileDiskQuantityEnum from the specified map of raw messages.
func UnmarshalInstanceProfileDiskQuantityEnum(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfileDiskQuantityEnum)
	err = core.UnmarshalPrimitive(m, "default", &obj.Default)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "values", &obj.Values)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfileDiskQuantityFixed : The number of disks of this configuration for an instance with this profile.
// This model "extends" InstanceProfileDiskQuantity
type InstanceProfileDiskQuantityFixed struct {
	// The type for this profile field.
	Type *string `json:"type" validate:"required"`

	// The value for this profile field.
	Value *int64 `json:"value" validate:"required"`
}

// Constants associated with the InstanceProfileDiskQuantityFixed.Type property.
// The type for this profile field.
const (
	InstanceProfileDiskQuantityFixedTypeFixedConst = "fixed"
)

func (*InstanceProfileDiskQuantityFixed) isaInstanceProfileDiskQuantity() bool {
	return true
}

// UnmarshalInstanceProfileDiskQuantityFixed unmarshals an instance of InstanceProfileDiskQuantityFixed from the specified map of raw messages.
func UnmarshalInstanceProfileDiskQuantityFixed(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfileDiskQuantityFixed)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "value", &obj.Value)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfileDiskQuantityRange : The permitted range for the number of disks of this configuration for an instance with this profile.
// This model "extends" InstanceProfileDiskQuantity
type InstanceProfileDiskQuantityRange struct {
	// The default value for this profile field.
	Default *int64 `json:"default" validate:"required"`

	// The maximum value for this profile field.
	Max *int64 `json:"max" validate:"required"`

	// The minimum value for this profile field.
	Min *int64 `json:"min" validate:"required"`

	// The increment step value for this profile field.
	Step *int64 `json:"step" validate:"required"`

	// The type for this profile field.
	Type *string `json:"type" validate:"required"`
}

// Constants associated with the InstanceProfileDiskQuantityRange.Type property.
// The type for this profile field.
const (
	InstanceProfileDiskQuantityRangeTypeRangeConst = "range"
)

func (*InstanceProfileDiskQuantityRange) isaInstanceProfileDiskQuantity() bool {
	return true
}

// UnmarshalInstanceProfileDiskQuantityRange unmarshals an instance of InstanceProfileDiskQuantityRange from the specified map of raw messages.
func UnmarshalInstanceProfileDiskQuantityRange(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfileDiskQuantityRange)
	err = core.UnmarshalPrimitive(m, "default", &obj.Default)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "max", &obj.Max)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "min", &obj.Min)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "step", &obj.Step)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfileDiskSizeDependent : The disk size in GB (gigabytes) of this configuration for an instance with this profile depends on its instance
// configuration.
// This model "extends" InstanceProfileDiskSize
type InstanceProfileDiskSizeDependent struct {
	// The type for this profile field.
	Type *string `json:"type" validate:"required"`
}

// Constants associated with the InstanceProfileDiskSizeDependent.Type property.
// The type for this profile field.
const (
	InstanceProfileDiskSizeDependentTypeDependentConst = "dependent"
)

func (*InstanceProfileDiskSizeDependent) isaInstanceProfileDiskSize() bool {
	return true
}

// UnmarshalInstanceProfileDiskSizeDependent unmarshals an instance of InstanceProfileDiskSizeDependent from the specified map of raw messages.
func UnmarshalInstanceProfileDiskSizeDependent(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfileDiskSizeDependent)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfileDiskSizeEnum : The permitted disk size in GB (gigabytes) of this configuration for an instance with this profile.
// This model "extends" InstanceProfileDiskSize
type InstanceProfileDiskSizeEnum struct {
	// The default value for this profile field.
	Default *int64 `json:"default" validate:"required"`

	// The type for this profile field.
	Type *string `json:"type" validate:"required"`

	// The permitted values for this profile field.
	Values []int64 `json:"values" validate:"required"`
}

// Constants associated with the InstanceProfileDiskSizeEnum.Type property.
// The type for this profile field.
const (
	InstanceProfileDiskSizeEnumTypeEnumConst = "enum"
)

func (*InstanceProfileDiskSizeEnum) isaInstanceProfileDiskSize() bool {
	return true
}

// UnmarshalInstanceProfileDiskSizeEnum unmarshals an instance of InstanceProfileDiskSizeEnum from the specified map of raw messages.
func UnmarshalInstanceProfileDiskSizeEnum(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfileDiskSizeEnum)
	err = core.UnmarshalPrimitive(m, "default", &obj.Default)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "values", &obj.Values)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfileDiskSizeFixed : The size of the disk in GB (gigabytes).
// This model "extends" InstanceProfileDiskSize
type InstanceProfileDiskSizeFixed struct {
	// The type for this profile field.
	Type *string `json:"type" validate:"required"`

	// The value for this profile field.
	Value *int64 `json:"value" validate:"required"`
}

// Constants associated with the InstanceProfileDiskSizeFixed.Type property.
// The type for this profile field.
const (
	InstanceProfileDiskSizeFixedTypeFixedConst = "fixed"
)

func (*InstanceProfileDiskSizeFixed) isaInstanceProfileDiskSize() bool {
	return true
}

// UnmarshalInstanceProfileDiskSizeFixed unmarshals an instance of InstanceProfileDiskSizeFixed from the specified map of raw messages.
func UnmarshalInstanceProfileDiskSizeFixed(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfileDiskSizeFixed)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "value", &obj.Value)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfileDiskSizeRange : The permitted range for the disk size of this configuration in GB (gigabytes) for an instance with this profile.
// This model "extends" InstanceProfileDiskSize
type InstanceProfileDiskSizeRange struct {
	// The default value for this profile field.
	Default *int64 `json:"default" validate:"required"`

	// The maximum value for this profile field.
	Max *int64 `json:"max" validate:"required"`

	// The minimum value for this profile field.
	Min *int64 `json:"min" validate:"required"`

	// The increment step value for this profile field.
	Step *int64 `json:"step" validate:"required"`

	// The type for this profile field.
	Type *string `json:"type" validate:"required"`
}

// Constants associated with the InstanceProfileDiskSizeRange.Type property.
// The type for this profile field.
const (
	InstanceProfileDiskSizeRangeTypeRangeConst = "range"
)

func (*InstanceProfileDiskSizeRange) isaInstanceProfileDiskSize() bool {
	return true
}

// UnmarshalInstanceProfileDiskSizeRange unmarshals an instance of InstanceProfileDiskSizeRange from the specified map of raw messages.
func UnmarshalInstanceProfileDiskSizeRange(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfileDiskSizeRange)
	err = core.UnmarshalPrimitive(m, "default", &obj.Default)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "max", &obj.Max)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "min", &obj.Min)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "step", &obj.Step)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfileIdentityByHref : InstanceProfileIdentityByHref struct
// This model "extends" InstanceProfileIdentity
type InstanceProfileIdentityByHref struct {
	// The URL for this virtual server instance profile.
	Href *string `json:"href" validate:"required"`
}

// NewInstanceProfileIdentityByHref : Instantiate InstanceProfileIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewInstanceProfileIdentityByHref(href string) (model *InstanceProfileIdentityByHref, err error) {
	model = &InstanceProfileIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*InstanceProfileIdentityByHref) isaInstanceProfileIdentity() bool {
	return true
}

// UnmarshalInstanceProfileIdentityByHref unmarshals an instance of InstanceProfileIdentityByHref from the specified map of raw messages.
func UnmarshalInstanceProfileIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfileIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfileIdentityByName : InstanceProfileIdentityByName struct
// This model "extends" InstanceProfileIdentity
type InstanceProfileIdentityByName struct {
	// The globally unique name for this virtual server instance profile.
	Name *string `json:"name" validate:"required"`
}

// NewInstanceProfileIdentityByName : Instantiate InstanceProfileIdentityByName (Generic Model Constructor)
func (*VpcV1) NewInstanceProfileIdentityByName(name string) (model *InstanceProfileIdentityByName, err error) {
	model = &InstanceProfileIdentityByName{
		Name: core.StringPtr(name),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*InstanceProfileIdentityByName) isaInstanceProfileIdentity() bool {
	return true
}

// UnmarshalInstanceProfileIdentityByName unmarshals an instance of InstanceProfileIdentityByName from the specified map of raw messages.
func UnmarshalInstanceProfileIdentityByName(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfileIdentityByName)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfileMemoryDependent : The memory value for an instance with this profile depends on its configuration.
// This model "extends" InstanceProfileMemory
type InstanceProfileMemoryDependent struct {
	// The type for this profile field.
	Type *string `json:"type" validate:"required"`
}

// Constants associated with the InstanceProfileMemoryDependent.Type property.
// The type for this profile field.
const (
	InstanceProfileMemoryDependentTypeDependentConst = "dependent"
)

func (*InstanceProfileMemoryDependent) isaInstanceProfileMemory() bool {
	return true
}

// UnmarshalInstanceProfileMemoryDependent unmarshals an instance of InstanceProfileMemoryDependent from the specified map of raw messages.
func UnmarshalInstanceProfileMemoryDependent(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfileMemoryDependent)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfileMemoryEnum : The permitted memory values (in gibibytes) for an instance with this profile.
// This model "extends" InstanceProfileMemory
type InstanceProfileMemoryEnum struct {
	// The default value for this profile field.
	Default *int64 `json:"default" validate:"required"`

	// The type for this profile field.
	Type *string `json:"type" validate:"required"`

	// The permitted values for this profile field.
	Values []int64 `json:"values" validate:"required"`
}

// Constants associated with the InstanceProfileMemoryEnum.Type property.
// The type for this profile field.
const (
	InstanceProfileMemoryEnumTypeEnumConst = "enum"
)

func (*InstanceProfileMemoryEnum) isaInstanceProfileMemory() bool {
	return true
}

// UnmarshalInstanceProfileMemoryEnum unmarshals an instance of InstanceProfileMemoryEnum from the specified map of raw messages.
func UnmarshalInstanceProfileMemoryEnum(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfileMemoryEnum)
	err = core.UnmarshalPrimitive(m, "default", &obj.Default)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "values", &obj.Values)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfileMemoryFixed : The memory (in gibibytes) for an instance with this profile.
// This model "extends" InstanceProfileMemory
type InstanceProfileMemoryFixed struct {
	// The type for this profile field.
	Type *string `json:"type" validate:"required"`

	// The value for this profile field.
	Value *int64 `json:"value" validate:"required"`
}

// Constants associated with the InstanceProfileMemoryFixed.Type property.
// The type for this profile field.
const (
	InstanceProfileMemoryFixedTypeFixedConst = "fixed"
)

func (*InstanceProfileMemoryFixed) isaInstanceProfileMemory() bool {
	return true
}

// UnmarshalInstanceProfileMemoryFixed unmarshals an instance of InstanceProfileMemoryFixed from the specified map of raw messages.
func UnmarshalInstanceProfileMemoryFixed(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfileMemoryFixed)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "value", &obj.Value)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfileMemoryRange : The permitted memory range (in gibibytes) for an instance with this profile.
// This model "extends" InstanceProfileMemory
type InstanceProfileMemoryRange struct {
	// The default value for this profile field.
	Default *int64 `json:"default" validate:"required"`

	// The maximum value for this profile field.
	Max *int64 `json:"max" validate:"required"`

	// The minimum value for this profile field.
	Min *int64 `json:"min" validate:"required"`

	// The increment step value for this profile field.
	Step *int64 `json:"step" validate:"required"`

	// The type for this profile field.
	Type *string `json:"type" validate:"required"`
}

// Constants associated with the InstanceProfileMemoryRange.Type property.
// The type for this profile field.
const (
	InstanceProfileMemoryRangeTypeRangeConst = "range"
)

func (*InstanceProfileMemoryRange) isaInstanceProfileMemory() bool {
	return true
}

// UnmarshalInstanceProfileMemoryRange unmarshals an instance of InstanceProfileMemoryRange from the specified map of raw messages.
func UnmarshalInstanceProfileMemoryRange(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfileMemoryRange)
	err = core.UnmarshalPrimitive(m, "default", &obj.Default)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "max", &obj.Max)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "min", &obj.Min)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "step", &obj.Step)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfilePortSpeedDependent : The port speed of each network interface of an instance with this profile depends on its configuration.
// This model "extends" InstanceProfilePortSpeed
type InstanceProfilePortSpeedDependent struct {
	// The type for this profile field.
	Type *string `json:"type" validate:"required"`
}

// Constants associated with the InstanceProfilePortSpeedDependent.Type property.
// The type for this profile field.
const (
	InstanceProfilePortSpeedDependentTypeDependentConst = "dependent"
)

func (*InstanceProfilePortSpeedDependent) isaInstanceProfilePortSpeed() bool {
	return true
}

// UnmarshalInstanceProfilePortSpeedDependent unmarshals an instance of InstanceProfilePortSpeedDependent from the specified map of raw messages.
func UnmarshalInstanceProfilePortSpeedDependent(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfilePortSpeedDependent)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfilePortSpeedFixed : The maximum speed (in megabits per second) of each network interface of an instance with this profile.
// This model "extends" InstanceProfilePortSpeed
type InstanceProfilePortSpeedFixed struct {
	// The type for this profile field.
	Type *string `json:"type" validate:"required"`

	// The value for this profile field.
	Value *int64 `json:"value" validate:"required"`
}

// Constants associated with the InstanceProfilePortSpeedFixed.Type property.
// The type for this profile field.
const (
	InstanceProfilePortSpeedFixedTypeFixedConst = "fixed"
)

func (*InstanceProfilePortSpeedFixed) isaInstanceProfilePortSpeed() bool {
	return true
}

// UnmarshalInstanceProfilePortSpeedFixed unmarshals an instance of InstanceProfilePortSpeedFixed from the specified map of raw messages.
func UnmarshalInstanceProfilePortSpeedFixed(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfilePortSpeedFixed)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "value", &obj.Value)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfileVcpuDependent : The VCPU count for an instance with this profile depends on its configuration.
// This model "extends" InstanceProfileVcpu
type InstanceProfileVcpuDependent struct {
	// The type for this profile field.
	Type *string `json:"type" validate:"required"`
}

// Constants associated with the InstanceProfileVcpuDependent.Type property.
// The type for this profile field.
const (
	InstanceProfileVcpuDependentTypeDependentConst = "dependent"
)

func (*InstanceProfileVcpuDependent) isaInstanceProfileVcpu() bool {
	return true
}

// UnmarshalInstanceProfileVcpuDependent unmarshals an instance of InstanceProfileVcpuDependent from the specified map of raw messages.
func UnmarshalInstanceProfileVcpuDependent(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfileVcpuDependent)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfileVcpuEnum : The permitted values for VCPU count for an instance with this profile.
// This model "extends" InstanceProfileVcpu
type InstanceProfileVcpuEnum struct {
	// The default value for this profile field.
	Default *int64 `json:"default" validate:"required"`

	// The type for this profile field.
	Type *string `json:"type" validate:"required"`

	// The permitted values for this profile field.
	Values []int64 `json:"values" validate:"required"`
}

// Constants associated with the InstanceProfileVcpuEnum.Type property.
// The type for this profile field.
const (
	InstanceProfileVcpuEnumTypeEnumConst = "enum"
)

func (*InstanceProfileVcpuEnum) isaInstanceProfileVcpu() bool {
	return true
}

// UnmarshalInstanceProfileVcpuEnum unmarshals an instance of InstanceProfileVcpuEnum from the specified map of raw messages.
func UnmarshalInstanceProfileVcpuEnum(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfileVcpuEnum)
	err = core.UnmarshalPrimitive(m, "default", &obj.Default)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "values", &obj.Values)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfileVcpuFixed : The VCPU count for an instance with this profile.
// This model "extends" InstanceProfileVcpu
type InstanceProfileVcpuFixed struct {
	// The type for this profile field.
	Type *string `json:"type" validate:"required"`

	// The value for this profile field.
	Value *int64 `json:"value" validate:"required"`
}

// Constants associated with the InstanceProfileVcpuFixed.Type property.
// The type for this profile field.
const (
	InstanceProfileVcpuFixedTypeFixedConst = "fixed"
)

func (*InstanceProfileVcpuFixed) isaInstanceProfileVcpu() bool {
	return true
}

// UnmarshalInstanceProfileVcpuFixed unmarshals an instance of InstanceProfileVcpuFixed from the specified map of raw messages.
func UnmarshalInstanceProfileVcpuFixed(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfileVcpuFixed)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "value", &obj.Value)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceProfileVcpuRange : The permitted range for VCPU count for an instance with this profile.
// This model "extends" InstanceProfileVcpu
type InstanceProfileVcpuRange struct {
	// The default value for this profile field.
	Default *int64 `json:"default" validate:"required"`

	// The maximum value for this profile field.
	Max *int64 `json:"max" validate:"required"`

	// The minimum value for this profile field.
	Min *int64 `json:"min" validate:"required"`

	// The increment step value for this profile field.
	Step *int64 `json:"step" validate:"required"`

	// The type for this profile field.
	Type *string `json:"type" validate:"required"`
}

// Constants associated with the InstanceProfileVcpuRange.Type property.
// The type for this profile field.
const (
	InstanceProfileVcpuRangeTypeRangeConst = "range"
)

func (*InstanceProfileVcpuRange) isaInstanceProfileVcpu() bool {
	return true
}

// UnmarshalInstanceProfileVcpuRange unmarshals an instance of InstanceProfileVcpuRange from the specified map of raw messages.
func UnmarshalInstanceProfileVcpuRange(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceProfileVcpuRange)
	err = core.UnmarshalPrimitive(m, "default", &obj.Default)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "max", &obj.Max)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "min", &obj.Min)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "step", &obj.Step)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstancePrototypeInstanceByImage : InstancePrototypeInstanceByImage struct
// This model "extends" InstancePrototype
type InstancePrototypeInstanceByImage struct {
	// The public SSH keys for the administrative user of the virtual server instance. Up to 10 keys may be provided; if no
	// keys are provided the instance will be inaccessible unless the image used provides another means of access. For
	// Windows instances, one of the keys will be used to encrypt the administrator password.
	//
	// Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled images,
	// these keys will also be added as SSH authorized keys for the administrative user.
	Keys []KeyIdentityIntf `json:"keys,omitempty"`

	// The unique user-defined name for this virtual server instance (and default system hostname). If unspecified, the
	// name will be a hyphenated list of randomly-selected words.
	Name *string `json:"name,omitempty"`

	// Collection of additional network interfaces to create for the virtual server instance.
	NetworkInterfaces []NetworkInterfacePrototype `json:"network_interfaces,omitempty"`

	// The placement restrictions to use for the virtual server instance.
	PlacementTarget InstancePlacementTargetPrototypeIntf `json:"placement_target,omitempty"`

	// The profile to use for this virtual server instance.
	Profile InstanceProfileIdentityIntf `json:"profile,omitempty"`

	ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`

	// User data to be made available when setting up the virtual server instance.
	UserData *string `json:"user_data,omitempty"`

	// Collection of volume attachments.
	VolumeAttachments []VolumeAttachmentPrototypeInstanceContext `json:"volume_attachments,omitempty"`

	// The VPC the virtual server instance is to be a part of. If provided, must match the VPC tied to the subnets of the
	// instance's network interfaces.
	VPC VPCIdentityIntf `json:"vpc,omitempty"`

	// The boot volume attachment for the virtual server instance.
	BootVolumeAttachment *VolumeAttachmentPrototypeInstanceByImageContext `json:"boot_volume_attachment,omitempty"`

	// The identity of the image to use when provisioning the virtual server instance.
	Image ImageIdentityIntf `json:"image" validate:"required"`

	// Primary network interface.
	PrimaryNetworkInterface *NetworkInterfacePrototype `json:"primary_network_interface" validate:"required"`

	// The zone this virtual server instance will reside in.
	Zone ZoneIdentityIntf `json:"zone" validate:"required"`
}

// NewInstancePrototypeInstanceByImage : Instantiate InstancePrototypeInstanceByImage (Generic Model Constructor)
func (*VpcV1) NewInstancePrototypeInstanceByImage(image ImageIdentityIntf, primaryNetworkInterface *NetworkInterfacePrototype, zone ZoneIdentityIntf) (model *InstancePrototypeInstanceByImage, err error) {
	model = &InstancePrototypeInstanceByImage{
		Image:                   image,
		PrimaryNetworkInterface: primaryNetworkInterface,
		Zone:                    zone,
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*InstancePrototypeInstanceByImage) isaInstancePrototype() bool {
	return true
}

// UnmarshalInstancePrototypeInstanceByImage unmarshals an instance of InstancePrototypeInstanceByImage from the specified map of raw messages.
func UnmarshalInstancePrototypeInstanceByImage(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstancePrototypeInstanceByImage)
	err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototypeInstanceContext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstancePrototypeInstanceBySourceTemplate : InstancePrototypeInstanceBySourceTemplate struct
// This model "extends" InstancePrototype
type InstancePrototypeInstanceBySourceTemplate struct {
	// The public SSH keys for the administrative user of the virtual server instance. Up to 10 keys may be provided; if no
	// keys are provided the instance will be inaccessible unless the image used provides another means of access. For
	// Windows instances, one of the keys will be used to encrypt the administrator password.
	//
	// Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled images,
	// these keys will also be added as SSH authorized keys for the administrative user.
	Keys []KeyIdentityIntf `json:"keys,omitempty"`

	// The unique user-defined name for this virtual server instance (and default system hostname). If unspecified, the
	// name will be a hyphenated list of randomly-selected words.
	Name *string `json:"name,omitempty"`

	// Collection of additional network interfaces to create for the virtual server instance.
	NetworkInterfaces []NetworkInterfacePrototype `json:"network_interfaces,omitempty"`

	// The placement restrictions to use for the virtual server instance.
	PlacementTarget InstancePlacementTargetPrototypeIntf `json:"placement_target,omitempty"`

	// The profile to use for this virtual server instance.
	Profile InstanceProfileIdentityIntf `json:"profile,omitempty"`

	ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`

	// User data to be made available when setting up the virtual server instance.
	UserData *string `json:"user_data,omitempty"`

	// Collection of volume attachments.
	VolumeAttachments []VolumeAttachmentPrototypeInstanceContext `json:"volume_attachments,omitempty"`

	// The VPC the virtual server instance is to be a part of. If provided, must match the VPC tied to the subnets of the
	// instance's network interfaces.
	VPC VPCIdentityIntf `json:"vpc,omitempty"`

	// The boot volume attachment for the virtual server instance.
	BootVolumeAttachment *VolumeAttachmentPrototypeInstanceByImageContext `json:"boot_volume_attachment,omitempty"`

	// The identity of the image to use when provisioning the virtual server instance.
	Image ImageIdentityIntf `json:"image,omitempty"`

	// Primary network interface.
	PrimaryNetworkInterface *NetworkInterfacePrototype `json:"primary_network_interface,omitempty"`

	// Identifies an instance template by a unique property.
	SourceTemplate InstanceTemplateIdentityIntf `json:"source_template" validate:"required"`

	// The zone this virtual server instance will reside in.
	Zone ZoneIdentityIntf `json:"zone,omitempty"`
}

// NewInstancePrototypeInstanceBySourceTemplate : Instantiate InstancePrototypeInstanceBySourceTemplate (Generic Model Constructor)
func (*VpcV1) NewInstancePrototypeInstanceBySourceTemplate(sourceTemplate InstanceTemplateIdentityIntf) (model *InstancePrototypeInstanceBySourceTemplate, err error) {
	model = &InstancePrototypeInstanceBySourceTemplate{
		SourceTemplate: sourceTemplate,
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*InstancePrototypeInstanceBySourceTemplate) isaInstancePrototype() bool {
	return true
}

// UnmarshalInstancePrototypeInstanceBySourceTemplate unmarshals an instance of InstancePrototypeInstanceBySourceTemplate from the specified map of raw messages.
func UnmarshalInstancePrototypeInstanceBySourceTemplate(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstancePrototypeInstanceBySourceTemplate)
	err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototypeInstanceContext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "source_template", &obj.SourceTemplate, UnmarshalInstanceTemplateIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceTemplateIdentityByCRN : InstanceTemplateIdentityByCRN struct
// This model "extends" InstanceTemplateIdentity
type InstanceTemplateIdentityByCRN struct {
	// The CRN for this instance template.
	CRN *string `json:"crn" validate:"required"`
}

// NewInstanceTemplateIdentityByCRN : Instantiate InstanceTemplateIdentityByCRN (Generic Model Constructor)
func (*VpcV1) NewInstanceTemplateIdentityByCRN(crn string) (model *InstanceTemplateIdentityByCRN, err error) {
	model = &InstanceTemplateIdentityByCRN{
		CRN: core.StringPtr(crn),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*InstanceTemplateIdentityByCRN) isaInstanceTemplateIdentity() bool {
	return true
}

// UnmarshalInstanceTemplateIdentityByCRN unmarshals an instance of InstanceTemplateIdentityByCRN from the specified map of raw messages.
func UnmarshalInstanceTemplateIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceTemplateIdentityByCRN)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceTemplateIdentityByHref : InstanceTemplateIdentityByHref struct
// This model "extends" InstanceTemplateIdentity
type InstanceTemplateIdentityByHref struct {
	// The URL for this instance template.
	Href *string `json:"href" validate:"required"`
}

// NewInstanceTemplateIdentityByHref : Instantiate InstanceTemplateIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewInstanceTemplateIdentityByHref(href string) (model *InstanceTemplateIdentityByHref, err error) {
	model = &InstanceTemplateIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*InstanceTemplateIdentityByHref) isaInstanceTemplateIdentity() bool {
	return true
}

// UnmarshalInstanceTemplateIdentityByHref unmarshals an instance of InstanceTemplateIdentityByHref from the specified map of raw messages.
func UnmarshalInstanceTemplateIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceTemplateIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceTemplateIdentityByID : InstanceTemplateIdentityByID struct
// This model "extends" InstanceTemplateIdentity
type InstanceTemplateIdentityByID struct {
	// The unique identifier for this instance template.
	ID *string `json:"id" validate:"required"`
}

// NewInstanceTemplateIdentityByID : Instantiate InstanceTemplateIdentityByID (Generic Model Constructor)
func (*VpcV1) NewInstanceTemplateIdentityByID(id string) (model *InstanceTemplateIdentityByID, err error) {
	model = &InstanceTemplateIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*InstanceTemplateIdentityByID) isaInstanceTemplateIdentity() bool {
	return true
}

// UnmarshalInstanceTemplateIdentityByID unmarshals an instance of InstanceTemplateIdentityByID from the specified map of raw messages.
func UnmarshalInstanceTemplateIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceTemplateIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceTemplatePrototypeInstanceByImage : InstanceTemplatePrototypeInstanceByImage struct
// This model "extends" InstanceTemplatePrototype
type InstanceTemplatePrototypeInstanceByImage struct {
	// The public SSH keys for the administrative user of the virtual server instance. Up to 10 keys may be provided; if no
	// keys are provided the instance will be inaccessible unless the image used provides another means of access. For
	// Windows instances, one of the keys will be used to encrypt the administrator password.
	//
	// Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled images,
	// these keys will also be added as SSH authorized keys for the administrative user.
	Keys []KeyIdentityIntf `json:"keys,omitempty"`

	// The unique user-defined name for this virtual server instance (and default system hostname). If unspecified, the
	// name will be a hyphenated list of randomly-selected words.
	Name *string `json:"name,omitempty"`

	// Collection of additional network interfaces to create for the virtual server instance.
	NetworkInterfaces []NetworkInterfacePrototype `json:"network_interfaces,omitempty"`

	// The placement restrictions to use for the virtual server instance.
	PlacementTarget InstancePlacementTargetPrototypeIntf `json:"placement_target,omitempty"`

	// The profile to use for this virtual server instance.
	Profile InstanceProfileIdentityIntf `json:"profile,omitempty"`

	ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`

	// User data to be made available when setting up the virtual server instance.
	UserData *string `json:"user_data,omitempty"`

	// Collection of volume attachments.
	VolumeAttachments []VolumeAttachmentPrototypeInstanceContext `json:"volume_attachments,omitempty"`

	// The VPC the virtual server instance is to be a part of. If provided, must match the VPC tied to the subnets of the
	// instance's network interfaces.
	VPC VPCIdentityIntf `json:"vpc,omitempty"`

	// The boot volume attachment for the virtual server instance.
	BootVolumeAttachment *VolumeAttachmentPrototypeInstanceByImageContext `json:"boot_volume_attachment,omitempty"`

	// The identity of the image to use when provisioning the virtual server instance.
	Image ImageIdentityIntf `json:"image" validate:"required"`

	// Primary network interface.
	PrimaryNetworkInterface *NetworkInterfacePrototype `json:"primary_network_interface" validate:"required"`

	// The zone this virtual server instance will reside in.
	Zone ZoneIdentityIntf `json:"zone" validate:"required"`
}

// NewInstanceTemplatePrototypeInstanceByImage : Instantiate InstanceTemplatePrototypeInstanceByImage (Generic Model Constructor)
func (*VpcV1) NewInstanceTemplatePrototypeInstanceByImage(image ImageIdentityIntf, primaryNetworkInterface *NetworkInterfacePrototype, zone ZoneIdentityIntf) (model *InstanceTemplatePrototypeInstanceByImage, err error) {
	model = &InstanceTemplatePrototypeInstanceByImage{
		Image:                   image,
		PrimaryNetworkInterface: primaryNetworkInterface,
		Zone:                    zone,
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*InstanceTemplatePrototypeInstanceByImage) isaInstanceTemplatePrototype() bool {
	return true
}

// UnmarshalInstanceTemplatePrototypeInstanceByImage unmarshals an instance of InstanceTemplatePrototypeInstanceByImage from the specified map of raw messages.
func UnmarshalInstanceTemplatePrototypeInstanceByImage(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceTemplatePrototypeInstanceByImage)
	err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototypeInstanceContext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceTemplatePrototypeInstanceBySourceTemplate : InstanceTemplatePrototypeInstanceBySourceTemplate struct
// This model "extends" InstanceTemplatePrototype
type InstanceTemplatePrototypeInstanceBySourceTemplate struct {
	// The public SSH keys for the administrative user of the virtual server instance. Up to 10 keys may be provided; if no
	// keys are provided the instance will be inaccessible unless the image used provides another means of access. For
	// Windows instances, one of the keys will be used to encrypt the administrator password.
	//
	// Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled images,
	// these keys will also be added as SSH authorized keys for the administrative user.
	Keys []KeyIdentityIntf `json:"keys,omitempty"`

	// The unique user-defined name for this virtual server instance (and default system hostname). If unspecified, the
	// name will be a hyphenated list of randomly-selected words.
	Name *string `json:"name,omitempty"`

	// Collection of additional network interfaces to create for the virtual server instance.
	NetworkInterfaces []NetworkInterfacePrototype `json:"network_interfaces,omitempty"`

	// The placement restrictions to use for the virtual server instance.
	PlacementTarget InstancePlacementTargetPrototypeIntf `json:"placement_target,omitempty"`

	// The profile to use for this virtual server instance.
	Profile InstanceProfileIdentityIntf `json:"profile,omitempty"`

	ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`

	// User data to be made available when setting up the virtual server instance.
	UserData *string `json:"user_data,omitempty"`

	// Collection of volume attachments.
	VolumeAttachments []VolumeAttachmentPrototypeInstanceContext `json:"volume_attachments,omitempty"`

	// The VPC the virtual server instance is to be a part of. If provided, must match the VPC tied to the subnets of the
	// instance's network interfaces.
	VPC VPCIdentityIntf `json:"vpc,omitempty"`

	// The boot volume attachment for the virtual server instance.
	BootVolumeAttachment *VolumeAttachmentPrototypeInstanceByImageContext `json:"boot_volume_attachment,omitempty"`

	// The identity of the image to use when provisioning the virtual server instance.
	Image ImageIdentityIntf `json:"image,omitempty"`

	// Primary network interface.
	PrimaryNetworkInterface *NetworkInterfacePrototype `json:"primary_network_interface,omitempty"`

	// Identifies an instance template by a unique property.
	SourceTemplate InstanceTemplateIdentityIntf `json:"source_template" validate:"required"`

	// The zone this virtual server instance will reside in.
	Zone ZoneIdentityIntf `json:"zone,omitempty"`
}

// NewInstanceTemplatePrototypeInstanceBySourceTemplate : Instantiate InstanceTemplatePrototypeInstanceBySourceTemplate (Generic Model Constructor)
func (*VpcV1) NewInstanceTemplatePrototypeInstanceBySourceTemplate(sourceTemplate InstanceTemplateIdentityIntf) (model *InstanceTemplatePrototypeInstanceBySourceTemplate, err error) {
	model = &InstanceTemplatePrototypeInstanceBySourceTemplate{
		SourceTemplate: sourceTemplate,
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*InstanceTemplatePrototypeInstanceBySourceTemplate) isaInstanceTemplatePrototype() bool {
	return true
}

// UnmarshalInstanceTemplatePrototypeInstanceBySourceTemplate unmarshals an instance of InstanceTemplatePrototypeInstanceBySourceTemplate from the specified map of raw messages.
func UnmarshalInstanceTemplatePrototypeInstanceBySourceTemplate(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceTemplatePrototypeInstanceBySourceTemplate)
	err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototypeInstanceContext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "source_template", &obj.SourceTemplate, UnmarshalInstanceTemplateIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceTemplateInstanceByImage : InstanceTemplateInstanceByImage struct
// This model "extends" InstanceTemplate
type InstanceTemplateInstanceByImage struct {
	// The date and time that the instance template was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The CRN for this instance template.
	CRN *string `json:"crn" validate:"required"`

	// The URL for this instance template.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this instance template.
	ID *string `json:"id" validate:"required"`

	// The public SSH keys for the administrative user of the virtual server instance. Up to 10 keys may be provided; if no
	// keys are provided the instance will be inaccessible unless the image used provides another means of access. For
	// Windows instances, one of the keys will be used to encrypt the administrator password.
	//
	// Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled images,
	// these keys will also be added as SSH authorized keys for the administrative user.
	Keys []KeyIdentityIntf `json:"keys,omitempty"`

	// The unique user-defined name for this instance template.
	Name *string `json:"name" validate:"required"`

	// Collection of additional network interfaces to create for the virtual server instance.
	NetworkInterfaces []NetworkInterfacePrototype `json:"network_interfaces,omitempty"`

	// The placement restrictions to use for the virtual server instance.
	PlacementTarget InstancePlacementTargetPrototypeIntf `json:"placement_target,omitempty"`

	// The profile to use for this virtual server instance.
	Profile InstanceProfileIdentityIntf `json:"profile,omitempty"`

	// The resource group for this instance template.
	ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`

	// User data to be made available when setting up the virtual server instance.
	UserData *string `json:"user_data,omitempty"`

	// Collection of volume attachments.
	VolumeAttachments []VolumeAttachmentPrototypeInstanceContext `json:"volume_attachments,omitempty"`

	// The VPC the virtual server instance is to be a part of. If provided, must match the VPC tied to the subnets of the
	// instance's network interfaces.
	VPC VPCIdentityIntf `json:"vpc,omitempty"`

	// The boot volume attachment for the virtual server instance.
	BootVolumeAttachment *VolumeAttachmentPrototypeInstanceByImageContext `json:"boot_volume_attachment,omitempty"`

	// The identity of the image to use when provisioning the virtual server instance.
	Image ImageIdentityIntf `json:"image" validate:"required"`

	// Primary network interface.
	PrimaryNetworkInterface *NetworkInterfacePrototype `json:"primary_network_interface" validate:"required"`

	// The zone this virtual server instance will reside in.
	Zone ZoneIdentityIntf `json:"zone" validate:"required"`
}

func (*InstanceTemplateInstanceByImage) isaInstanceTemplate() bool {
	return true
}

// UnmarshalInstanceTemplateInstanceByImage unmarshals an instance of InstanceTemplateInstanceByImage from the specified map of raw messages.
func UnmarshalInstanceTemplateInstanceByImage(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceTemplateInstanceByImage)
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototypeInstanceContext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceTemplateInstanceBySourceTemplate : InstanceTemplateInstanceBySourceTemplate struct
// This model "extends" InstanceTemplate
type InstanceTemplateInstanceBySourceTemplate struct {
	// The date and time that the instance template was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The CRN for this instance template.
	CRN *string `json:"crn" validate:"required"`

	// The URL for this instance template.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this instance template.
	ID *string `json:"id" validate:"required"`

	// The public SSH keys for the administrative user of the virtual server instance. Up to 10 keys may be provided; if no
	// keys are provided the instance will be inaccessible unless the image used provides another means of access. For
	// Windows instances, one of the keys will be used to encrypt the administrator password.
	//
	// Keys will be made available to the virtual server instance as cloud-init vendor data. For cloud-init enabled images,
	// these keys will also be added as SSH authorized keys for the administrative user.
	Keys []KeyIdentityIntf `json:"keys,omitempty"`

	// The unique user-defined name for this instance template.
	Name *string `json:"name" validate:"required"`

	// Collection of additional network interfaces to create for the virtual server instance.
	NetworkInterfaces []NetworkInterfacePrototype `json:"network_interfaces,omitempty"`

	// The placement restrictions to use for the virtual server instance.
	PlacementTarget InstancePlacementTargetPrototypeIntf `json:"placement_target,omitempty"`

	// The profile to use for this virtual server instance.
	Profile InstanceProfileIdentityIntf `json:"profile,omitempty"`

	// The resource group for this instance template.
	ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`

	// User data to be made available when setting up the virtual server instance.
	UserData *string `json:"user_data,omitempty"`

	// Collection of volume attachments.
	VolumeAttachments []VolumeAttachmentPrototypeInstanceContext `json:"volume_attachments,omitempty"`

	// The VPC the virtual server instance is to be a part of. If provided, must match the VPC tied to the subnets of the
	// instance's network interfaces.
	VPC VPCIdentityIntf `json:"vpc,omitempty"`

	// The boot volume attachment for the virtual server instance.
	BootVolumeAttachment *VolumeAttachmentPrototypeInstanceByImageContext `json:"boot_volume_attachment,omitempty"`

	// The identity of the image to use when provisioning the virtual server instance.
	Image ImageIdentityIntf `json:"image,omitempty"`

	// Primary network interface.
	PrimaryNetworkInterface *NetworkInterfacePrototype `json:"primary_network_interface,omitempty"`

	// Identifies an instance template by a unique property.
	SourceTemplate InstanceTemplateIdentityIntf `json:"source_template" validate:"required"`

	// The zone this virtual server instance will reside in.
	Zone ZoneIdentityIntf `json:"zone,omitempty"`
}

func (*InstanceTemplateInstanceBySourceTemplate) isaInstanceTemplate() bool {
	return true
}

// UnmarshalInstanceTemplateInstanceBySourceTemplate unmarshals an instance of InstanceTemplateInstanceBySourceTemplate from the specified map of raw messages.
func UnmarshalInstanceTemplateInstanceBySourceTemplate(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceTemplateInstanceBySourceTemplate)
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototypeInstanceContext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "source_template", &obj.SourceTemplate, UnmarshalInstanceTemplateIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// KeyIdentityByCRN : KeyIdentityByCRN struct
// This model "extends" KeyIdentity
type KeyIdentityByCRN struct {
	// The CRN for this key.
	CRN *string `json:"crn" validate:"required"`
}

// NewKeyIdentityByCRN : Instantiate KeyIdentityByCRN (Generic Model Constructor)
func (*VpcV1) NewKeyIdentityByCRN(crn string) (model *KeyIdentityByCRN, err error) {
	model = &KeyIdentityByCRN{
		CRN: core.StringPtr(crn),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*KeyIdentityByCRN) isaKeyIdentity() bool {
	return true
}

// UnmarshalKeyIdentityByCRN unmarshals an instance of KeyIdentityByCRN from the specified map of raw messages.
func UnmarshalKeyIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(KeyIdentityByCRN)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// KeyIdentityByHref : KeyIdentityByHref struct
// This model "extends" KeyIdentity
type KeyIdentityByHref struct {
	// The URL for this key.
	Href *string `json:"href" validate:"required"`
}

// NewKeyIdentityByHref : Instantiate KeyIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewKeyIdentityByHref(href string) (model *KeyIdentityByHref, err error) {
	model = &KeyIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*KeyIdentityByHref) isaKeyIdentity() bool {
	return true
}

// UnmarshalKeyIdentityByHref unmarshals an instance of KeyIdentityByHref from the specified map of raw messages.
func UnmarshalKeyIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(KeyIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// KeyIdentityByID : KeyIdentityByID struct
// This model "extends" KeyIdentity
type KeyIdentityByID struct {
	// The unique identifier for this key.
	ID *string `json:"id" validate:"required"`
}

// NewKeyIdentityByID : Instantiate KeyIdentityByID (Generic Model Constructor)
func (*VpcV1) NewKeyIdentityByID(id string) (model *KeyIdentityByID, err error) {
	model = &KeyIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*KeyIdentityByID) isaKeyIdentity() bool {
	return true
}

// UnmarshalKeyIdentityByID unmarshals an instance of KeyIdentityByID from the specified map of raw messages.
func UnmarshalKeyIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(KeyIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// KeyIdentityKeyIdentityByFingerprint : KeyIdentityKeyIdentityByFingerprint struct
// This model "extends" KeyIdentity
type KeyIdentityKeyIdentityByFingerprint struct {
	// The fingerprint for this key.  The value is returned base64-encoded and prefixed with the hash algorithm (always
	// `SHA256`).
	Fingerprint *string `json:"fingerprint" validate:"required"`
}

// NewKeyIdentityKeyIdentityByFingerprint : Instantiate KeyIdentityKeyIdentityByFingerprint (Generic Model Constructor)
func (*VpcV1) NewKeyIdentityKeyIdentityByFingerprint(fingerprint string) (model *KeyIdentityKeyIdentityByFingerprint, err error) {
	model = &KeyIdentityKeyIdentityByFingerprint{
		Fingerprint: core.StringPtr(fingerprint),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*KeyIdentityKeyIdentityByFingerprint) isaKeyIdentity() bool {
	return true
}

// UnmarshalKeyIdentityKeyIdentityByFingerprint unmarshals an instance of KeyIdentityKeyIdentityByFingerprint from the specified map of raw messages.
func UnmarshalKeyIdentityKeyIdentityByFingerprint(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(KeyIdentityKeyIdentityByFingerprint)
	err = core.UnmarshalPrimitive(m, "fingerprint", &obj.Fingerprint)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// KeyReferenceInstanceInitializationContextKeyIdentityByFingerprint : KeyReferenceInstanceInitializationContextKeyIdentityByFingerprint struct
// This model "extends" KeyReferenceInstanceInitializationContext
type KeyReferenceInstanceInitializationContextKeyIdentityByFingerprint struct {
	// The fingerprint for this key.  The value is returned base64-encoded and prefixed with the hash algorithm (always
	// `SHA256`).
	Fingerprint *string `json:"fingerprint" validate:"required"`
}

func (*KeyReferenceInstanceInitializationContextKeyIdentityByFingerprint) isaKeyReferenceInstanceInitializationContext() bool {
	return true
}

// UnmarshalKeyReferenceInstanceInitializationContextKeyIdentityByFingerprint unmarshals an instance of KeyReferenceInstanceInitializationContextKeyIdentityByFingerprint from the specified map of raw messages.
func UnmarshalKeyReferenceInstanceInitializationContextKeyIdentityByFingerprint(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(KeyReferenceInstanceInitializationContextKeyIdentityByFingerprint)
	err = core.UnmarshalPrimitive(m, "fingerprint", &obj.Fingerprint)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// KeyReferenceInstanceInitializationContextKeyReference : KeyReferenceInstanceInitializationContextKeyReference struct
// This model "extends" KeyReferenceInstanceInitializationContext
type KeyReferenceInstanceInitializationContextKeyReference struct {
	// The CRN for this key.
	CRN *string `json:"crn" validate:"required"`

	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *KeyReferenceDeleted `json:"deleted,omitempty"`

	// The fingerprint for this key.  The value is returned base64-encoded and prefixed with the hash algorithm (always
	// `SHA256`).
	Fingerprint *string `json:"fingerprint" validate:"required"`

	// The URL for this key.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this key.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this key.
	Name *string `json:"name" validate:"required"`
}

func (*KeyReferenceInstanceInitializationContextKeyReference) isaKeyReferenceInstanceInitializationContext() bool {
	return true
}

// UnmarshalKeyReferenceInstanceInitializationContextKeyReference unmarshals an instance of KeyReferenceInstanceInitializationContextKeyReference from the specified map of raw messages.
func UnmarshalKeyReferenceInstanceInitializationContextKeyReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(KeyReferenceInstanceInitializationContextKeyReference)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalKeyReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "fingerprint", &obj.Fingerprint)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerIdentityByCRN : LoadBalancerIdentityByCRN struct
// This model "extends" LoadBalancerIdentity
type LoadBalancerIdentityByCRN struct {
	// The load balancer's CRN.
	CRN *string `json:"crn" validate:"required"`
}

// NewLoadBalancerIdentityByCRN : Instantiate LoadBalancerIdentityByCRN (Generic Model Constructor)
func (*VpcV1) NewLoadBalancerIdentityByCRN(crn string) (model *LoadBalancerIdentityByCRN, err error) {
	model = &LoadBalancerIdentityByCRN{
		CRN: core.StringPtr(crn),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*LoadBalancerIdentityByCRN) isaLoadBalancerIdentity() bool {
	return true
}

// UnmarshalLoadBalancerIdentityByCRN unmarshals an instance of LoadBalancerIdentityByCRN from the specified map of raw messages.
func UnmarshalLoadBalancerIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerIdentityByCRN)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerIdentityByHref : LoadBalancerIdentityByHref struct
// This model "extends" LoadBalancerIdentity
type LoadBalancerIdentityByHref struct {
	// The load balancer's canonical URL.
	Href *string `json:"href" validate:"required"`
}

// NewLoadBalancerIdentityByHref : Instantiate LoadBalancerIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewLoadBalancerIdentityByHref(href string) (model *LoadBalancerIdentityByHref, err error) {
	model = &LoadBalancerIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*LoadBalancerIdentityByHref) isaLoadBalancerIdentity() bool {
	return true
}

// UnmarshalLoadBalancerIdentityByHref unmarshals an instance of LoadBalancerIdentityByHref from the specified map of raw messages.
func UnmarshalLoadBalancerIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerIdentityByID : LoadBalancerIdentityByID struct
// This model "extends" LoadBalancerIdentity
type LoadBalancerIdentityByID struct {
	// The unique identifier for this load balancer.
	ID *string `json:"id" validate:"required"`
}

// NewLoadBalancerIdentityByID : Instantiate LoadBalancerIdentityByID (Generic Model Constructor)
func (*VpcV1) NewLoadBalancerIdentityByID(id string) (model *LoadBalancerIdentityByID, err error) {
	model = &LoadBalancerIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*LoadBalancerIdentityByID) isaLoadBalancerIdentity() bool {
	return true
}

// UnmarshalLoadBalancerIdentityByID unmarshals an instance of LoadBalancerIdentityByID from the specified map of raw messages.
func UnmarshalLoadBalancerIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch : LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch struct
// This model "extends" LoadBalancerListenerPolicyTargetPatch
type LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch struct {
	// The http status code in the redirect response.
	HTTPStatusCode *int64 `json:"http_status_code,omitempty"`

	// The redirect target URL.
	URL *string `json:"url,omitempty"`
}

func (*LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch) isaLoadBalancerListenerPolicyTargetPatch() bool {
	return true
}

// UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch unmarshals an instance of LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch from the specified map of raw messages.
func UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch)
	err = core.UnmarshalPrimitive(m, "http_status_code", &obj.HTTPStatusCode)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "url", &obj.URL)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity : Identifies a load balancer pool by a unique property.
// Models which "extend" this model:
// - LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID
// - LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref
// This model "extends" LoadBalancerListenerPolicyTargetPatch
type LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity struct {
	// The unique identifier for this load balancer pool.
	ID *string `json:"id,omitempty"`

	// The pool's canonical URL.
	Href *string `json:"href,omitempty"`
}

func (*LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity) isaLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity() bool {
	return true
}

type LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityIntf interface {
	LoadBalancerListenerPolicyTargetPatchIntf
	isaLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity() bool
}

func (*LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity) isaLoadBalancerListenerPolicyTargetPatch() bool {
	return true
}

// UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity unmarshals an instance of LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity from the specified map of raw messages.
func UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype : LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype struct
// This model "extends" LoadBalancerListenerPolicyTargetPrototype
type LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype struct {
	// The http status code in the redirect response.
	HTTPStatusCode *int64 `json:"http_status_code" validate:"required"`

	// The redirect target URL.
	URL *string `json:"url" validate:"required"`
}

// NewLoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype : Instantiate LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype (Generic Model Constructor)
func (*VpcV1) NewLoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype(httpStatusCode int64, url string) (model *LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype, err error) {
	model = &LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype{
		HTTPStatusCode: core.Int64Ptr(httpStatusCode),
		URL:            core.StringPtr(url),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype) isaLoadBalancerListenerPolicyTargetPrototype() bool {
	return true
}

// UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype unmarshals an instance of LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype from the specified map of raw messages.
func UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype)
	err = core.UnmarshalPrimitive(m, "http_status_code", &obj.HTTPStatusCode)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "url", &obj.URL)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity : Identifies a load balancer pool by a unique property.
// Models which "extend" this model:
// - LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID
// - LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref
// This model "extends" LoadBalancerListenerPolicyTargetPrototype
type LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity struct {
	// The unique identifier for this load balancer pool.
	ID *string `json:"id,omitempty"`

	// The pool's canonical URL.
	Href *string `json:"href,omitempty"`
}

func (*LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity) isaLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity() bool {
	return true
}

type LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityIntf interface {
	LoadBalancerListenerPolicyTargetPrototypeIntf
	isaLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity() bool
}

func (*LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity) isaLoadBalancerListenerPolicyTargetPrototype() bool {
	return true
}

// UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity unmarshals an instance of LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity from the specified map of raw messages.
func UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL : LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL struct
// This model "extends" LoadBalancerListenerPolicyTarget
type LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL struct {
	// The http status code in the redirect response.
	HTTPStatusCode *int64 `json:"http_status_code" validate:"required"`

	// The redirect target URL.
	URL *string `json:"url" validate:"required"`
}

func (*LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL) isaLoadBalancerListenerPolicyTarget() bool {
	return true
}

// UnmarshalLoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL unmarshals an instance of LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL from the specified map of raw messages.
func UnmarshalLoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL)
	err = core.UnmarshalPrimitive(m, "http_status_code", &obj.HTTPStatusCode)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "url", &obj.URL)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerListenerPolicyTargetLoadBalancerPoolReference : LoadBalancerListenerPolicyTargetLoadBalancerPoolReference struct
// This model "extends" LoadBalancerListenerPolicyTarget
type LoadBalancerListenerPolicyTargetLoadBalancerPoolReference struct {
	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *LoadBalancerPoolReferenceDeleted `json:"deleted,omitempty"`

	// The pool's canonical URL.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this load balancer pool.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this load balancer pool.
	Name *string `json:"name" validate:"required"`
}

func (*LoadBalancerListenerPolicyTargetLoadBalancerPoolReference) isaLoadBalancerListenerPolicyTarget() bool {
	return true
}

// UnmarshalLoadBalancerListenerPolicyTargetLoadBalancerPoolReference unmarshals an instance of LoadBalancerListenerPolicyTargetLoadBalancerPoolReference from the specified map of raw messages.
func UnmarshalLoadBalancerListenerPolicyTargetLoadBalancerPoolReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerListenerPolicyTargetLoadBalancerPoolReference)
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalLoadBalancerPoolReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerPoolIdentityByHref : LoadBalancerPoolIdentityByHref struct
// This model "extends" LoadBalancerPoolIdentity
type LoadBalancerPoolIdentityByHref struct {
	// The pool's canonical URL.
	Href *string `json:"href" validate:"required"`
}

// NewLoadBalancerPoolIdentityByHref : Instantiate LoadBalancerPoolIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewLoadBalancerPoolIdentityByHref(href string) (model *LoadBalancerPoolIdentityByHref, err error) {
	model = &LoadBalancerPoolIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*LoadBalancerPoolIdentityByHref) isaLoadBalancerPoolIdentity() bool {
	return true
}

// UnmarshalLoadBalancerPoolIdentityByHref unmarshals an instance of LoadBalancerPoolIdentityByHref from the specified map of raw messages.
func UnmarshalLoadBalancerPoolIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerPoolIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerPoolIdentityByID : LoadBalancerPoolIdentityByID struct
// This model "extends" LoadBalancerPoolIdentity
type LoadBalancerPoolIdentityByID struct {
	// The unique identifier for this load balancer pool.
	ID *string `json:"id" validate:"required"`
}

// NewLoadBalancerPoolIdentityByID : Instantiate LoadBalancerPoolIdentityByID (Generic Model Constructor)
func (*VpcV1) NewLoadBalancerPoolIdentityByID(id string) (model *LoadBalancerPoolIdentityByID, err error) {
	model = &LoadBalancerPoolIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*LoadBalancerPoolIdentityByID) isaLoadBalancerPoolIdentity() bool {
	return true
}

// UnmarshalLoadBalancerPoolIdentityByID unmarshals an instance of LoadBalancerPoolIdentityByID from the specified map of raw messages.
func UnmarshalLoadBalancerPoolIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerPoolIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerPoolMemberTargetPrototypeIP : LoadBalancerPoolMemberTargetPrototypeIP struct
// This model "extends" LoadBalancerPoolMemberTargetPrototype
type LoadBalancerPoolMemberTargetPrototypeIP struct {
	// The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this
	// property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing
	// and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
	Address *string `json:"address" validate:"required"`
}

// NewLoadBalancerPoolMemberTargetPrototypeIP : Instantiate LoadBalancerPoolMemberTargetPrototypeIP (Generic Model Constructor)
func (*VpcV1) NewLoadBalancerPoolMemberTargetPrototypeIP(address string) (model *LoadBalancerPoolMemberTargetPrototypeIP, err error) {
	model = &LoadBalancerPoolMemberTargetPrototypeIP{
		Address: core.StringPtr(address),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*LoadBalancerPoolMemberTargetPrototypeIP) isaLoadBalancerPoolMemberTargetPrototype() bool {
	return true
}

// UnmarshalLoadBalancerPoolMemberTargetPrototypeIP unmarshals an instance of LoadBalancerPoolMemberTargetPrototypeIP from the specified map of raw messages.
func UnmarshalLoadBalancerPoolMemberTargetPrototypeIP(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerPoolMemberTargetPrototypeIP)
	err = core.UnmarshalPrimitive(m, "address", &obj.Address)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerPoolMemberTargetPrototypeInstanceIdentity : Identifies a virtual server instance by a unique property.
// Models which "extend" this model:
// - LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID
// - LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN
// - LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref
// This model "extends" LoadBalancerPoolMemberTargetPrototype
type LoadBalancerPoolMemberTargetPrototypeInstanceIdentity struct {
	// The unique identifier for this virtual server instance.
	ID *string `json:"id,omitempty"`

	// The CRN for this virtual server instance.
	CRN *string `json:"crn,omitempty"`

	// The URL for this virtual server instance.
	Href *string `json:"href,omitempty"`
}

func (*LoadBalancerPoolMemberTargetPrototypeInstanceIdentity) isaLoadBalancerPoolMemberTargetPrototypeInstanceIdentity() bool {
	return true
}

type LoadBalancerPoolMemberTargetPrototypeInstanceIdentityIntf interface {
	LoadBalancerPoolMemberTargetPrototypeIntf
	isaLoadBalancerPoolMemberTargetPrototypeInstanceIdentity() bool
}

func (*LoadBalancerPoolMemberTargetPrototypeInstanceIdentity) isaLoadBalancerPoolMemberTargetPrototype() bool {
	return true
}

// UnmarshalLoadBalancerPoolMemberTargetPrototypeInstanceIdentity unmarshals an instance of LoadBalancerPoolMemberTargetPrototypeInstanceIdentity from the specified map of raw messages.
func UnmarshalLoadBalancerPoolMemberTargetPrototypeInstanceIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerPoolMemberTargetPrototypeInstanceIdentity)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerPoolMemberTargetIP : LoadBalancerPoolMemberTargetIP struct
// This model "extends" LoadBalancerPoolMemberTarget
type LoadBalancerPoolMemberTargetIP struct {
	// The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this
	// property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing
	// and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
	Address *string `json:"address" validate:"required"`
}

func (*LoadBalancerPoolMemberTargetIP) isaLoadBalancerPoolMemberTarget() bool {
	return true
}

// UnmarshalLoadBalancerPoolMemberTargetIP unmarshals an instance of LoadBalancerPoolMemberTargetIP from the specified map of raw messages.
func UnmarshalLoadBalancerPoolMemberTargetIP(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerPoolMemberTargetIP)
	err = core.UnmarshalPrimitive(m, "address", &obj.Address)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerPoolMemberTargetInstanceReference : LoadBalancerPoolMemberTargetInstanceReference struct
// This model "extends" LoadBalancerPoolMemberTarget
type LoadBalancerPoolMemberTargetInstanceReference struct {
	// The CRN for this virtual server instance.
	CRN *string `json:"crn" validate:"required"`

	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *InstanceReferenceDeleted `json:"deleted,omitempty"`

	// The URL for this virtual server instance.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this virtual server instance.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this virtual server instance (and default system hostname).
	Name *string `json:"name" validate:"required"`
}

func (*LoadBalancerPoolMemberTargetInstanceReference) isaLoadBalancerPoolMemberTarget() bool {
	return true
}

// UnmarshalLoadBalancerPoolMemberTargetInstanceReference unmarshals an instance of LoadBalancerPoolMemberTargetInstanceReference from the specified map of raw messages.
func UnmarshalLoadBalancerPoolMemberTargetInstanceReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerPoolMemberTargetInstanceReference)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalInstanceReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerProfileIdentityByHref : LoadBalancerProfileIdentityByHref struct
// This model "extends" LoadBalancerProfileIdentity
type LoadBalancerProfileIdentityByHref struct {
	// The URL for this load balancer profile.
	Href *string `json:"href" validate:"required"`
}

// NewLoadBalancerProfileIdentityByHref : Instantiate LoadBalancerProfileIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewLoadBalancerProfileIdentityByHref(href string) (model *LoadBalancerProfileIdentityByHref, err error) {
	model = &LoadBalancerProfileIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*LoadBalancerProfileIdentityByHref) isaLoadBalancerProfileIdentity() bool {
	return true
}

// UnmarshalLoadBalancerProfileIdentityByHref unmarshals an instance of LoadBalancerProfileIdentityByHref from the specified map of raw messages.
func UnmarshalLoadBalancerProfileIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerProfileIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerProfileIdentityByName : LoadBalancerProfileIdentityByName struct
// This model "extends" LoadBalancerProfileIdentity
type LoadBalancerProfileIdentityByName struct {
	// The globally unique name for this load balancer profile.
	Name *string `json:"name" validate:"required"`
}

// NewLoadBalancerProfileIdentityByName : Instantiate LoadBalancerProfileIdentityByName (Generic Model Constructor)
func (*VpcV1) NewLoadBalancerProfileIdentityByName(name string) (model *LoadBalancerProfileIdentityByName, err error) {
	model = &LoadBalancerProfileIdentityByName{
		Name: core.StringPtr(name),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*LoadBalancerProfileIdentityByName) isaLoadBalancerProfileIdentity() bool {
	return true
}

// UnmarshalLoadBalancerProfileIdentityByName unmarshals an instance of LoadBalancerProfileIdentityByName from the specified map of raw messages.
func UnmarshalLoadBalancerProfileIdentityByName(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerProfileIdentityByName)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerProfileSecurityGroupsSupportedDependent : The security group support for a load balancer with this profile depends on its configuration.
// This model "extends" LoadBalancerProfileSecurityGroupsSupported
type LoadBalancerProfileSecurityGroupsSupportedDependent struct {
	// The type for this profile field.
	Type *string `json:"type" validate:"required"`
}

// Constants associated with the LoadBalancerProfileSecurityGroupsSupportedDependent.Type property.
// The type for this profile field.
const (
	LoadBalancerProfileSecurityGroupsSupportedDependentTypeDependentConst = "dependent"
)

func (*LoadBalancerProfileSecurityGroupsSupportedDependent) isaLoadBalancerProfileSecurityGroupsSupported() bool {
	return true
}

// UnmarshalLoadBalancerProfileSecurityGroupsSupportedDependent unmarshals an instance of LoadBalancerProfileSecurityGroupsSupportedDependent from the specified map of raw messages.
func UnmarshalLoadBalancerProfileSecurityGroupsSupportedDependent(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerProfileSecurityGroupsSupportedDependent)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerProfileSecurityGroupsSupportedFixed : The security group support for a load balancer with this profile.
// This model "extends" LoadBalancerProfileSecurityGroupsSupported
type LoadBalancerProfileSecurityGroupsSupportedFixed struct {
	// The type for this profile field.
	Type *string `json:"type" validate:"required"`

	// The value for this profile field.
	Value *bool `json:"value" validate:"required"`
}

// Constants associated with the LoadBalancerProfileSecurityGroupsSupportedFixed.Type property.
// The type for this profile field.
const (
	LoadBalancerProfileSecurityGroupsSupportedFixedTypeFixedConst = "fixed"
)

func (*LoadBalancerProfileSecurityGroupsSupportedFixed) isaLoadBalancerProfileSecurityGroupsSupported() bool {
	return true
}

// UnmarshalLoadBalancerProfileSecurityGroupsSupportedFixed unmarshals an instance of LoadBalancerProfileSecurityGroupsSupportedFixed from the specified map of raw messages.
func UnmarshalLoadBalancerProfileSecurityGroupsSupportedFixed(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerProfileSecurityGroupsSupportedFixed)
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "value", &obj.Value)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACLIdentityByCRN : NetworkACLIdentityByCRN struct
// This model "extends" NetworkACLIdentity
type NetworkACLIdentityByCRN struct {
	// The CRN for this network ACL.
	CRN *string `json:"crn" validate:"required"`
}

// NewNetworkACLIdentityByCRN : Instantiate NetworkACLIdentityByCRN (Generic Model Constructor)
func (*VpcV1) NewNetworkACLIdentityByCRN(crn string) (model *NetworkACLIdentityByCRN, err error) {
	model = &NetworkACLIdentityByCRN{
		CRN: core.StringPtr(crn),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*NetworkACLIdentityByCRN) isaNetworkACLIdentity() bool {
	return true
}

// UnmarshalNetworkACLIdentityByCRN unmarshals an instance of NetworkACLIdentityByCRN from the specified map of raw messages.
func UnmarshalNetworkACLIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLIdentityByCRN)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACLIdentityByHref : NetworkACLIdentityByHref struct
// This model "extends" NetworkACLIdentity
type NetworkACLIdentityByHref struct {
	// The URL for this network ACL.
	Href *string `json:"href" validate:"required"`
}

// NewNetworkACLIdentityByHref : Instantiate NetworkACLIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewNetworkACLIdentityByHref(href string) (model *NetworkACLIdentityByHref, err error) {
	model = &NetworkACLIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*NetworkACLIdentityByHref) isaNetworkACLIdentity() bool {
	return true
}

// UnmarshalNetworkACLIdentityByHref unmarshals an instance of NetworkACLIdentityByHref from the specified map of raw messages.
func UnmarshalNetworkACLIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACLIdentityByID : NetworkACLIdentityByID struct
// This model "extends" NetworkACLIdentity
type NetworkACLIdentityByID struct {
	// The unique identifier for this network ACL.
	ID *string `json:"id" validate:"required"`
}

// NewNetworkACLIdentityByID : Instantiate NetworkACLIdentityByID (Generic Model Constructor)
func (*VpcV1) NewNetworkACLIdentityByID(id string) (model *NetworkACLIdentityByID, err error) {
	model = &NetworkACLIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*NetworkACLIdentityByID) isaNetworkACLIdentity() bool {
	return true
}

// UnmarshalNetworkACLIdentityByID unmarshals an instance of NetworkACLIdentityByID from the specified map of raw messages.
func UnmarshalNetworkACLIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACLPrototypeNetworkACLByRules : NetworkACLPrototypeNetworkACLByRules struct
// This model "extends" NetworkACLPrototype
type NetworkACLPrototypeNetworkACLByRules struct {
	// The user-defined name for this network ACL. Names must be unique within the VPC the network ACL resides in. If
	// unspecified, the name will be a hyphenated list of randomly-selected words.
	Name *string `json:"name,omitempty"`

	ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`

	// The VPC this network ACL is to be a part of.
	VPC VPCIdentityIntf `json:"vpc" validate:"required"`

	// Array of prototype objects for rules to create along with this network ACL. If unspecified, no rules will be
	// created, resulting in all traffic being denied.
	Rules []NetworkACLRulePrototypeNetworkACLContextIntf `json:"rules,omitempty"`
}

func (*NetworkACLPrototypeNetworkACLByRules) isaNetworkACLPrototype() bool {
	return true
}

// UnmarshalNetworkACLPrototypeNetworkACLByRules unmarshals an instance of NetworkACLPrototypeNetworkACLByRules from the specified map of raw messages.
func UnmarshalNetworkACLPrototypeNetworkACLByRules(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLPrototypeNetworkACLByRules)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "rules", &obj.Rules, UnmarshalNetworkACLRulePrototypeNetworkACLContext)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACLPrototypeNetworkACLBySourceNetworkACL : NetworkACLPrototypeNetworkACLBySourceNetworkACL struct
// This model "extends" NetworkACLPrototype
type NetworkACLPrototypeNetworkACLBySourceNetworkACL struct {
	// The user-defined name for this network ACL. Names must be unique within the VPC the network ACL resides in. If
	// unspecified, the name will be a hyphenated list of randomly-selected words.
	Name *string `json:"name,omitempty"`

	ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`

	// The VPC this network ACL is to be a part of.
	VPC VPCIdentityIntf `json:"vpc" validate:"required"`

	// Network ACL to copy rules from.
	SourceNetworkACL NetworkACLIdentityIntf `json:"source_network_acl" validate:"required"`
}

// NewNetworkACLPrototypeNetworkACLBySourceNetworkACL : Instantiate NetworkACLPrototypeNetworkACLBySourceNetworkACL (Generic Model Constructor)
func (*VpcV1) NewNetworkACLPrototypeNetworkACLBySourceNetworkACL(vpc VPCIdentityIntf, sourceNetworkACL NetworkACLIdentityIntf) (model *NetworkACLPrototypeNetworkACLBySourceNetworkACL, err error) {
	model = &NetworkACLPrototypeNetworkACLBySourceNetworkACL{
		VPC:              vpc,
		SourceNetworkACL: sourceNetworkACL,
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*NetworkACLPrototypeNetworkACLBySourceNetworkACL) isaNetworkACLPrototype() bool {
	return true
}

// UnmarshalNetworkACLPrototypeNetworkACLBySourceNetworkACL unmarshals an instance of NetworkACLPrototypeNetworkACLBySourceNetworkACL from the specified map of raw messages.
func UnmarshalNetworkACLPrototypeNetworkACLBySourceNetworkACL(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLPrototypeNetworkACLBySourceNetworkACL)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "source_network_acl", &obj.SourceNetworkACL, UnmarshalNetworkACLIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref : NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref struct
// This model "extends" NetworkACLRuleBeforePatch
type NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref struct {
	// The URL for this network ACL rule.
	Href *string `json:"href" validate:"required"`
}

// NewNetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref : Instantiate NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewNetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref(href string) (model *NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref, err error) {
	model = &NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref) isaNetworkACLRuleBeforePatch() bool {
	return true
}

// UnmarshalNetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref unmarshals an instance of NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref from the specified map of raw messages.
func UnmarshalNetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACLRuleBeforePatchNetworkACLRuleIdentityByID : NetworkACLRuleBeforePatchNetworkACLRuleIdentityByID struct
// This model "extends" NetworkACLRuleBeforePatch
type NetworkACLRuleBeforePatchNetworkACLRuleIdentityByID struct {
	// The unique identifier for this network ACL rule.
	ID *string `json:"id" validate:"required"`
}

// NewNetworkACLRuleBeforePatchNetworkACLRuleIdentityByID : Instantiate NetworkACLRuleBeforePatchNetworkACLRuleIdentityByID (Generic Model Constructor)
func (*VpcV1) NewNetworkACLRuleBeforePatchNetworkACLRuleIdentityByID(id string) (model *NetworkACLRuleBeforePatchNetworkACLRuleIdentityByID, err error) {
	model = &NetworkACLRuleBeforePatchNetworkACLRuleIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*NetworkACLRuleBeforePatchNetworkACLRuleIdentityByID) isaNetworkACLRuleBeforePatch() bool {
	return true
}

// UnmarshalNetworkACLRuleBeforePatchNetworkACLRuleIdentityByID unmarshals an instance of NetworkACLRuleBeforePatchNetworkACLRuleIdentityByID from the specified map of raw messages.
func UnmarshalNetworkACLRuleBeforePatchNetworkACLRuleIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLRuleBeforePatchNetworkACLRuleIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref : NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref struct
// This model "extends" NetworkACLRuleBeforePrototype
type NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref struct {
	// The URL for this network ACL rule.
	Href *string `json:"href" validate:"required"`
}

// NewNetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref : Instantiate NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewNetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref(href string) (model *NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref, err error) {
	model = &NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref) isaNetworkACLRuleBeforePrototype() bool {
	return true
}

// UnmarshalNetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref unmarshals an instance of NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref from the specified map of raw messages.
func UnmarshalNetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID : NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID struct
// This model "extends" NetworkACLRuleBeforePrototype
type NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID struct {
	// The unique identifier for this network ACL rule.
	ID *string `json:"id" validate:"required"`
}

// NewNetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID : Instantiate NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID (Generic Model Constructor)
func (*VpcV1) NewNetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID(id string) (model *NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID, err error) {
	model = &NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID) isaNetworkACLRuleBeforePrototype() bool {
	return true
}

// UnmarshalNetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID unmarshals an instance of NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID from the specified map of raw messages.
func UnmarshalNetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACLRuleItemNetworkACLRuleProtocolAll : NetworkACLRuleItemNetworkACLRuleProtocolAll struct
// This model "extends" NetworkACLRuleItem
type NetworkACLRuleItemNetworkACLRuleProtocolAll struct {
	// Whether to allow or deny matching traffic.
	Action *string `json:"action" validate:"required"`

	// The rule that this rule is immediately before. In a rule collection, this always refers to the next item in the
	// collection. If absent, this is the last rule.
	Before *NetworkACLRuleReference `json:"before,omitempty"`

	// The date and time that the rule was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The destination CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses.
	Destination *string `json:"destination" validate:"required"`

	// Whether the traffic to be matched is `inbound` or `outbound`.
	Direction *string `json:"direction" validate:"required"`

	// The URL for this network ACL rule.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this network ACL rule.
	ID *string `json:"id" validate:"required"`

	// The IP version for this rule.
	IPVersion *string `json:"ip_version" validate:"required"`

	// The user-defined name for this rule. Names must be unique within the network ACL the rule resides in. If
	// unspecified, the name will be a hyphenated list of randomly-selected words.
	Name *string `json:"name" validate:"required"`

	// The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses.
	Source *string `json:"source" validate:"required"`

	// The protocol to enforce.
	Protocol *string `json:"protocol" validate:"required"`
}

// Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolAll.Action property.
// Whether to allow or deny matching traffic.
const (
	NetworkACLRuleItemNetworkACLRuleProtocolAllActionAllowConst = "allow"
	NetworkACLRuleItemNetworkACLRuleProtocolAllActionDenyConst  = "deny"
)

// Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolAll.Direction property.
// Whether the traffic to be matched is `inbound` or `outbound`.
const (
	NetworkACLRuleItemNetworkACLRuleProtocolAllDirectionInboundConst  = "inbound"
	NetworkACLRuleItemNetworkACLRuleProtocolAllDirectionOutboundConst = "outbound"
)

// Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolAll.IPVersion property.
// The IP version for this rule.
const (
	NetworkACLRuleItemNetworkACLRuleProtocolAllIPVersionIpv4Const = "ipv4"
	NetworkACLRuleItemNetworkACLRuleProtocolAllIPVersionIpv6Const = "ipv6"
)

// Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolAll.Protocol property.
// The protocol to enforce.
const (
	NetworkACLRuleItemNetworkACLRuleProtocolAllProtocolAllConst = "all"
)

func (*NetworkACLRuleItemNetworkACLRuleProtocolAll) isaNetworkACLRuleItem() bool {
	return true
}

// UnmarshalNetworkACLRuleItemNetworkACLRuleProtocolAll unmarshals an instance of NetworkACLRuleItemNetworkACLRuleProtocolAll from the specified map of raw messages.
func UnmarshalNetworkACLRuleItemNetworkACLRuleProtocolAll(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLRuleItemNetworkACLRuleProtocolAll)
	err = core.UnmarshalPrimitive(m, "action", &obj.Action)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "destination", &obj.Destination)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "direction", &obj.Direction)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "source", &obj.Source)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACLRuleItemNetworkACLRuleProtocolIcmp : NetworkACLRuleItemNetworkACLRuleProtocolIcmp struct
// This model "extends" NetworkACLRuleItem
type NetworkACLRuleItemNetworkACLRuleProtocolIcmp struct {
	// Whether to allow or deny matching traffic.
	Action *string `json:"action" validate:"required"`

	// The rule that this rule is immediately before. In a rule collection, this always refers to the next item in the
	// collection. If absent, this is the last rule.
	Before *NetworkACLRuleReference `json:"before,omitempty"`

	// The date and time that the rule was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The destination CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses.
	Destination *string `json:"destination" validate:"required"`

	// Whether the traffic to be matched is `inbound` or `outbound`.
	Direction *string `json:"direction" validate:"required"`

	// The URL for this network ACL rule.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this network ACL rule.
	ID *string `json:"id" validate:"required"`

	// The IP version for this rule.
	IPVersion *string `json:"ip_version" validate:"required"`

	// The user-defined name for this rule. Names must be unique within the network ACL the rule resides in. If
	// unspecified, the name will be a hyphenated list of randomly-selected words.
	Name *string `json:"name" validate:"required"`

	// The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses.
	Source *string `json:"source" validate:"required"`

	// The ICMP traffic code to allow. If unspecified, all codes are allowed. This can only be specified if type is also
	// specified.
	Code *int64 `json:"code,omitempty"`

	// The protocol to enforce.
	Protocol *string `json:"protocol" validate:"required"`

	// The ICMP traffic type to allow. If unspecified, all types are allowed by this rule.
	Type *int64 `json:"type,omitempty"`
}

// Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolIcmp.Action property.
// Whether to allow or deny matching traffic.
const (
	NetworkACLRuleItemNetworkACLRuleProtocolIcmpActionAllowConst = "allow"
	NetworkACLRuleItemNetworkACLRuleProtocolIcmpActionDenyConst  = "deny"
)

// Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolIcmp.Direction property.
// Whether the traffic to be matched is `inbound` or `outbound`.
const (
	NetworkACLRuleItemNetworkACLRuleProtocolIcmpDirectionInboundConst  = "inbound"
	NetworkACLRuleItemNetworkACLRuleProtocolIcmpDirectionOutboundConst = "outbound"
)

// Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolIcmp.IPVersion property.
// The IP version for this rule.
const (
	NetworkACLRuleItemNetworkACLRuleProtocolIcmpIPVersionIpv4Const = "ipv4"
	NetworkACLRuleItemNetworkACLRuleProtocolIcmpIPVersionIpv6Const = "ipv6"
)

// Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolIcmp.Protocol property.
// The protocol to enforce.
const (
	NetworkACLRuleItemNetworkACLRuleProtocolIcmpProtocolIcmpConst = "icmp"
)

func (*NetworkACLRuleItemNetworkACLRuleProtocolIcmp) isaNetworkACLRuleItem() bool {
	return true
}

// UnmarshalNetworkACLRuleItemNetworkACLRuleProtocolIcmp unmarshals an instance of NetworkACLRuleItemNetworkACLRuleProtocolIcmp from the specified map of raw messages.
func UnmarshalNetworkACLRuleItemNetworkACLRuleProtocolIcmp(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLRuleItemNetworkACLRuleProtocolIcmp)
	err = core.UnmarshalPrimitive(m, "action", &obj.Action)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "destination", &obj.Destination)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "direction", &obj.Direction)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "source", &obj.Source)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "code", &obj.Code)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACLRuleItemNetworkACLRuleProtocolTcpudp : NetworkACLRuleItemNetworkACLRuleProtocolTcpudp struct
// This model "extends" NetworkACLRuleItem
type NetworkACLRuleItemNetworkACLRuleProtocolTcpudp struct {
	// Whether to allow or deny matching traffic.
	Action *string `json:"action" validate:"required"`

	// The rule that this rule is immediately before. In a rule collection, this always refers to the next item in the
	// collection. If absent, this is the last rule.
	Before *NetworkACLRuleReference `json:"before,omitempty"`

	// The date and time that the rule was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The destination CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses.
	Destination *string `json:"destination" validate:"required"`

	// Whether the traffic to be matched is `inbound` or `outbound`.
	Direction *string `json:"direction" validate:"required"`

	// The URL for this network ACL rule.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this network ACL rule.
	ID *string `json:"id" validate:"required"`

	// The IP version for this rule.
	IPVersion *string `json:"ip_version" validate:"required"`

	// The user-defined name for this rule. Names must be unique within the network ACL the rule resides in. If
	// unspecified, the name will be a hyphenated list of randomly-selected words.
	Name *string `json:"name" validate:"required"`

	// The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses.
	Source *string `json:"source" validate:"required"`

	// The inclusive upper bound of TCP/UDP destination port range.
	DestinationPortMax *int64 `json:"destination_port_max,omitempty"`

	// The inclusive lower bound of TCP/UDP destination port range.
	DestinationPortMin *int64 `json:"destination_port_min,omitempty"`

	// The protocol to enforce.
	Protocol *string `json:"protocol" validate:"required"`

	// The inclusive upper bound of TCP/UDP source port range.
	SourcePortMax *int64 `json:"source_port_max,omitempty"`

	// The inclusive lower bound of TCP/UDP source port range.
	SourcePortMin *int64 `json:"source_port_min,omitempty"`
}

// Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolTcpudp.Action property.
// Whether to allow or deny matching traffic.
const (
	NetworkACLRuleItemNetworkACLRuleProtocolTcpudpActionAllowConst = "allow"
	NetworkACLRuleItemNetworkACLRuleProtocolTcpudpActionDenyConst  = "deny"
)

// Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolTcpudp.Direction property.
// Whether the traffic to be matched is `inbound` or `outbound`.
const (
	NetworkACLRuleItemNetworkACLRuleProtocolTcpudpDirectionInboundConst  = "inbound"
	NetworkACLRuleItemNetworkACLRuleProtocolTcpudpDirectionOutboundConst = "outbound"
)

// Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolTcpudp.IPVersion property.
// The IP version for this rule.
const (
	NetworkACLRuleItemNetworkACLRuleProtocolTcpudpIPVersionIpv4Const = "ipv4"
	NetworkACLRuleItemNetworkACLRuleProtocolTcpudpIPVersionIpv6Const = "ipv6"
)

// Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolTcpudp.Protocol property.
// The protocol to enforce.
const (
	NetworkACLRuleItemNetworkACLRuleProtocolTcpudpProtocolTCPConst = "tcp"
	NetworkACLRuleItemNetworkACLRuleProtocolTcpudpProtocolUDPConst = "udp"
)

func (*NetworkACLRuleItemNetworkACLRuleProtocolTcpudp) isaNetworkACLRuleItem() bool {
	return true
}

// UnmarshalNetworkACLRuleItemNetworkACLRuleProtocolTcpudp unmarshals an instance of NetworkACLRuleItemNetworkACLRuleProtocolTcpudp from the specified map of raw messages.
func UnmarshalNetworkACLRuleItemNetworkACLRuleProtocolTcpudp(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLRuleItemNetworkACLRuleProtocolTcpudp)
	err = core.UnmarshalPrimitive(m, "action", &obj.Action)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "destination", &obj.Destination)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "direction", &obj.Direction)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "source", &obj.Source)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "destination_port_max", &obj.DestinationPortMax)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "destination_port_min", &obj.DestinationPortMin)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "source_port_max", &obj.SourcePortMax)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "source_port_min", &obj.SourcePortMin)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll : NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll struct
// This model "extends" NetworkACLRulePrototypeNetworkACLContext
type NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll struct {
	// Whether to allow or deny matching traffic.
	Action *string `json:"action" validate:"required"`

	// The destination IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses.
	Destination *string `json:"destination" validate:"required"`

	// Whether the traffic to be matched is `inbound` or `outbound`.
	Direction *string `json:"direction" validate:"required"`

	// The user-defined name for this rule. Names must be unique within the network ACL the rule resides in. If
	// unspecified, the name will be a hyphenated list of randomly-selected words.
	Name *string `json:"name,omitempty"`

	// The source IP address or CIDR block.  The CIDR block `0.0.0.0/0` applies to all addresses.
	Source *string `json:"source" validate:"required"`

	// The protocol to enforce.
	Protocol *string `json:"protocol" validate:"required"`
}

// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll.Action property.
// Whether to allow or deny matching traffic.
const (
	NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllActionAllowConst = "allow"
	NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllActionDenyConst  = "deny"
)

// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll.Direction property.
// Whether the traffic to be matched is `inbound` or `outbound`.
const (
	NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllDirectionInboundConst  = "inbound"
	NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllDirectionOutboundConst = "outbound"
)

// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll.Protocol property.
// The protocol to enforce.
const (
	NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllProtocolAllConst = "all"
)

// NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll : Instantiate NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll (Generic Model Constructor)
func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll(action string, destination string, direction string, source string, protocol string) (model *NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll, err error) {
	model = &NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll{
		Action:      core.StringPtr(action),
		Destination: core.StringPtr(destination),
		Direction:   core.StringPtr(direction),
		Source:      core.StringPtr(source),
		Protocol:    core.StringPtr(protocol),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll) isaNetworkACLRulePrototypeNetworkACLContext() bool {
	return true
}

// UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll unmarshals an instance of NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll from the specified map of raw messages.
func UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll)
	err = core.UnmarshalPrimitive(m, "action", &obj.Action)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "destination", &obj.Destination)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "direction", &obj.Direction)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "source", &obj.Source)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp : NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp struct
// This model "extends" NetworkACLRulePrototypeNetworkACLContext
type NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp struct {
	// Whether to allow or deny matching traffic.
	Action *string `json:"action" validate:"required"`

	// The destination IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses.
	Destination *string `json:"destination" validate:"required"`

	// Whether the traffic to be matched is `inbound` or `outbound`.
	Direction *string `json:"direction" validate:"required"`

	// The user-defined name for this rule. Names must be unique within the network ACL the rule resides in. If
	// unspecified, the name will be a hyphenated list of randomly-selected words.
	Name *string `json:"name,omitempty"`

	// The source IP address or CIDR block.  The CIDR block `0.0.0.0/0` applies to all addresses.
	Source *string `json:"source" validate:"required"`

	// The ICMP traffic code to allow. If unspecified, all codes are allowed. This can only be specified if type is also
	// specified.
	Code *int64 `json:"code,omitempty"`

	// The protocol to enforce.
	Protocol *string `json:"protocol" validate:"required"`

	// The ICMP traffic type to allow. If unspecified, all types are allowed by this rule.
	Type *int64 `json:"type,omitempty"`
}

// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp.Action property.
// Whether to allow or deny matching traffic.
const (
	NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpActionAllowConst = "allow"
	NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpActionDenyConst  = "deny"
)

// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp.Direction property.
// Whether the traffic to be matched is `inbound` or `outbound`.
const (
	NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpDirectionInboundConst  = "inbound"
	NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpDirectionOutboundConst = "outbound"
)

// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp.Protocol property.
// The protocol to enforce.
const (
	NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpProtocolIcmpConst = "icmp"
)

// NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp : Instantiate NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp (Generic Model Constructor)
func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp(action string, destination string, direction string, source string, protocol string) (model *NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp, err error) {
	model = &NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp{
		Action:      core.StringPtr(action),
		Destination: core.StringPtr(destination),
		Direction:   core.StringPtr(direction),
		Source:      core.StringPtr(source),
		Protocol:    core.StringPtr(protocol),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp) isaNetworkACLRulePrototypeNetworkACLContext() bool {
	return true
}

// UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp unmarshals an instance of NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp from the specified map of raw messages.
func UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp)
	err = core.UnmarshalPrimitive(m, "action", &obj.Action)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "destination", &obj.Destination)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "direction", &obj.Direction)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "source", &obj.Source)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "code", &obj.Code)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp : NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp struct
// This model "extends" NetworkACLRulePrototypeNetworkACLContext
type NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp struct {
	// Whether to allow or deny matching traffic.
	Action *string `json:"action" validate:"required"`

	// The destination IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses.
	Destination *string `json:"destination" validate:"required"`

	// Whether the traffic to be matched is `inbound` or `outbound`.
	Direction *string `json:"direction" validate:"required"`

	// The user-defined name for this rule. Names must be unique within the network ACL the rule resides in. If
	// unspecified, the name will be a hyphenated list of randomly-selected words.
	Name *string `json:"name,omitempty"`

	// The source IP address or CIDR block.  The CIDR block `0.0.0.0/0` applies to all addresses.
	Source *string `json:"source" validate:"required"`

	// The inclusive upper bound of TCP/UDP destination port range.
	DestinationPortMax *int64 `json:"destination_port_max,omitempty"`

	// The inclusive lower bound of TCP/UDP destination port range.
	DestinationPortMin *int64 `json:"destination_port_min,omitempty"`

	// The protocol to enforce.
	Protocol *string `json:"protocol" validate:"required"`

	// The inclusive upper bound of TCP/UDP source port range.
	SourcePortMax *int64 `json:"source_port_max,omitempty"`

	// The inclusive lower bound of TCP/UDP source port range.
	SourcePortMin *int64 `json:"source_port_min,omitempty"`
}

// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp.Action property.
// Whether to allow or deny matching traffic.
const (
	NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpActionAllowConst = "allow"
	NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpActionDenyConst  = "deny"
)

// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp.Direction property.
// Whether the traffic to be matched is `inbound` or `outbound`.
const (
	NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpDirectionInboundConst  = "inbound"
	NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpDirectionOutboundConst = "outbound"
)

// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp.Protocol property.
// The protocol to enforce.
const (
	NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpProtocolTCPConst = "tcp"
	NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpProtocolUDPConst = "udp"
)

// NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp : Instantiate NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp (Generic Model Constructor)
func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp(action string, destination string, direction string, source string, protocol string) (model *NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp, err error) {
	model = &NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp{
		Action:      core.StringPtr(action),
		Destination: core.StringPtr(destination),
		Direction:   core.StringPtr(direction),
		Source:      core.StringPtr(source),
		Protocol:    core.StringPtr(protocol),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp) isaNetworkACLRulePrototypeNetworkACLContext() bool {
	return true
}

// UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp unmarshals an instance of NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp from the specified map of raw messages.
func UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp)
	err = core.UnmarshalPrimitive(m, "action", &obj.Action)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "destination", &obj.Destination)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "direction", &obj.Direction)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "source", &obj.Source)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "destination_port_max", &obj.DestinationPortMax)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "destination_port_min", &obj.DestinationPortMin)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "source_port_max", &obj.SourcePortMax)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "source_port_min", &obj.SourcePortMin)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACLRulePrototypeNetworkACLRuleProtocolAll : NetworkACLRulePrototypeNetworkACLRuleProtocolAll struct
// This model "extends" NetworkACLRulePrototype
type NetworkACLRulePrototypeNetworkACLRuleProtocolAll struct {
	// Whether to allow or deny matching traffic.
	Action *string `json:"action" validate:"required"`

	Before NetworkACLRuleBeforePrototypeIntf `json:"before,omitempty"`

	// The destination IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses.
	Destination *string `json:"destination" validate:"required"`

	// Whether the traffic to be matched is `inbound` or `outbound`.
	Direction *string `json:"direction" validate:"required"`

	// The user-defined name for this rule. Names must be unique within the network ACL the rule resides in. If
	// unspecified, the name will be a hyphenated list of randomly-selected words.
	Name *string `json:"name,omitempty"`

	// The source IP address or CIDR block.  The CIDR block `0.0.0.0/0` applies to all addresses.
	Source *string `json:"source" validate:"required"`

	// The protocol to enforce.
	Protocol *string `json:"protocol" validate:"required"`
}

// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolAll.Action property.
// Whether to allow or deny matching traffic.
const (
	NetworkACLRulePrototypeNetworkACLRuleProtocolAllActionAllowConst = "allow"
	NetworkACLRulePrototypeNetworkACLRuleProtocolAllActionDenyConst  = "deny"
)

// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolAll.Direction property.
// Whether the traffic to be matched is `inbound` or `outbound`.
const (
	NetworkACLRulePrototypeNetworkACLRuleProtocolAllDirectionInboundConst  = "inbound"
	NetworkACLRulePrototypeNetworkACLRuleProtocolAllDirectionOutboundConst = "outbound"
)

// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolAll.Protocol property.
// The protocol to enforce.
const (
	NetworkACLRulePrototypeNetworkACLRuleProtocolAllProtocolAllConst = "all"
)

// NewNetworkACLRulePrototypeNetworkACLRuleProtocolAll : Instantiate NetworkACLRulePrototypeNetworkACLRuleProtocolAll (Generic Model Constructor)
func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLRuleProtocolAll(action string, destination string, direction string, source string, protocol string) (model *NetworkACLRulePrototypeNetworkACLRuleProtocolAll, err error) {
	model = &NetworkACLRulePrototypeNetworkACLRuleProtocolAll{
		Action:      core.StringPtr(action),
		Destination: core.StringPtr(destination),
		Direction:   core.StringPtr(direction),
		Source:      core.StringPtr(source),
		Protocol:    core.StringPtr(protocol),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*NetworkACLRulePrototypeNetworkACLRuleProtocolAll) isaNetworkACLRulePrototype() bool {
	return true
}

// UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolAll unmarshals an instance of NetworkACLRulePrototypeNetworkACLRuleProtocolAll from the specified map of raw messages.
func UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolAll(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLRulePrototypeNetworkACLRuleProtocolAll)
	err = core.UnmarshalPrimitive(m, "action", &obj.Action)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleBeforePrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "destination", &obj.Destination)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "direction", &obj.Direction)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "source", &obj.Source)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp : NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp struct
// This model "extends" NetworkACLRulePrototype
type NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp struct {
	// Whether to allow or deny matching traffic.
	Action *string `json:"action" validate:"required"`

	Before NetworkACLRuleBeforePrototypeIntf `json:"before,omitempty"`

	// The destination IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses.
	Destination *string `json:"destination" validate:"required"`

	// Whether the traffic to be matched is `inbound` or `outbound`.
	Direction *string `json:"direction" validate:"required"`

	// The user-defined name for this rule. Names must be unique within the network ACL the rule resides in. If
	// unspecified, the name will be a hyphenated list of randomly-selected words.
	Name *string `json:"name,omitempty"`

	// The source IP address or CIDR block.  The CIDR block `0.0.0.0/0` applies to all addresses.
	Source *string `json:"source" validate:"required"`

	// The ICMP traffic code to allow. If unspecified, all codes are allowed. This can only be specified if type is also
	// specified.
	Code *int64 `json:"code,omitempty"`

	// The protocol to enforce.
	Protocol *string `json:"protocol" validate:"required"`

	// The ICMP traffic type to allow. If unspecified, all types are allowed by this rule.
	Type *int64 `json:"type,omitempty"`
}

// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp.Action property.
// Whether to allow or deny matching traffic.
const (
	NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpActionAllowConst = "allow"
	NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpActionDenyConst  = "deny"
)

// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp.Direction property.
// Whether the traffic to be matched is `inbound` or `outbound`.
const (
	NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpDirectionInboundConst  = "inbound"
	NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpDirectionOutboundConst = "outbound"
)

// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp.Protocol property.
// The protocol to enforce.
const (
	NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpProtocolIcmpConst = "icmp"
)

// NewNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp : Instantiate NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp (Generic Model Constructor)
func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp(action string, destination string, direction string, source string, protocol string) (model *NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp, err error) {
	model = &NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp{
		Action:      core.StringPtr(action),
		Destination: core.StringPtr(destination),
		Direction:   core.StringPtr(direction),
		Source:      core.StringPtr(source),
		Protocol:    core.StringPtr(protocol),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp) isaNetworkACLRulePrototype() bool {
	return true
}

// UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp unmarshals an instance of NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp from the specified map of raw messages.
func UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp)
	err = core.UnmarshalPrimitive(m, "action", &obj.Action)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleBeforePrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "destination", &obj.Destination)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "direction", &obj.Direction)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "source", &obj.Source)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "code", &obj.Code)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp : NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp struct
// This model "extends" NetworkACLRulePrototype
type NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp struct {
	// Whether to allow or deny matching traffic.
	Action *string `json:"action" validate:"required"`

	Before NetworkACLRuleBeforePrototypeIntf `json:"before,omitempty"`

	// The destination IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses.
	Destination *string `json:"destination" validate:"required"`

	// Whether the traffic to be matched is `inbound` or `outbound`.
	Direction *string `json:"direction" validate:"required"`

	// The user-defined name for this rule. Names must be unique within the network ACL the rule resides in. If
	// unspecified, the name will be a hyphenated list of randomly-selected words.
	Name *string `json:"name,omitempty"`

	// The source IP address or CIDR block.  The CIDR block `0.0.0.0/0` applies to all addresses.
	Source *string `json:"source" validate:"required"`

	// The inclusive upper bound of TCP/UDP destination port range.
	DestinationPortMax *int64 `json:"destination_port_max,omitempty"`

	// The inclusive lower bound of TCP/UDP destination port range.
	DestinationPortMin *int64 `json:"destination_port_min,omitempty"`

	// The protocol to enforce.
	Protocol *string `json:"protocol" validate:"required"`

	// The inclusive upper bound of TCP/UDP source port range.
	SourcePortMax *int64 `json:"source_port_max,omitempty"`

	// The inclusive lower bound of TCP/UDP source port range.
	SourcePortMin *int64 `json:"source_port_min,omitempty"`
}

// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp.Action property.
// Whether to allow or deny matching traffic.
const (
	NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpActionAllowConst = "allow"
	NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpActionDenyConst  = "deny"
)

// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp.Direction property.
// Whether the traffic to be matched is `inbound` or `outbound`.
const (
	NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpDirectionInboundConst  = "inbound"
	NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpDirectionOutboundConst = "outbound"
)

// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp.Protocol property.
// The protocol to enforce.
const (
	NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpProtocolTCPConst = "tcp"
	NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpProtocolUDPConst = "udp"
)

// NewNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp : Instantiate NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp (Generic Model Constructor)
func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp(action string, destination string, direction string, source string, protocol string) (model *NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp, err error) {
	model = &NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp{
		Action:      core.StringPtr(action),
		Destination: core.StringPtr(destination),
		Direction:   core.StringPtr(direction),
		Source:      core.StringPtr(source),
		Protocol:    core.StringPtr(protocol),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp) isaNetworkACLRulePrototype() bool {
	return true
}

// UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp unmarshals an instance of NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp from the specified map of raw messages.
func UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp)
	err = core.UnmarshalPrimitive(m, "action", &obj.Action)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleBeforePrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "destination", &obj.Destination)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "direction", &obj.Direction)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "source", &obj.Source)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "destination_port_max", &obj.DestinationPortMax)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "destination_port_min", &obj.DestinationPortMin)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "source_port_max", &obj.SourcePortMax)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "source_port_min", &obj.SourcePortMin)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACLRuleNetworkACLRuleProtocolAll : NetworkACLRuleNetworkACLRuleProtocolAll struct
// This model "extends" NetworkACLRule
type NetworkACLRuleNetworkACLRuleProtocolAll struct {
	// Whether to allow or deny matching traffic.
	Action *string `json:"action" validate:"required"`

	// The rule that this rule is immediately before. If absent, this is the last rule.
	Before *NetworkACLRuleReference `json:"before,omitempty"`

	// The date and time that the rule was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The destination CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses.
	Destination *string `json:"destination" validate:"required"`

	// Whether the traffic to be matched is `inbound` or `outbound`.
	Direction *string `json:"direction" validate:"required"`

	// The URL for this network ACL rule.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this network ACL rule.
	ID *string `json:"id" validate:"required"`

	// The IP version for this rule.
	IPVersion *string `json:"ip_version" validate:"required"`

	// The user-defined name for this rule. Names must be unique within the network ACL the rule resides in. If
	// unspecified, the name will be a hyphenated list of randomly-selected words.
	Name *string `json:"name" validate:"required"`

	// The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses.
	Source *string `json:"source" validate:"required"`

	// The protocol to enforce.
	Protocol *string `json:"protocol" validate:"required"`
}

// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolAll.Action property.
// Whether to allow or deny matching traffic.
const (
	NetworkACLRuleNetworkACLRuleProtocolAllActionAllowConst = "allow"
	NetworkACLRuleNetworkACLRuleProtocolAllActionDenyConst  = "deny"
)

// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolAll.Direction property.
// Whether the traffic to be matched is `inbound` or `outbound`.
const (
	NetworkACLRuleNetworkACLRuleProtocolAllDirectionInboundConst  = "inbound"
	NetworkACLRuleNetworkACLRuleProtocolAllDirectionOutboundConst = "outbound"
)

// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolAll.IPVersion property.
// The IP version for this rule.
const (
	NetworkACLRuleNetworkACLRuleProtocolAllIPVersionIpv4Const = "ipv4"
	NetworkACLRuleNetworkACLRuleProtocolAllIPVersionIpv6Const = "ipv6"
)

// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolAll.Protocol property.
// The protocol to enforce.
const (
	NetworkACLRuleNetworkACLRuleProtocolAllProtocolAllConst = "all"
)

func (*NetworkACLRuleNetworkACLRuleProtocolAll) isaNetworkACLRule() bool {
	return true
}

// UnmarshalNetworkACLRuleNetworkACLRuleProtocolAll unmarshals an instance of NetworkACLRuleNetworkACLRuleProtocolAll from the specified map of raw messages.
func UnmarshalNetworkACLRuleNetworkACLRuleProtocolAll(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLRuleNetworkACLRuleProtocolAll)
	err = core.UnmarshalPrimitive(m, "action", &obj.Action)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "destination", &obj.Destination)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "direction", &obj.Direction)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "source", &obj.Source)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACLRuleNetworkACLRuleProtocolIcmp : NetworkACLRuleNetworkACLRuleProtocolIcmp struct
// This model "extends" NetworkACLRule
type NetworkACLRuleNetworkACLRuleProtocolIcmp struct {
	// Whether to allow or deny matching traffic.
	Action *string `json:"action" validate:"required"`

	// The rule that this rule is immediately before. If absent, this is the last rule.
	Before *NetworkACLRuleReference `json:"before,omitempty"`

	// The date and time that the rule was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The destination CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses.
	Destination *string `json:"destination" validate:"required"`

	// Whether the traffic to be matched is `inbound` or `outbound`.
	Direction *string `json:"direction" validate:"required"`

	// The URL for this network ACL rule.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this network ACL rule.
	ID *string `json:"id" validate:"required"`

	// The IP version for this rule.
	IPVersion *string `json:"ip_version" validate:"required"`

	// The user-defined name for this rule. Names must be unique within the network ACL the rule resides in. If
	// unspecified, the name will be a hyphenated list of randomly-selected words.
	Name *string `json:"name" validate:"required"`

	// The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses.
	Source *string `json:"source" validate:"required"`

	// The ICMP traffic code to allow. If unspecified, all codes are allowed. This can only be specified if type is also
	// specified.
	Code *int64 `json:"code,omitempty"`

	// The protocol to enforce.
	Protocol *string `json:"protocol" validate:"required"`

	// The ICMP traffic type to allow. If unspecified, all types are allowed by this rule.
	Type *int64 `json:"type,omitempty"`
}

// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolIcmp.Action property.
// Whether to allow or deny matching traffic.
const (
	NetworkACLRuleNetworkACLRuleProtocolIcmpActionAllowConst = "allow"
	NetworkACLRuleNetworkACLRuleProtocolIcmpActionDenyConst  = "deny"
)

// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolIcmp.Direction property.
// Whether the traffic to be matched is `inbound` or `outbound`.
const (
	NetworkACLRuleNetworkACLRuleProtocolIcmpDirectionInboundConst  = "inbound"
	NetworkACLRuleNetworkACLRuleProtocolIcmpDirectionOutboundConst = "outbound"
)

// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolIcmp.IPVersion property.
// The IP version for this rule.
const (
	NetworkACLRuleNetworkACLRuleProtocolIcmpIPVersionIpv4Const = "ipv4"
	NetworkACLRuleNetworkACLRuleProtocolIcmpIPVersionIpv6Const = "ipv6"
)

// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolIcmp.Protocol property.
// The protocol to enforce.
const (
	NetworkACLRuleNetworkACLRuleProtocolIcmpProtocolIcmpConst = "icmp"
)

func (*NetworkACLRuleNetworkACLRuleProtocolIcmp) isaNetworkACLRule() bool {
	return true
}

// UnmarshalNetworkACLRuleNetworkACLRuleProtocolIcmp unmarshals an instance of NetworkACLRuleNetworkACLRuleProtocolIcmp from the specified map of raw messages.
func UnmarshalNetworkACLRuleNetworkACLRuleProtocolIcmp(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLRuleNetworkACLRuleProtocolIcmp)
	err = core.UnmarshalPrimitive(m, "action", &obj.Action)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "destination", &obj.Destination)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "direction", &obj.Direction)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "source", &obj.Source)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "code", &obj.Code)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// NetworkACLRuleNetworkACLRuleProtocolTcpudp : NetworkACLRuleNetworkACLRuleProtocolTcpudp struct
// This model "extends" NetworkACLRule
type NetworkACLRuleNetworkACLRuleProtocolTcpudp struct {
	// Whether to allow or deny matching traffic.
	Action *string `json:"action" validate:"required"`

	// The rule that this rule is immediately before. If absent, this is the last rule.
	Before *NetworkACLRuleReference `json:"before,omitempty"`

	// The date and time that the rule was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The destination CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses.
	Destination *string `json:"destination" validate:"required"`

	// Whether the traffic to be matched is `inbound` or `outbound`.
	Direction *string `json:"direction" validate:"required"`

	// The URL for this network ACL rule.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this network ACL rule.
	ID *string `json:"id" validate:"required"`

	// The IP version for this rule.
	IPVersion *string `json:"ip_version" validate:"required"`

	// The user-defined name for this rule. Names must be unique within the network ACL the rule resides in. If
	// unspecified, the name will be a hyphenated list of randomly-selected words.
	Name *string `json:"name" validate:"required"`

	// The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses.
	Source *string `json:"source" validate:"required"`

	// The inclusive upper bound of TCP/UDP destination port range.
	DestinationPortMax *int64 `json:"destination_port_max,omitempty"`

	// The inclusive lower bound of TCP/UDP destination port range.
	DestinationPortMin *int64 `json:"destination_port_min,omitempty"`

	// The protocol to enforce.
	Protocol *string `json:"protocol" validate:"required"`

	// The inclusive upper bound of TCP/UDP source port range.
	SourcePortMax *int64 `json:"source_port_max,omitempty"`

	// The inclusive lower bound of TCP/UDP source port range.
	SourcePortMin *int64 `json:"source_port_min,omitempty"`
}

// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolTcpudp.Action property.
// Whether to allow or deny matching traffic.
const (
	NetworkACLRuleNetworkACLRuleProtocolTcpudpActionAllowConst = "allow"
	NetworkACLRuleNetworkACLRuleProtocolTcpudpActionDenyConst  = "deny"
)

// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolTcpudp.Direction property.
// Whether the traffic to be matched is `inbound` or `outbound`.
const (
	NetworkACLRuleNetworkACLRuleProtocolTcpudpDirectionInboundConst  = "inbound"
	NetworkACLRuleNetworkACLRuleProtocolTcpudpDirectionOutboundConst = "outbound"
)

// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolTcpudp.IPVersion property.
// The IP version for this rule.
const (
	NetworkACLRuleNetworkACLRuleProtocolTcpudpIPVersionIpv4Const = "ipv4"
	NetworkACLRuleNetworkACLRuleProtocolTcpudpIPVersionIpv6Const = "ipv6"
)

// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolTcpudp.Protocol property.
// The protocol to enforce.
const (
	NetworkACLRuleNetworkACLRuleProtocolTcpudpProtocolTCPConst = "tcp"
	NetworkACLRuleNetworkACLRuleProtocolTcpudpProtocolUDPConst = "udp"
)

func (*NetworkACLRuleNetworkACLRuleProtocolTcpudp) isaNetworkACLRule() bool {
	return true
}

// UnmarshalNetworkACLRuleNetworkACLRuleProtocolTcpudp unmarshals an instance of NetworkACLRuleNetworkACLRuleProtocolTcpudp from the specified map of raw messages.
func UnmarshalNetworkACLRuleNetworkACLRuleProtocolTcpudp(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(NetworkACLRuleNetworkACLRuleProtocolTcpudp)
	err = core.UnmarshalPrimitive(m, "action", &obj.Action)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "destination", &obj.Destination)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "direction", &obj.Direction)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "source", &obj.Source)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "destination_port_max", &obj.DestinationPortMax)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "destination_port_min", &obj.DestinationPortMin)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "source_port_max", &obj.SourcePortMax)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "source_port_min", &obj.SourcePortMin)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// OperatingSystemIdentityByHref : OperatingSystemIdentityByHref struct
// This model "extends" OperatingSystemIdentity
type OperatingSystemIdentityByHref struct {
	// The URL for this operating system.
	Href *string `json:"href" validate:"required"`
}

// NewOperatingSystemIdentityByHref : Instantiate OperatingSystemIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewOperatingSystemIdentityByHref(href string) (model *OperatingSystemIdentityByHref, err error) {
	model = &OperatingSystemIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*OperatingSystemIdentityByHref) isaOperatingSystemIdentity() bool {
	return true
}

// UnmarshalOperatingSystemIdentityByHref unmarshals an instance of OperatingSystemIdentityByHref from the specified map of raw messages.
func UnmarshalOperatingSystemIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(OperatingSystemIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// OperatingSystemIdentityByName : OperatingSystemIdentityByName struct
// This model "extends" OperatingSystemIdentity
type OperatingSystemIdentityByName struct {
	// The globally unique name for this operating system.
	Name *string `json:"name" validate:"required"`
}

// NewOperatingSystemIdentityByName : Instantiate OperatingSystemIdentityByName (Generic Model Constructor)
func (*VpcV1) NewOperatingSystemIdentityByName(name string) (model *OperatingSystemIdentityByName, err error) {
	model = &OperatingSystemIdentityByName{
		Name: core.StringPtr(name),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*OperatingSystemIdentityByName) isaOperatingSystemIdentity() bool {
	return true
}

// UnmarshalOperatingSystemIdentityByName unmarshals an instance of OperatingSystemIdentityByName from the specified map of raw messages.
func UnmarshalOperatingSystemIdentityByName(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(OperatingSystemIdentityByName)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// PublicGatewayFloatingIPPrototypeFloatingIPIdentity : Identifies a floating IP by a unique property.
// Models which "extend" this model:
// - PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID
// - PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN
// - PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref
// - PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress
// This model "extends" PublicGatewayFloatingIPPrototype
type PublicGatewayFloatingIPPrototypeFloatingIPIdentity struct {
	// The unique identifier for this floating IP.
	ID *string `json:"id,omitempty"`

	// The CRN for this floating IP.
	CRN *string `json:"crn,omitempty"`

	// The URL for this floating IP.
	Href *string `json:"href,omitempty"`

	// The globally unique IP address.
	Address *string `json:"address,omitempty"`
}

func (*PublicGatewayFloatingIPPrototypeFloatingIPIdentity) isaPublicGatewayFloatingIPPrototypeFloatingIPIdentity() bool {
	return true
}

type PublicGatewayFloatingIPPrototypeFloatingIPIdentityIntf interface {
	PublicGatewayFloatingIPPrototypeIntf
	isaPublicGatewayFloatingIPPrototypeFloatingIPIdentity() bool
}

func (*PublicGatewayFloatingIPPrototypeFloatingIPIdentity) isaPublicGatewayFloatingIPPrototype() bool {
	return true
}

// UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPIdentity unmarshals an instance of PublicGatewayFloatingIPPrototypeFloatingIPIdentity from the specified map of raw messages.
func UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(PublicGatewayFloatingIPPrototypeFloatingIPIdentity)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "address", &obj.Address)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext : PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext struct
// This model "extends" PublicGatewayFloatingIPPrototype
type PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext struct {
	// The unique user-defined name for this floating IP. If unspecified, the name will be a hyphenated list of
	// randomly-selected words.
	Name *string `json:"name,omitempty"`

	// The resource group to use. If unspecified, the account's [default resource
	// group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
	ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`
}

func (*PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext) isaPublicGatewayFloatingIPPrototype() bool {
	return true
}

// UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext unmarshals an instance of PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext from the specified map of raw messages.
func UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// PublicGatewayIdentityByCRN : PublicGatewayIdentityByCRN struct
// This model "extends" PublicGatewayIdentity
type PublicGatewayIdentityByCRN struct {
	// The CRN for this public gateway.
	CRN *string `json:"crn" validate:"required"`
}

// NewPublicGatewayIdentityByCRN : Instantiate PublicGatewayIdentityByCRN (Generic Model Constructor)
func (*VpcV1) NewPublicGatewayIdentityByCRN(crn string) (model *PublicGatewayIdentityByCRN, err error) {
	model = &PublicGatewayIdentityByCRN{
		CRN: core.StringPtr(crn),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*PublicGatewayIdentityByCRN) isaPublicGatewayIdentity() bool {
	return true
}

// UnmarshalPublicGatewayIdentityByCRN unmarshals an instance of PublicGatewayIdentityByCRN from the specified map of raw messages.
func UnmarshalPublicGatewayIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(PublicGatewayIdentityByCRN)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// PublicGatewayIdentityByHref : PublicGatewayIdentityByHref struct
// This model "extends" PublicGatewayIdentity
type PublicGatewayIdentityByHref struct {
	// The URL for this public gateway.
	Href *string `json:"href" validate:"required"`
}

// NewPublicGatewayIdentityByHref : Instantiate PublicGatewayIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewPublicGatewayIdentityByHref(href string) (model *PublicGatewayIdentityByHref, err error) {
	model = &PublicGatewayIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*PublicGatewayIdentityByHref) isaPublicGatewayIdentity() bool {
	return true
}

// UnmarshalPublicGatewayIdentityByHref unmarshals an instance of PublicGatewayIdentityByHref from the specified map of raw messages.
func UnmarshalPublicGatewayIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(PublicGatewayIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// PublicGatewayIdentityByID : PublicGatewayIdentityByID struct
// This model "extends" PublicGatewayIdentity
type PublicGatewayIdentityByID struct {
	// The unique identifier for this public gateway.
	ID *string `json:"id" validate:"required"`
}

// NewPublicGatewayIdentityByID : Instantiate PublicGatewayIdentityByID (Generic Model Constructor)
func (*VpcV1) NewPublicGatewayIdentityByID(id string) (model *PublicGatewayIdentityByID, err error) {
	model = &PublicGatewayIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*PublicGatewayIdentityByID) isaPublicGatewayIdentity() bool {
	return true
}

// UnmarshalPublicGatewayIdentityByID unmarshals an instance of PublicGatewayIdentityByID from the specified map of raw messages.
func UnmarshalPublicGatewayIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(PublicGatewayIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ReservedIPTargetPrototypeEndpointGatewayIdentity : ReservedIPTargetPrototypeEndpointGatewayIdentity struct
// Models which "extend" this model:
// - ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID
// - ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN
// - ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref
// This model "extends" ReservedIPTargetPrototype
type ReservedIPTargetPrototypeEndpointGatewayIdentity struct {
	// The unique identifier for this endpoint gateway.
	ID *string `json:"id,omitempty"`

	// The CRN for this endpoint gateway.
	CRN *string `json:"crn,omitempty"`

	// The URL for this endpoint gateway.
	Href *string `json:"href,omitempty"`
}

func (*ReservedIPTargetPrototypeEndpointGatewayIdentity) isaReservedIPTargetPrototypeEndpointGatewayIdentity() bool {
	return true
}

type ReservedIPTargetPrototypeEndpointGatewayIdentityIntf interface {
	ReservedIPTargetPrototypeIntf
	isaReservedIPTargetPrototypeEndpointGatewayIdentity() bool
}

func (*ReservedIPTargetPrototypeEndpointGatewayIdentity) isaReservedIPTargetPrototype() bool {
	return true
}

// UnmarshalReservedIPTargetPrototypeEndpointGatewayIdentity unmarshals an instance of ReservedIPTargetPrototypeEndpointGatewayIdentity from the specified map of raw messages.
func UnmarshalReservedIPTargetPrototypeEndpointGatewayIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ReservedIPTargetPrototypeEndpointGatewayIdentity)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ReservedIPTargetEndpointGatewayReference : ReservedIPTargetEndpointGatewayReference struct
// This model "extends" ReservedIPTarget
type ReservedIPTargetEndpointGatewayReference struct {
	// The CRN for this endpoint gateway.
	CRN *string `json:"crn" validate:"required"`

	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *EndpointGatewayReferenceDeleted `json:"deleted,omitempty"`

	// The URL for this endpoint gateway.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this endpoint gateway.
	ID *string `json:"id" validate:"required"`

	// The unique user-defined name for this endpoint gateway.
	Name *string `json:"name" validate:"required"`

	// The type of resource referenced.
	ResourceType *string `json:"resource_type" validate:"required"`
}

// Constants associated with the ReservedIPTargetEndpointGatewayReference.ResourceType property.
// The type of resource referenced.
const (
	ReservedIPTargetEndpointGatewayReferenceResourceTypeEndpointGatewayConst = "endpoint_gateway"
)

func (*ReservedIPTargetEndpointGatewayReference) isaReservedIPTarget() bool {
	return true
}

// UnmarshalReservedIPTargetEndpointGatewayReference unmarshals an instance of ReservedIPTargetEndpointGatewayReference from the specified map of raw messages.
func UnmarshalReservedIPTargetEndpointGatewayReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ReservedIPTargetEndpointGatewayReference)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalEndpointGatewayReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ResourceGroupIdentityByID : ResourceGroupIdentityByID struct
// This model "extends" ResourceGroupIdentity
type ResourceGroupIdentityByID struct {
	// The unique identifier for this resource group.
	ID *string `json:"id" validate:"required"`
}

// NewResourceGroupIdentityByID : Instantiate ResourceGroupIdentityByID (Generic Model Constructor)
func (*VpcV1) NewResourceGroupIdentityByID(id string) (model *ResourceGroupIdentityByID, err error) {
	model = &ResourceGroupIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*ResourceGroupIdentityByID) isaResourceGroupIdentity() bool {
	return true
}

// UnmarshalResourceGroupIdentityByID unmarshals an instance of ResourceGroupIdentityByID from the specified map of raw messages.
func UnmarshalResourceGroupIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ResourceGroupIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// RouteNextHopIP : RouteNextHopIP struct
// This model "extends" RouteNextHop
type RouteNextHopIP struct {
	// The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this
	// property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing
	// and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
	Address *string `json:"address" validate:"required"`
}

func (*RouteNextHopIP) isaRouteNextHop() bool {
	return true
}

// UnmarshalRouteNextHopIP unmarshals an instance of RouteNextHopIP from the specified map of raw messages.
func UnmarshalRouteNextHopIP(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(RouteNextHopIP)
	err = core.UnmarshalPrimitive(m, "address", &obj.Address)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// RouteNextHopPrototypeRouteNextHopIP : The IP address of the next hop to which to route packets.
// This model "extends" RouteNextHopPrototype
type RouteNextHopPrototypeRouteNextHopIP struct {
	// The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this
	// property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing
	// and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
	Address *string `json:"address" validate:"required"`
}

// NewRouteNextHopPrototypeRouteNextHopIP : Instantiate RouteNextHopPrototypeRouteNextHopIP (Generic Model Constructor)
func (*VpcV1) NewRouteNextHopPrototypeRouteNextHopIP(address string) (model *RouteNextHopPrototypeRouteNextHopIP, err error) {
	model = &RouteNextHopPrototypeRouteNextHopIP{
		Address: core.StringPtr(address),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*RouteNextHopPrototypeRouteNextHopIP) isaRouteNextHopPrototype() bool {
	return true
}

// UnmarshalRouteNextHopPrototypeRouteNextHopIP unmarshals an instance of RouteNextHopPrototypeRouteNextHopIP from the specified map of raw messages.
func UnmarshalRouteNextHopPrototypeRouteNextHopIP(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(RouteNextHopPrototypeRouteNextHopIP)
	err = core.UnmarshalPrimitive(m, "address", &obj.Address)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// RouteNextHopPrototypeVPNGatewayConnectionIdentity : Identifies a VPN gateway connection by a unique property.
// Models which "extend" this model:
// - RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID
// - RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref
// This model "extends" RouteNextHopPrototype
type RouteNextHopPrototypeVPNGatewayConnectionIdentity struct {
	// The unique identifier for this VPN gateway connection.
	ID *string `json:"id,omitempty"`

	// The VPN connection's canonical URL.
	Href *string `json:"href,omitempty"`
}

func (*RouteNextHopPrototypeVPNGatewayConnectionIdentity) isaRouteNextHopPrototypeVPNGatewayConnectionIdentity() bool {
	return true
}

type RouteNextHopPrototypeVPNGatewayConnectionIdentityIntf interface {
	RouteNextHopPrototypeIntf
	isaRouteNextHopPrototypeVPNGatewayConnectionIdentity() bool
}

func (*RouteNextHopPrototypeVPNGatewayConnectionIdentity) isaRouteNextHopPrototype() bool {
	return true
}

// UnmarshalRouteNextHopPrototypeVPNGatewayConnectionIdentity unmarshals an instance of RouteNextHopPrototypeVPNGatewayConnectionIdentity from the specified map of raw messages.
func UnmarshalRouteNextHopPrototypeVPNGatewayConnectionIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(RouteNextHopPrototypeVPNGatewayConnectionIdentity)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// RouteNextHopVPNGatewayConnectionReference : RouteNextHopVPNGatewayConnectionReference struct
// This model "extends" RouteNextHop
type RouteNextHopVPNGatewayConnectionReference struct {
	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *VPNGatewayConnectionReferenceDeleted `json:"deleted,omitempty"`

	// The VPN connection's canonical URL.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this VPN gateway connection.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this VPN connection.
	Name *string `json:"name" validate:"required"`

	// The resource type.
	ResourceType *string `json:"resource_type" validate:"required"`
}

// Constants associated with the RouteNextHopVPNGatewayConnectionReference.ResourceType property.
// The resource type.
const (
	RouteNextHopVPNGatewayConnectionReferenceResourceTypeVPNGatewayConnectionConst = "vpn_gateway_connection"
)

func (*RouteNextHopVPNGatewayConnectionReference) isaRouteNextHop() bool {
	return true
}

// UnmarshalRouteNextHopVPNGatewayConnectionReference unmarshals an instance of RouteNextHopVPNGatewayConnectionReference from the specified map of raw messages.
func UnmarshalRouteNextHopVPNGatewayConnectionReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(RouteNextHopVPNGatewayConnectionReference)
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVPNGatewayConnectionReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// RoutingTableIdentityByHref : RoutingTableIdentityByHref struct
// This model "extends" RoutingTableIdentity
type RoutingTableIdentityByHref struct {
	// The URL for this routing table.
	Href *string `json:"href" validate:"required"`
}

// NewRoutingTableIdentityByHref : Instantiate RoutingTableIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewRoutingTableIdentityByHref(href string) (model *RoutingTableIdentityByHref, err error) {
	model = &RoutingTableIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*RoutingTableIdentityByHref) isaRoutingTableIdentity() bool {
	return true
}

// UnmarshalRoutingTableIdentityByHref unmarshals an instance of RoutingTableIdentityByHref from the specified map of raw messages.
func UnmarshalRoutingTableIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(RoutingTableIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// RoutingTableIdentityByID : RoutingTableIdentityByID struct
// This model "extends" RoutingTableIdentity
type RoutingTableIdentityByID struct {
	// The unique identifier for this routing table.
	ID *string `json:"id" validate:"required"`
}

// NewRoutingTableIdentityByID : Instantiate RoutingTableIdentityByID (Generic Model Constructor)
func (*VpcV1) NewRoutingTableIdentityByID(id string) (model *RoutingTableIdentityByID, err error) {
	model = &RoutingTableIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*RoutingTableIdentityByID) isaRoutingTableIdentity() bool {
	return true
}

// UnmarshalRoutingTableIdentityByID unmarshals an instance of RoutingTableIdentityByID from the specified map of raw messages.
func UnmarshalRoutingTableIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(RoutingTableIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupIdentityByCRN : SecurityGroupIdentityByCRN struct
// This model "extends" SecurityGroupIdentity
type SecurityGroupIdentityByCRN struct {
	// The security group's CRN.
	CRN *string `json:"crn" validate:"required"`
}

// NewSecurityGroupIdentityByCRN : Instantiate SecurityGroupIdentityByCRN (Generic Model Constructor)
func (*VpcV1) NewSecurityGroupIdentityByCRN(crn string) (model *SecurityGroupIdentityByCRN, err error) {
	model = &SecurityGroupIdentityByCRN{
		CRN: core.StringPtr(crn),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*SecurityGroupIdentityByCRN) isaSecurityGroupIdentity() bool {
	return true
}

// UnmarshalSecurityGroupIdentityByCRN unmarshals an instance of SecurityGroupIdentityByCRN from the specified map of raw messages.
func UnmarshalSecurityGroupIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupIdentityByCRN)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupIdentityByHref : SecurityGroupIdentityByHref struct
// This model "extends" SecurityGroupIdentity
type SecurityGroupIdentityByHref struct {
	// The security group's canonical URL.
	Href *string `json:"href" validate:"required"`
}

// NewSecurityGroupIdentityByHref : Instantiate SecurityGroupIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewSecurityGroupIdentityByHref(href string) (model *SecurityGroupIdentityByHref, err error) {
	model = &SecurityGroupIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*SecurityGroupIdentityByHref) isaSecurityGroupIdentity() bool {
	return true
}

// UnmarshalSecurityGroupIdentityByHref unmarshals an instance of SecurityGroupIdentityByHref from the specified map of raw messages.
func UnmarshalSecurityGroupIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupIdentityByID : SecurityGroupIdentityByID struct
// This model "extends" SecurityGroupIdentity
type SecurityGroupIdentityByID struct {
	// The unique identifier for this security group.
	ID *string `json:"id" validate:"required"`
}

// NewSecurityGroupIdentityByID : Instantiate SecurityGroupIdentityByID (Generic Model Constructor)
func (*VpcV1) NewSecurityGroupIdentityByID(id string) (model *SecurityGroupIdentityByID, err error) {
	model = &SecurityGroupIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*SecurityGroupIdentityByID) isaSecurityGroupIdentity() bool {
	return true
}

// UnmarshalSecurityGroupIdentityByID unmarshals an instance of SecurityGroupIdentityByID from the specified map of raw messages.
func UnmarshalSecurityGroupIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll : When `protocol` is `all`, then it's invalid to specify `port_min`, `port_max`, `type` or
// `code`.
// This model "extends" SecurityGroupRulePrototype
type SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll struct {
	// The direction of traffic to enforce, either `inbound` or `outbound`.
	Direction *string `json:"direction" validate:"required"`

	// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
	// used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
	// interfaces) in that group matching this IP version.
	IPVersion *string `json:"ip_version,omitempty"`

	Remote SecurityGroupRuleRemotePrototypeIntf `json:"remote,omitempty"`

	// The protocol to enforce.
	Protocol *string `json:"protocol" validate:"required"`
}

// Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll.Direction property.
// The direction of traffic to enforce, either `inbound` or `outbound`.
const (
	SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllDirectionInboundConst  = "inbound"
	SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllDirectionOutboundConst = "outbound"
)

// Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll.IPVersion property.
// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
// used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
// interfaces) in that group matching this IP version.
const (
	SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllIPVersionIpv4Const = "ipv4"
)

// Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll.Protocol property.
// The protocol to enforce.
const (
	SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllProtocolAllConst = "all"
)

// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAll : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll (Generic Model Constructor)
func (*VpcV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAll(direction string, protocol string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll, err error) {
	model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll{
		Direction: core.StringPtr(direction),
		Protocol:  core.StringPtr(protocol),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll) isaSecurityGroupRulePrototype() bool {
	return true
}

// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAll unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll from the specified map of raw messages.
func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAll(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll)
	err = core.UnmarshalPrimitive(m, "direction", &obj.Direction)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRuleRemotePrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp : When `protocol` is `icmp`, then the rule may also contain fields to specify an ICMP `type` and `code`. Field `code`
// may only be specified if `type` is also specified. If type is not specified, then traffic is allowed for all types
// and codes. If type is specified and code is not specified, then traffic is allowed with the specified type for all
// codes.
// This model "extends" SecurityGroupRulePrototype
type SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp struct {
	// The direction of traffic to enforce, either `inbound` or `outbound`.
	Direction *string `json:"direction" validate:"required"`

	// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
	// used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
	// interfaces) in that group matching this IP version.
	IPVersion *string `json:"ip_version,omitempty"`

	Remote SecurityGroupRuleRemotePrototypeIntf `json:"remote,omitempty"`

	// The ICMP traffic code to allow.
	Code *int64 `json:"code,omitempty"`

	// The protocol to enforce.
	Protocol *string `json:"protocol" validate:"required"`

	// The ICMP traffic type to allow.
	Type *int64 `json:"type,omitempty"`
}

// Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp.Direction property.
// The direction of traffic to enforce, either `inbound` or `outbound`.
const (
	SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpDirectionInboundConst  = "inbound"
	SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpDirectionOutboundConst = "outbound"
)

// Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp.IPVersion property.
// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
// used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
// interfaces) in that group matching this IP version.
const (
	SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpIPVersionIpv4Const = "ipv4"
)

// Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp.Protocol property.
// The protocol to enforce.
const (
	SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpProtocolIcmpConst = "icmp"
)

// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp (Generic Model Constructor)
func (*VpcV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp(direction string, protocol string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp, err error) {
	model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp{
		Direction: core.StringPtr(direction),
		Protocol:  core.StringPtr(protocol),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp) isaSecurityGroupRulePrototype() bool {
	return true
}

// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp from the specified map of raw messages.
func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp)
	err = core.UnmarshalPrimitive(m, "direction", &obj.Direction)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRuleRemotePrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "code", &obj.Code)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp : If `protocol` is either `tcp` or `udp`, then the rule may also contain `port_min` and
// `port_max`. Either both must be set, or neither. When neither is set then traffic is allowed on all ports. For a
// single port, set both to the same value.
// This model "extends" SecurityGroupRulePrototype
type SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp struct {
	// The direction of traffic to enforce, either `inbound` or `outbound`.
	Direction *string `json:"direction" validate:"required"`

	// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
	// used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
	// interfaces) in that group matching this IP version.
	IPVersion *string `json:"ip_version,omitempty"`

	Remote SecurityGroupRuleRemotePrototypeIntf `json:"remote,omitempty"`

	// The inclusive upper bound of TCP/UDP port range.
	PortMax *int64 `json:"port_max,omitempty"`

	// The inclusive lower bound of TCP/UDP port range.
	PortMin *int64 `json:"port_min,omitempty"`

	// The protocol to enforce.
	Protocol *string `json:"protocol" validate:"required"`
}

// Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp.Direction property.
// The direction of traffic to enforce, either `inbound` or `outbound`.
const (
	SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpDirectionInboundConst  = "inbound"
	SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpDirectionOutboundConst = "outbound"
)

// Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp.IPVersion property.
// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
// used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
// interfaces) in that group matching this IP version.
const (
	SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpIPVersionIpv4Const = "ipv4"
)

// Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp.Protocol property.
// The protocol to enforce.
const (
	SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpProtocolTCPConst = "tcp"
	SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpProtocolUDPConst = "udp"
)

// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp (Generic Model Constructor)
func (*VpcV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp(direction string, protocol string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp, err error) {
	model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp{
		Direction: core.StringPtr(direction),
		Protocol:  core.StringPtr(protocol),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp) isaSecurityGroupRulePrototype() bool {
	return true
}

// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp from the specified map of raw messages.
func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp)
	err = core.UnmarshalPrimitive(m, "direction", &obj.Direction)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRuleRemotePrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "port_max", &obj.PortMax)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "port_min", &obj.PortMin)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupRuleRemotePatchCIDR : SecurityGroupRuleRemotePatchCIDR struct
// This model "extends" SecurityGroupRuleRemotePatch
type SecurityGroupRuleRemotePatchCIDR struct {
	// The CIDR block. This property may add support for IPv6 CIDR blocks in the future. When processing a value in this
	// property, verify that the CIDR block is in an expected format. If it is not, log an error. Optionally halt
	// processing and surface the error, or bypass the resource on which the unexpected CIDR block format was encountered.
	CIDRBlock *string `json:"cidr_block" validate:"required"`
}

// NewSecurityGroupRuleRemotePatchCIDR : Instantiate SecurityGroupRuleRemotePatchCIDR (Generic Model Constructor)
func (*VpcV1) NewSecurityGroupRuleRemotePatchCIDR(cidrBlock string) (model *SecurityGroupRuleRemotePatchCIDR, err error) {
	model = &SecurityGroupRuleRemotePatchCIDR{
		CIDRBlock: core.StringPtr(cidrBlock),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*SecurityGroupRuleRemotePatchCIDR) isaSecurityGroupRuleRemotePatch() bool {
	return true
}

// UnmarshalSecurityGroupRuleRemotePatchCIDR unmarshals an instance of SecurityGroupRuleRemotePatchCIDR from the specified map of raw messages.
func UnmarshalSecurityGroupRuleRemotePatchCIDR(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupRuleRemotePatchCIDR)
	err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupRuleRemotePatchIP : SecurityGroupRuleRemotePatchIP struct
// This model "extends" SecurityGroupRuleRemotePatch
type SecurityGroupRuleRemotePatchIP struct {
	// The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this
	// property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing
	// and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
	Address *string `json:"address" validate:"required"`
}

// NewSecurityGroupRuleRemotePatchIP : Instantiate SecurityGroupRuleRemotePatchIP (Generic Model Constructor)
func (*VpcV1) NewSecurityGroupRuleRemotePatchIP(address string) (model *SecurityGroupRuleRemotePatchIP, err error) {
	model = &SecurityGroupRuleRemotePatchIP{
		Address: core.StringPtr(address),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*SecurityGroupRuleRemotePatchIP) isaSecurityGroupRuleRemotePatch() bool {
	return true
}

// UnmarshalSecurityGroupRuleRemotePatchIP unmarshals an instance of SecurityGroupRuleRemotePatchIP from the specified map of raw messages.
func UnmarshalSecurityGroupRuleRemotePatchIP(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupRuleRemotePatchIP)
	err = core.UnmarshalPrimitive(m, "address", &obj.Address)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupRuleRemotePatchSecurityGroupIdentity : Identifies a security group by a unique property.
// Models which "extend" this model:
// - SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID
// - SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN
// - SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref
// This model "extends" SecurityGroupRuleRemotePatch
type SecurityGroupRuleRemotePatchSecurityGroupIdentity struct {
	// The unique identifier for this security group.
	ID *string `json:"id,omitempty"`

	// The security group's CRN.
	CRN *string `json:"crn,omitempty"`

	// The security group's canonical URL.
	Href *string `json:"href,omitempty"`
}

func (*SecurityGroupRuleRemotePatchSecurityGroupIdentity) isaSecurityGroupRuleRemotePatchSecurityGroupIdentity() bool {
	return true
}

type SecurityGroupRuleRemotePatchSecurityGroupIdentityIntf interface {
	SecurityGroupRuleRemotePatchIntf
	isaSecurityGroupRuleRemotePatchSecurityGroupIdentity() bool
}

func (*SecurityGroupRuleRemotePatchSecurityGroupIdentity) isaSecurityGroupRuleRemotePatch() bool {
	return true
}

// UnmarshalSecurityGroupRuleRemotePatchSecurityGroupIdentity unmarshals an instance of SecurityGroupRuleRemotePatchSecurityGroupIdentity from the specified map of raw messages.
func UnmarshalSecurityGroupRuleRemotePatchSecurityGroupIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupRuleRemotePatchSecurityGroupIdentity)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupRuleRemotePrototypeCIDR : SecurityGroupRuleRemotePrototypeCIDR struct
// This model "extends" SecurityGroupRuleRemotePrototype
type SecurityGroupRuleRemotePrototypeCIDR struct {
	// The CIDR block. This property may add support for IPv6 CIDR blocks in the future. When processing a value in this
	// property, verify that the CIDR block is in an expected format. If it is not, log an error. Optionally halt
	// processing and surface the error, or bypass the resource on which the unexpected CIDR block format was encountered.
	CIDRBlock *string `json:"cidr_block" validate:"required"`
}

// NewSecurityGroupRuleRemotePrototypeCIDR : Instantiate SecurityGroupRuleRemotePrototypeCIDR (Generic Model Constructor)
func (*VpcV1) NewSecurityGroupRuleRemotePrototypeCIDR(cidrBlock string) (model *SecurityGroupRuleRemotePrototypeCIDR, err error) {
	model = &SecurityGroupRuleRemotePrototypeCIDR{
		CIDRBlock: core.StringPtr(cidrBlock),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*SecurityGroupRuleRemotePrototypeCIDR) isaSecurityGroupRuleRemotePrototype() bool {
	return true
}

// UnmarshalSecurityGroupRuleRemotePrototypeCIDR unmarshals an instance of SecurityGroupRuleRemotePrototypeCIDR from the specified map of raw messages.
func UnmarshalSecurityGroupRuleRemotePrototypeCIDR(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupRuleRemotePrototypeCIDR)
	err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupRuleRemotePrototypeIP : SecurityGroupRuleRemotePrototypeIP struct
// This model "extends" SecurityGroupRuleRemotePrototype
type SecurityGroupRuleRemotePrototypeIP struct {
	// The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this
	// property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing
	// and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
	Address *string `json:"address" validate:"required"`
}

// NewSecurityGroupRuleRemotePrototypeIP : Instantiate SecurityGroupRuleRemotePrototypeIP (Generic Model Constructor)
func (*VpcV1) NewSecurityGroupRuleRemotePrototypeIP(address string) (model *SecurityGroupRuleRemotePrototypeIP, err error) {
	model = &SecurityGroupRuleRemotePrototypeIP{
		Address: core.StringPtr(address),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*SecurityGroupRuleRemotePrototypeIP) isaSecurityGroupRuleRemotePrototype() bool {
	return true
}

// UnmarshalSecurityGroupRuleRemotePrototypeIP unmarshals an instance of SecurityGroupRuleRemotePrototypeIP from the specified map of raw messages.
func UnmarshalSecurityGroupRuleRemotePrototypeIP(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupRuleRemotePrototypeIP)
	err = core.UnmarshalPrimitive(m, "address", &obj.Address)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupRuleRemotePrototypeSecurityGroupIdentity : Identifies a security group by a unique property.
// Models which "extend" this model:
// - SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID
// - SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN
// - SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref
// This model "extends" SecurityGroupRuleRemotePrototype
type SecurityGroupRuleRemotePrototypeSecurityGroupIdentity struct {
	// The unique identifier for this security group.
	ID *string `json:"id,omitempty"`

	// The security group's CRN.
	CRN *string `json:"crn,omitempty"`

	// The security group's canonical URL.
	Href *string `json:"href,omitempty"`
}

func (*SecurityGroupRuleRemotePrototypeSecurityGroupIdentity) isaSecurityGroupRuleRemotePrototypeSecurityGroupIdentity() bool {
	return true
}

type SecurityGroupRuleRemotePrototypeSecurityGroupIdentityIntf interface {
	SecurityGroupRuleRemotePrototypeIntf
	isaSecurityGroupRuleRemotePrototypeSecurityGroupIdentity() bool
}

func (*SecurityGroupRuleRemotePrototypeSecurityGroupIdentity) isaSecurityGroupRuleRemotePrototype() bool {
	return true
}

// UnmarshalSecurityGroupRuleRemotePrototypeSecurityGroupIdentity unmarshals an instance of SecurityGroupRuleRemotePrototypeSecurityGroupIdentity from the specified map of raw messages.
func UnmarshalSecurityGroupRuleRemotePrototypeSecurityGroupIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupRuleRemotePrototypeSecurityGroupIdentity)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupRuleRemoteCIDR : SecurityGroupRuleRemoteCIDR struct
// This model "extends" SecurityGroupRuleRemote
type SecurityGroupRuleRemoteCIDR struct {
	// The CIDR block. This property may add support for IPv6 CIDR blocks in the future. When processing a value in this
	// property, verify that the CIDR block is in an expected format. If it is not, log an error. Optionally halt
	// processing and surface the error, or bypass the resource on which the unexpected CIDR block format was encountered.
	CIDRBlock *string `json:"cidr_block" validate:"required"`
}

func (*SecurityGroupRuleRemoteCIDR) isaSecurityGroupRuleRemote() bool {
	return true
}

// UnmarshalSecurityGroupRuleRemoteCIDR unmarshals an instance of SecurityGroupRuleRemoteCIDR from the specified map of raw messages.
func UnmarshalSecurityGroupRuleRemoteCIDR(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupRuleRemoteCIDR)
	err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupRuleRemoteIP : SecurityGroupRuleRemoteIP struct
// This model "extends" SecurityGroupRuleRemote
type SecurityGroupRuleRemoteIP struct {
	// The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this
	// property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing
	// and surface the error, or bypass the resource on which the unexpected IP address format was encountered.
	Address *string `json:"address" validate:"required"`
}

func (*SecurityGroupRuleRemoteIP) isaSecurityGroupRuleRemote() bool {
	return true
}

// UnmarshalSecurityGroupRuleRemoteIP unmarshals an instance of SecurityGroupRuleRemoteIP from the specified map of raw messages.
func UnmarshalSecurityGroupRuleRemoteIP(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupRuleRemoteIP)
	err = core.UnmarshalPrimitive(m, "address", &obj.Address)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupRuleRemoteSecurityGroupReference : SecurityGroupRuleRemoteSecurityGroupReference struct
// This model "extends" SecurityGroupRuleRemote
type SecurityGroupRuleRemoteSecurityGroupReference struct {
	// The security group's CRN.
	CRN *string `json:"crn" validate:"required"`

	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *SecurityGroupReferenceDeleted `json:"deleted,omitempty"`

	// The security group's canonical URL.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this security group.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this security group. Names must be unique within the VPC the security group resides in.
	Name *string `json:"name" validate:"required"`
}

func (*SecurityGroupRuleRemoteSecurityGroupReference) isaSecurityGroupRuleRemote() bool {
	return true
}

// UnmarshalSecurityGroupRuleRemoteSecurityGroupReference unmarshals an instance of SecurityGroupRuleRemoteSecurityGroupReference from the specified map of raw messages.
func UnmarshalSecurityGroupRuleRemoteSecurityGroupReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupRuleRemoteSecurityGroupReference)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalSecurityGroupReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupRuleSecurityGroupRuleProtocolAll : When `protocol` is `all`, then it's invalid to specify `port_min`, `port_max`, `type` or
// `code`.
// This model "extends" SecurityGroupRule
type SecurityGroupRuleSecurityGroupRuleProtocolAll struct {
	// The direction of traffic to enforce, either `inbound` or `outbound`.
	Direction *string `json:"direction" validate:"required"`

	// The URL for this security group rule.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this security group rule.
	ID *string `json:"id" validate:"required"`

	// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
	// used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
	// interfaces) in that group matching this IP version.
	IPVersion *string `json:"ip_version,omitempty"`

	Remote SecurityGroupRuleRemoteIntf `json:"remote" validate:"required"`

	// The protocol to enforce.
	Protocol *string `json:"protocol" validate:"required"`
}

// Constants associated with the SecurityGroupRuleSecurityGroupRuleProtocolAll.Direction property.
// The direction of traffic to enforce, either `inbound` or `outbound`.
const (
	SecurityGroupRuleSecurityGroupRuleProtocolAllDirectionInboundConst  = "inbound"
	SecurityGroupRuleSecurityGroupRuleProtocolAllDirectionOutboundConst = "outbound"
)

// Constants associated with the SecurityGroupRuleSecurityGroupRuleProtocolAll.IPVersion property.
// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
// used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
// interfaces) in that group matching this IP version.
const (
	SecurityGroupRuleSecurityGroupRuleProtocolAllIPVersionIpv4Const = "ipv4"
)

// Constants associated with the SecurityGroupRuleSecurityGroupRuleProtocolAll.Protocol property.
// The protocol to enforce.
const (
	SecurityGroupRuleSecurityGroupRuleProtocolAllProtocolAllConst = "all"
)

func (*SecurityGroupRuleSecurityGroupRuleProtocolAll) isaSecurityGroupRule() bool {
	return true
}

// UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolAll unmarshals an instance of SecurityGroupRuleSecurityGroupRuleProtocolAll from the specified map of raw messages.
func UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolAll(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupRuleSecurityGroupRuleProtocolAll)
	err = core.UnmarshalPrimitive(m, "direction", &obj.Direction)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRuleRemote)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupRuleSecurityGroupRuleProtocolIcmp : When `protocol` is `icmp`, then the rule may also contain fields to specify an ICMP `type` and `code`. Field `code`
// may only be specified if `type` is also specified. If type is not specified, then traffic is allowed for all types
// and codes. If type is specified and code is not specified, then traffic is allowed with the specified type for all
// codes.
// This model "extends" SecurityGroupRule
type SecurityGroupRuleSecurityGroupRuleProtocolIcmp struct {
	// The direction of traffic to enforce, either `inbound` or `outbound`.
	Direction *string `json:"direction" validate:"required"`

	// The URL for this security group rule.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this security group rule.
	ID *string `json:"id" validate:"required"`

	// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
	// used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
	// interfaces) in that group matching this IP version.
	IPVersion *string `json:"ip_version,omitempty"`

	Remote SecurityGroupRuleRemoteIntf `json:"remote" validate:"required"`

	// The ICMP traffic code to allow.
	Code *int64 `json:"code,omitempty"`

	// The protocol to enforce.
	Protocol *string `json:"protocol" validate:"required"`

	// The ICMP traffic type to allow.
	Type *int64 `json:"type,omitempty"`
}

// Constants associated with the SecurityGroupRuleSecurityGroupRuleProtocolIcmp.Direction property.
// The direction of traffic to enforce, either `inbound` or `outbound`.
const (
	SecurityGroupRuleSecurityGroupRuleProtocolIcmpDirectionInboundConst  = "inbound"
	SecurityGroupRuleSecurityGroupRuleProtocolIcmpDirectionOutboundConst = "outbound"
)

// Constants associated with the SecurityGroupRuleSecurityGroupRuleProtocolIcmp.IPVersion property.
// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
// used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
// interfaces) in that group matching this IP version.
const (
	SecurityGroupRuleSecurityGroupRuleProtocolIcmpIPVersionIpv4Const = "ipv4"
)

// Constants associated with the SecurityGroupRuleSecurityGroupRuleProtocolIcmp.Protocol property.
// The protocol to enforce.
const (
	SecurityGroupRuleSecurityGroupRuleProtocolIcmpProtocolIcmpConst = "icmp"
)

func (*SecurityGroupRuleSecurityGroupRuleProtocolIcmp) isaSecurityGroupRule() bool {
	return true
}

// UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolIcmp unmarshals an instance of SecurityGroupRuleSecurityGroupRuleProtocolIcmp from the specified map of raw messages.
func UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolIcmp(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupRuleSecurityGroupRuleProtocolIcmp)
	err = core.UnmarshalPrimitive(m, "direction", &obj.Direction)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRuleRemote)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "code", &obj.Code)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "type", &obj.Type)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupRuleSecurityGroupRuleProtocolTcpudp : If `protocol` is either `tcp` or `udp`, then the rule may also contain `port_min` and
// `port_max`. Either both must be set, or neither. When neither is set then traffic is allowed on all ports. For a
// single port, set both to the same value.
// This model "extends" SecurityGroupRule
type SecurityGroupRuleSecurityGroupRuleProtocolTcpudp struct {
	// The direction of traffic to enforce, either `inbound` or `outbound`.
	Direction *string `json:"direction" validate:"required"`

	// The URL for this security group rule.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this security group rule.
	ID *string `json:"id" validate:"required"`

	// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
	// used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
	// interfaces) in that group matching this IP version.
	IPVersion *string `json:"ip_version,omitempty"`

	Remote SecurityGroupRuleRemoteIntf `json:"remote" validate:"required"`

	// The inclusive upper bound of TCP/UDP port range.
	PortMax *int64 `json:"port_max,omitempty"`

	// The inclusive lower bound of TCP/UDP port range.
	PortMin *int64 `json:"port_min,omitempty"`

	// The protocol to enforce.
	Protocol *string `json:"protocol" validate:"required"`
}

// Constants associated with the SecurityGroupRuleSecurityGroupRuleProtocolTcpudp.Direction property.
// The direction of traffic to enforce, either `inbound` or `outbound`.
const (
	SecurityGroupRuleSecurityGroupRuleProtocolTcpudpDirectionInboundConst  = "inbound"
	SecurityGroupRuleSecurityGroupRuleProtocolTcpudpDirectionOutboundConst = "outbound"
)

// Constants associated with the SecurityGroupRuleSecurityGroupRuleProtocolTcpudp.IPVersion property.
// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, if they are
// used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses (network
// interfaces) in that group matching this IP version.
const (
	SecurityGroupRuleSecurityGroupRuleProtocolTcpudpIPVersionIpv4Const = "ipv4"
)

// Constants associated with the SecurityGroupRuleSecurityGroupRuleProtocolTcpudp.Protocol property.
// The protocol to enforce.
const (
	SecurityGroupRuleSecurityGroupRuleProtocolTcpudpProtocolTCPConst = "tcp"
	SecurityGroupRuleSecurityGroupRuleProtocolTcpudpProtocolUDPConst = "udp"
)

func (*SecurityGroupRuleSecurityGroupRuleProtocolTcpudp) isaSecurityGroupRule() bool {
	return true
}

// UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolTcpudp unmarshals an instance of SecurityGroupRuleSecurityGroupRuleProtocolTcpudp from the specified map of raw messages.
func UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolTcpudp(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupRuleSecurityGroupRuleProtocolTcpudp)
	err = core.UnmarshalPrimitive(m, "direction", &obj.Direction)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRuleRemote)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "port_max", &obj.PortMax)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "port_min", &obj.PortMin)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupTargetReferenceLoadBalancerReference : SecurityGroupTargetReferenceLoadBalancerReference struct
// This model "extends" SecurityGroupTargetReference
type SecurityGroupTargetReferenceLoadBalancerReference struct {
	// The load balancer's CRN.
	CRN *string `json:"crn" validate:"required"`

	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *LoadBalancerReferenceDeleted `json:"deleted,omitempty"`

	// The load balancer's canonical URL.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this load balancer.
	ID *string `json:"id" validate:"required"`

	// The unique user-defined name for this load balancer.
	Name *string `json:"name" validate:"required"`
}

func (*SecurityGroupTargetReferenceLoadBalancerReference) isaSecurityGroupTargetReference() bool {
	return true
}

// UnmarshalSecurityGroupTargetReferenceLoadBalancerReference unmarshals an instance of SecurityGroupTargetReferenceLoadBalancerReference from the specified map of raw messages.
func UnmarshalSecurityGroupTargetReferenceLoadBalancerReference(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupTargetReferenceLoadBalancerReference)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalLoadBalancerReferenceDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext : SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext struct
// This model "extends" SecurityGroupTargetReference
type SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext struct {
	// If present, this property indicates the referenced resource has been deleted and provides
	// some supplementary information.
	Deleted *NetworkInterfaceReferenceTargetContextDeleted `json:"deleted,omitempty"`

	// The URL for this network interface.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this network interface.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this network interface.
	Name *string `json:"name" validate:"required"`

	// The resource type.
	ResourceType *string `json:"resource_type" validate:"required"`
}

// Constants associated with the SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext.ResourceType property.
// The resource type.
const (
	SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContextResourceTypeNetworkInterfaceConst = "network_interface"
)

func (*SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext) isaSecurityGroupTargetReference() bool {
	return true
}

// UnmarshalSecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext unmarshals an instance of SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext from the specified map of raw messages.
func UnmarshalSecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext)
	err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalNetworkInterfaceReferenceTargetContextDeleted)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SubnetIdentityByCRN : SubnetIdentityByCRN struct
// This model "extends" SubnetIdentity
type SubnetIdentityByCRN struct {
	// The CRN for this subnet.
	CRN *string `json:"crn" validate:"required"`
}

// NewSubnetIdentityByCRN : Instantiate SubnetIdentityByCRN (Generic Model Constructor)
func (*VpcV1) NewSubnetIdentityByCRN(crn string) (model *SubnetIdentityByCRN, err error) {
	model = &SubnetIdentityByCRN{
		CRN: core.StringPtr(crn),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*SubnetIdentityByCRN) isaSubnetIdentity() bool {
	return true
}

// UnmarshalSubnetIdentityByCRN unmarshals an instance of SubnetIdentityByCRN from the specified map of raw messages.
func UnmarshalSubnetIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SubnetIdentityByCRN)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SubnetIdentityByHref : SubnetIdentityByHref struct
// This model "extends" SubnetIdentity
type SubnetIdentityByHref struct {
	// The URL for this subnet.
	Href *string `json:"href" validate:"required"`
}

// NewSubnetIdentityByHref : Instantiate SubnetIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewSubnetIdentityByHref(href string) (model *SubnetIdentityByHref, err error) {
	model = &SubnetIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*SubnetIdentityByHref) isaSubnetIdentity() bool {
	return true
}

// UnmarshalSubnetIdentityByHref unmarshals an instance of SubnetIdentityByHref from the specified map of raw messages.
func UnmarshalSubnetIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SubnetIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SubnetIdentityByID : SubnetIdentityByID struct
// This model "extends" SubnetIdentity
type SubnetIdentityByID struct {
	// The unique identifier for this subnet.
	ID *string `json:"id" validate:"required"`
}

// NewSubnetIdentityByID : Instantiate SubnetIdentityByID (Generic Model Constructor)
func (*VpcV1) NewSubnetIdentityByID(id string) (model *SubnetIdentityByID, err error) {
	model = &SubnetIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*SubnetIdentityByID) isaSubnetIdentity() bool {
	return true
}

// UnmarshalSubnetIdentityByID unmarshals an instance of SubnetIdentityByID from the specified map of raw messages.
func UnmarshalSubnetIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SubnetIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SubnetPrototypeSubnetByCIDR : SubnetPrototypeSubnetByCIDR struct
// This model "extends" SubnetPrototype
type SubnetPrototypeSubnetByCIDR struct {
	// The IP version(s) to support for this subnet.
	IPVersion *string `json:"ip_version,omitempty"`

	// The user-defined name for this subnet. Names must be unique within the VPC the subnet resides in. If unspecified,
	// the name will be a hyphenated list of randomly-selected words.
	Name *string `json:"name,omitempty"`

	// The network ACL to use for this subnet. If unspecified, the default network ACL for the VPC is used.
	NetworkACL NetworkACLIdentityIntf `json:"network_acl,omitempty"`

	// The public gateway to handle internet bound traffic for this subnet.
	PublicGateway PublicGatewayIdentityIntf `json:"public_gateway,omitempty"`

	ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`

	// The routing table to use for this subnet. If unspecified, the default routing table for the VPC is used. The routing
	// table properties `route_direct_link_ingress`,
	// `route_transit_gateway_ingress`, and `route_vpc_zone_ingress` must be `false`.
	RoutingTable RoutingTableIdentityIntf `json:"routing_table,omitempty"`

	// The VPC the subnet is to be a part of.
	VPC VPCIdentityIntf `json:"vpc" validate:"required"`

	// The IPv4 range of the subnet, expressed in CIDR format. The prefix length of the subnet's CIDR must be between `/9`
	// (8,388,608 addresses) and `/29` (8 addresses). The IPv4 range of the subnet's CIDR must fall within an existing
	// address prefix in the VPC. The subnet will be created in the zone of the address prefix that contains the IPv4 CIDR.
	// If zone is specified, it must match the zone of the address prefix that contains the subnet's IPv4 CIDR.
	Ipv4CIDRBlock *string `json:"ipv4_cidr_block" validate:"required"`

	// The zone this subnet will reside in.
	Zone ZoneIdentityIntf `json:"zone,omitempty"`
}

// Constants associated with the SubnetPrototypeSubnetByCIDR.IPVersion property.
// The IP version(s) to support for this subnet.
const (
	SubnetPrototypeSubnetByCIDRIPVersionIpv4Const = "ipv4"
)

// NewSubnetPrototypeSubnetByCIDR : Instantiate SubnetPrototypeSubnetByCIDR (Generic Model Constructor)
func (*VpcV1) NewSubnetPrototypeSubnetByCIDR(vpc VPCIdentityIntf, ipv4CIDRBlock string) (model *SubnetPrototypeSubnetByCIDR, err error) {
	model = &SubnetPrototypeSubnetByCIDR{
		VPC:           vpc,
		Ipv4CIDRBlock: core.StringPtr(ipv4CIDRBlock),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*SubnetPrototypeSubnetByCIDR) isaSubnetPrototype() bool {
	return true
}

// UnmarshalSubnetPrototypeSubnetByCIDR unmarshals an instance of SubnetPrototypeSubnetByCIDR from the specified map of raw messages.
func UnmarshalSubnetPrototypeSubnetByCIDR(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SubnetPrototypeSubnetByCIDR)
	err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "network_acl", &obj.NetworkACL, UnmarshalNetworkACLIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "public_gateway", &obj.PublicGateway, UnmarshalPublicGatewayIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "routing_table", &obj.RoutingTable, UnmarshalRoutingTableIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "ipv4_cidr_block", &obj.Ipv4CIDRBlock)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SubnetPrototypeSubnetByTotalCount : SubnetPrototypeSubnetByTotalCount struct
// This model "extends" SubnetPrototype
type SubnetPrototypeSubnetByTotalCount struct {
	// The IP version(s) to support for this subnet.
	IPVersion *string `json:"ip_version,omitempty"`

	// The user-defined name for this subnet. Names must be unique within the VPC the subnet resides in. If unspecified,
	// the name will be a hyphenated list of randomly-selected words.
	Name *string `json:"name,omitempty"`

	// The network ACL to use for this subnet. If unspecified, the default network ACL for the VPC is used.
	NetworkACL NetworkACLIdentityIntf `json:"network_acl,omitempty"`

	// The public gateway to handle internet bound traffic for this subnet.
	PublicGateway PublicGatewayIdentityIntf `json:"public_gateway,omitempty"`

	ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`

	// The routing table to use for this subnet. If unspecified, the default routing table for the VPC is used. The routing
	// table properties `route_direct_link_ingress`,
	// `route_transit_gateway_ingress`, and `route_vpc_zone_ingress` must be `false`.
	RoutingTable RoutingTableIdentityIntf `json:"routing_table,omitempty"`

	// The VPC the subnet is to be a part of.
	VPC VPCIdentityIntf `json:"vpc" validate:"required"`

	// The total number of IPv4 addresses required. Must be a power of 2. The VPC must have a default address prefix in the
	// specified zone, and that prefix must have a free CIDR range with at least this number of addresses.
	TotalIpv4AddressCount *int64 `json:"total_ipv4_address_count" validate:"required"`

	// The zone this subnet will reside in.
	Zone ZoneIdentityIntf `json:"zone" validate:"required"`
}

// Constants associated with the SubnetPrototypeSubnetByTotalCount.IPVersion property.
// The IP version(s) to support for this subnet.
const (
	SubnetPrototypeSubnetByTotalCountIPVersionIpv4Const = "ipv4"
)

// NewSubnetPrototypeSubnetByTotalCount : Instantiate SubnetPrototypeSubnetByTotalCount (Generic Model Constructor)
func (*VpcV1) NewSubnetPrototypeSubnetByTotalCount(vpc VPCIdentityIntf, totalIpv4AddressCount int64, zone ZoneIdentityIntf) (model *SubnetPrototypeSubnetByTotalCount, err error) {
	model = &SubnetPrototypeSubnetByTotalCount{
		VPC:                   vpc,
		TotalIpv4AddressCount: core.Int64Ptr(totalIpv4AddressCount),
		Zone:                  zone,
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*SubnetPrototypeSubnetByTotalCount) isaSubnetPrototype() bool {
	return true
}

// UnmarshalSubnetPrototypeSubnetByTotalCount unmarshals an instance of SubnetPrototypeSubnetByTotalCount from the specified map of raw messages.
func UnmarshalSubnetPrototypeSubnetByTotalCount(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SubnetPrototypeSubnetByTotalCount)
	err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "network_acl", &obj.NetworkACL, UnmarshalNetworkACLIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "public_gateway", &obj.PublicGateway, UnmarshalPublicGatewayIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "routing_table", &obj.RoutingTable, UnmarshalRoutingTableIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "total_ipv4_address_count", &obj.TotalIpv4AddressCount)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VPCIdentityByCRN : VPCIdentityByCRN struct
// This model "extends" VPCIdentity
type VPCIdentityByCRN struct {
	// The CRN for this VPC.
	CRN *string `json:"crn" validate:"required"`
}

// NewVPCIdentityByCRN : Instantiate VPCIdentityByCRN (Generic Model Constructor)
func (*VpcV1) NewVPCIdentityByCRN(crn string) (model *VPCIdentityByCRN, err error) {
	model = &VPCIdentityByCRN{
		CRN: core.StringPtr(crn),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*VPCIdentityByCRN) isaVPCIdentity() bool {
	return true
}

// UnmarshalVPCIdentityByCRN unmarshals an instance of VPCIdentityByCRN from the specified map of raw messages.
func UnmarshalVPCIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPCIdentityByCRN)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VPCIdentityByHref : VPCIdentityByHref struct
// This model "extends" VPCIdentity
type VPCIdentityByHref struct {
	// The URL for this VPC.
	Href *string `json:"href" validate:"required"`
}

// NewVPCIdentityByHref : Instantiate VPCIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewVPCIdentityByHref(href string) (model *VPCIdentityByHref, err error) {
	model = &VPCIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*VPCIdentityByHref) isaVPCIdentity() bool {
	return true
}

// UnmarshalVPCIdentityByHref unmarshals an instance of VPCIdentityByHref from the specified map of raw messages.
func UnmarshalVPCIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPCIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VPCIdentityByID : VPCIdentityByID struct
// This model "extends" VPCIdentity
type VPCIdentityByID struct {
	// The unique identifier for this VPC.
	ID *string `json:"id" validate:"required"`
}

// NewVPCIdentityByID : Instantiate VPCIdentityByID (Generic Model Constructor)
func (*VpcV1) NewVPCIdentityByID(id string) (model *VPCIdentityByID, err error) {
	model = &VPCIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*VPCIdentityByID) isaVPCIdentity() bool {
	return true
}

// UnmarshalVPCIdentityByID unmarshals an instance of VPCIdentityByID from the specified map of raw messages.
func UnmarshalVPCIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPCIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch : VPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch struct
// This model "extends" VPNGatewayConnectionPatch
type VPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch struct {
	// If set to false, the VPN gateway connection is shut down.
	AdminStateUp *bool `json:"admin_state_up,omitempty"`

	DeadPeerDetection *VPNGatewayConnectionDpdPrototype `json:"dead_peer_detection,omitempty"`

	// Optional IKE policy configuration. The absence of a policy indicates autonegotiation.
	IkePolicy IkePolicyIdentityIntf `json:"ike_policy,omitempty"`

	// Optional IPsec policy configuration. The absence of a policy indicates autonegotiation.
	IpsecPolicy IPsecPolicyIdentityIntf `json:"ipsec_policy,omitempty"`

	// The user-defined name for this VPN gateway connection.
	Name *string `json:"name,omitempty"`

	// The IP address of the peer VPN gateway.
	PeerAddress *string `json:"peer_address,omitempty"`

	// The preshared key.
	Psk *string `json:"psk,omitempty"`

	// Routing protocols are disabled for this VPN gateway connection.
	RoutingProtocol *string `json:"routing_protocol,omitempty"`
}

// Constants associated with the VPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch.RoutingProtocol property.
// Routing protocols are disabled for this VPN gateway connection.
const (
	VPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatchRoutingProtocolNoneConst = "none"
)

func (*VPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch) isaVPNGatewayConnectionPatch() bool {
	return true
}

// UnmarshalVPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch unmarshals an instance of VPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch from the specified map of raw messages.
func UnmarshalVPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch)
	err = core.UnmarshalPrimitive(m, "admin_state_up", &obj.AdminStateUp)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "dead_peer_detection", &obj.DeadPeerDetection, UnmarshalVPNGatewayConnectionDpdPrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalIkePolicyIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalIPsecPolicyIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "peer_address", &obj.PeerAddress)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "psk", &obj.Psk)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "routing_protocol", &obj.RoutingProtocol)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VPNGatewayConnectionPolicyMode : VPNGatewayConnectionPolicyMode struct
// This model "extends" VPNGatewayConnection
type VPNGatewayConnectionPolicyMode struct {
	// If set to false, the VPN gateway connection is shut down.
	AdminStateUp *bool `json:"admin_state_up" validate:"required"`

	// The authentication mode. Only `psk` is currently supported.
	AuthenticationMode *string `json:"authentication_mode" validate:"required"`

	// The date and time that this VPN gateway connection was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	DeadPeerDetection *VPNGatewayConnectionDpd `json:"dead_peer_detection" validate:"required"`

	// The VPN connection's canonical URL.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this VPN gateway connection.
	ID *string `json:"id" validate:"required"`

	// Optional IKE policy configuration. The absence of a policy indicates autonegotiation.
	IkePolicy *IkePolicyReference `json:"ike_policy,omitempty"`

	// Optional IPsec policy configuration. The absence of a policy indicates autonegotiation.
	IpsecPolicy *IPsecPolicyReference `json:"ipsec_policy,omitempty"`

	// The mode of the VPN gateway.
	Mode *string `json:"mode" validate:"required"`

	// The user-defined name for this VPN gateway connection.
	Name *string `json:"name" validate:"required"`

	// The IP address of the peer VPN gateway.
	PeerAddress *string `json:"peer_address" validate:"required"`

	// The preshared key.
	Psk *string `json:"psk" validate:"required"`

	// The resource type.
	ResourceType *string `json:"resource_type" validate:"required"`

	// The status of a VPN gateway connection.
	Status *string `json:"status" validate:"required"`

	// A collection of local CIDRs for this resource.
	LocalCIDRs []string `json:"local_cidrs" validate:"required"`

	// A collection of peer CIDRs for this resource.
	PeerCIDRs []string `json:"peer_cidrs" validate:"required"`
}

// Constants associated with the VPNGatewayConnectionPolicyMode.AuthenticationMode property.
// The authentication mode. Only `psk` is currently supported.
const (
	VPNGatewayConnectionPolicyModeAuthenticationModePskConst = "psk"
)

// Constants associated with the VPNGatewayConnectionPolicyMode.Mode property.
// The mode of the VPN gateway.
const (
	VPNGatewayConnectionPolicyModeModePolicyConst = "policy"
	VPNGatewayConnectionPolicyModeModeRouteConst  = "route"
)

// Constants associated with the VPNGatewayConnectionPolicyMode.ResourceType property.
// The resource type.
const (
	VPNGatewayConnectionPolicyModeResourceTypeVPNGatewayConnectionConst = "vpn_gateway_connection"
)

// Constants associated with the VPNGatewayConnectionPolicyMode.Status property.
// The status of a VPN gateway connection.
const (
	VPNGatewayConnectionPolicyModeStatusDownConst = "down"
	VPNGatewayConnectionPolicyModeStatusUpConst   = "up"
)

func (*VPNGatewayConnectionPolicyMode) isaVPNGatewayConnection() bool {
	return true
}

// UnmarshalVPNGatewayConnectionPolicyMode unmarshals an instance of VPNGatewayConnectionPolicyMode from the specified map of raw messages.
func UnmarshalVPNGatewayConnectionPolicyMode(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPNGatewayConnectionPolicyMode)
	err = core.UnmarshalPrimitive(m, "admin_state_up", &obj.AdminStateUp)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "authentication_mode", &obj.AuthenticationMode)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "dead_peer_detection", &obj.DeadPeerDetection, UnmarshalVPNGatewayConnectionDpd)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalIkePolicyReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalIPsecPolicyReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "mode", &obj.Mode)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "peer_address", &obj.PeerAddress)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "psk", &obj.Psk)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "status", &obj.Status)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "local_cidrs", &obj.LocalCIDRs)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "peer_cidrs", &obj.PeerCIDRs)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype : VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype struct
// This model "extends" VPNGatewayConnectionPrototype
type VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype struct {
	// If set to false, the VPN gateway connection is shut down.
	AdminStateUp *bool `json:"admin_state_up,omitempty"`

	DeadPeerDetection *VPNGatewayConnectionDpdPrototype `json:"dead_peer_detection,omitempty"`

	// Optional IKE policy configuration. The absence of a policy indicates autonegotiation.
	IkePolicy IkePolicyIdentityIntf `json:"ike_policy,omitempty"`

	// Optional IPsec policy configuration. The absence of a policy indicates autonegotiation.
	IpsecPolicy IPsecPolicyIdentityIntf `json:"ipsec_policy,omitempty"`

	// The user-defined name for this VPN gateway connection.
	Name *string `json:"name,omitempty"`

	// The IP address of the peer VPN gateway.
	PeerAddress *string `json:"peer_address" validate:"required"`

	// The preshared key.
	Psk *string `json:"psk" validate:"required"`

	// A collection of local CIDRs for this resource.
	LocalCIDRs []string `json:"local_cidrs" validate:"required"`

	// A collection of peer CIDRs for this resource.
	PeerCIDRs []string `json:"peer_cidrs" validate:"required"`
}

// NewVPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype : Instantiate VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype (Generic Model Constructor)
func (*VpcV1) NewVPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype(peerAddress string, psk string, localCIDRs []string, peerCIDRs []string) (model *VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype, err error) {
	model = &VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype{
		PeerAddress: core.StringPtr(peerAddress),
		Psk:         core.StringPtr(psk),
		LocalCIDRs:  localCIDRs,
		PeerCIDRs:   peerCIDRs,
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype) isaVPNGatewayConnectionPrototype() bool {
	return true
}

// UnmarshalVPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype unmarshals an instance of VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype from the specified map of raw messages.
func UnmarshalVPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype)
	err = core.UnmarshalPrimitive(m, "admin_state_up", &obj.AdminStateUp)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "dead_peer_detection", &obj.DeadPeerDetection, UnmarshalVPNGatewayConnectionDpdPrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalIkePolicyIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalIPsecPolicyIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "peer_address", &obj.PeerAddress)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "psk", &obj.Psk)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "local_cidrs", &obj.LocalCIDRs)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "peer_cidrs", &obj.PeerCIDRs)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype : VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype struct
// This model "extends" VPNGatewayConnectionPrototype
type VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype struct {
	// If set to false, the VPN gateway connection is shut down.
	AdminStateUp *bool `json:"admin_state_up,omitempty"`

	DeadPeerDetection *VPNGatewayConnectionDpdPrototype `json:"dead_peer_detection,omitempty"`

	// Optional IKE policy configuration. The absence of a policy indicates autonegotiation.
	IkePolicy IkePolicyIdentityIntf `json:"ike_policy,omitempty"`

	// Optional IPsec policy configuration. The absence of a policy indicates autonegotiation.
	IpsecPolicy IPsecPolicyIdentityIntf `json:"ipsec_policy,omitempty"`

	// The user-defined name for this VPN gateway connection.
	Name *string `json:"name,omitempty"`

	// The IP address of the peer VPN gateway.
	PeerAddress *string `json:"peer_address" validate:"required"`

	// The preshared key.
	Psk *string `json:"psk" validate:"required"`

	// Routing protocols are disabled for this VPN gateway connection.
	RoutingProtocol *string `json:"routing_protocol,omitempty"`
}

// Constants associated with the VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype.RoutingProtocol property.
// Routing protocols are disabled for this VPN gateway connection.
const (
	VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototypeRoutingProtocolNoneConst = "none"
)

func (*VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype) isaVPNGatewayConnectionPrototype() bool {
	return true
}

// UnmarshalVPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype unmarshals an instance of VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype from the specified map of raw messages.
func UnmarshalVPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype)
	err = core.UnmarshalPrimitive(m, "admin_state_up", &obj.AdminStateUp)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "dead_peer_detection", &obj.DeadPeerDetection, UnmarshalVPNGatewayConnectionDpdPrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalIkePolicyIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalIPsecPolicyIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "peer_address", &obj.PeerAddress)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "psk", &obj.Psk)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "routing_protocol", &obj.RoutingProtocol)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VPNGatewayConnectionStaticRouteMode : VPNGatewayConnectionStaticRouteMode struct
// This model "extends" VPNGatewayConnection
type VPNGatewayConnectionStaticRouteMode struct {
	// If set to false, the VPN gateway connection is shut down.
	AdminStateUp *bool `json:"admin_state_up" validate:"required"`

	// The authentication mode. Only `psk` is currently supported.
	AuthenticationMode *string `json:"authentication_mode" validate:"required"`

	// The date and time that this VPN gateway connection was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	DeadPeerDetection *VPNGatewayConnectionDpd `json:"dead_peer_detection" validate:"required"`

	// The VPN connection's canonical URL.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this VPN gateway connection.
	ID *string `json:"id" validate:"required"`

	// Optional IKE policy configuration. The absence of a policy indicates autonegotiation.
	IkePolicy *IkePolicyReference `json:"ike_policy,omitempty"`

	// Optional IPsec policy configuration. The absence of a policy indicates autonegotiation.
	IpsecPolicy *IPsecPolicyReference `json:"ipsec_policy,omitempty"`

	// The mode of the VPN gateway.
	Mode *string `json:"mode" validate:"required"`

	// The user-defined name for this VPN gateway connection.
	Name *string `json:"name" validate:"required"`

	// The IP address of the peer VPN gateway.
	PeerAddress *string `json:"peer_address" validate:"required"`

	// The preshared key.
	Psk *string `json:"psk" validate:"required"`

	// The resource type.
	ResourceType *string `json:"resource_type" validate:"required"`

	// The status of a VPN gateway connection.
	Status *string `json:"status" validate:"required"`

	// Routing protocols are disabled for this VPN gateway connection.
	RoutingProtocol *string `json:"routing_protocol" validate:"required"`

	// The VPN tunnel configuration for this VPN gateway connection (in static route mode).
	Tunnels []VPNGatewayConnectionStaticRouteModeTunnel `json:"tunnels" validate:"required"`
}

// Constants associated with the VPNGatewayConnectionStaticRouteMode.AuthenticationMode property.
// The authentication mode. Only `psk` is currently supported.
const (
	VPNGatewayConnectionStaticRouteModeAuthenticationModePskConst = "psk"
)

// Constants associated with the VPNGatewayConnectionStaticRouteMode.Mode property.
// The mode of the VPN gateway.
const (
	VPNGatewayConnectionStaticRouteModeModePolicyConst = "policy"
	VPNGatewayConnectionStaticRouteModeModeRouteConst  = "route"
)

// Constants associated with the VPNGatewayConnectionStaticRouteMode.ResourceType property.
// The resource type.
const (
	VPNGatewayConnectionStaticRouteModeResourceTypeVPNGatewayConnectionConst = "vpn_gateway_connection"
)

// Constants associated with the VPNGatewayConnectionStaticRouteMode.Status property.
// The status of a VPN gateway connection.
const (
	VPNGatewayConnectionStaticRouteModeStatusDownConst = "down"
	VPNGatewayConnectionStaticRouteModeStatusUpConst   = "up"
)

// Constants associated with the VPNGatewayConnectionStaticRouteMode.RoutingProtocol property.
// Routing protocols are disabled for this VPN gateway connection.
const (
	VPNGatewayConnectionStaticRouteModeRoutingProtocolNoneConst = "none"
)

func (*VPNGatewayConnectionStaticRouteMode) isaVPNGatewayConnection() bool {
	return true
}

// UnmarshalVPNGatewayConnectionStaticRouteMode unmarshals an instance of VPNGatewayConnectionStaticRouteMode from the specified map of raw messages.
func UnmarshalVPNGatewayConnectionStaticRouteMode(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPNGatewayConnectionStaticRouteMode)
	err = core.UnmarshalPrimitive(m, "admin_state_up", &obj.AdminStateUp)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "authentication_mode", &obj.AuthenticationMode)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "dead_peer_detection", &obj.DeadPeerDetection, UnmarshalVPNGatewayConnectionDpd)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalIkePolicyReference)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalIPsecPolicyReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "mode", &obj.Mode)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "peer_address", &obj.PeerAddress)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "psk", &obj.Psk)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "status", &obj.Status)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "routing_protocol", &obj.RoutingProtocol)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "tunnels", &obj.Tunnels, UnmarshalVPNGatewayConnectionStaticRouteModeTunnel)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VPNGatewayPolicyMode : VPNGatewayPolicyMode struct
// This model "extends" VPNGateway
type VPNGatewayPolicyMode struct {
	// Collection of references to VPN gateway connections.
	Connections []VPNGatewayConnectionReference `json:"connections" validate:"required"`

	// The date and time that this VPN gateway was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The VPN gateway's CRN.
	CRN *string `json:"crn" validate:"required"`

	// The VPN gateway's canonical URL.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this VPN gateway.
	ID *string `json:"id" validate:"required"`

	// Collection of VPN gateway members.
	Members []VPNGatewayMember `json:"members" validate:"required"`

	// The user-defined name for this VPN gateway.
	Name *string `json:"name" validate:"required"`

	// The resource group for this VPN gateway.
	ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`

	// The resource type.
	ResourceType *string `json:"resource_type" validate:"required"`

	// The status of the VPN gateway.
	Status *string `json:"status" validate:"required"`

	Subnet *SubnetReference `json:"subnet" validate:"required"`

	// Policy mode VPN gateway.
	Mode *string `json:"mode" validate:"required"`
}

// Constants associated with the VPNGatewayPolicyMode.ResourceType property.
// The resource type.
const (
	VPNGatewayPolicyModeResourceTypeVPNGatewayConst = "vpn_gateway"
)

// Constants associated with the VPNGatewayPolicyMode.Status property.
// The status of the VPN gateway.
const (
	VPNGatewayPolicyModeStatusAvailableConst = "available"
	VPNGatewayPolicyModeStatusDeletingConst  = "deleting"
	VPNGatewayPolicyModeStatusFailedConst    = "failed"
	VPNGatewayPolicyModeStatusPendingConst   = "pending"
)

// Constants associated with the VPNGatewayPolicyMode.Mode property.
// Policy mode VPN gateway.
const (
	VPNGatewayPolicyModeModePolicyConst = "policy"
)

func (*VPNGatewayPolicyMode) isaVPNGateway() bool {
	return true
}

// UnmarshalVPNGatewayPolicyMode unmarshals an instance of VPNGatewayPolicyMode from the specified map of raw messages.
func UnmarshalVPNGatewayPolicyMode(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPNGatewayPolicyMode)
	err = core.UnmarshalModel(m, "connections", &obj.Connections, UnmarshalVPNGatewayConnectionReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "members", &obj.Members, UnmarshalVPNGatewayMember)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "status", &obj.Status)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "mode", &obj.Mode)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VPNGatewayPrototypeVPNGatewayPolicyModePrototype : VPNGatewayPrototypeVPNGatewayPolicyModePrototype struct
// This model "extends" VPNGatewayPrototype
type VPNGatewayPrototypeVPNGatewayPolicyModePrototype struct {
	// The user-defined name for this VPN gateway.
	Name *string `json:"name,omitempty"`

	ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`

	Subnet SubnetIdentityIntf `json:"subnet" validate:"required"`

	// Policy mode VPN gateway.
	Mode *string `json:"mode,omitempty"`
}

// Constants associated with the VPNGatewayPrototypeVPNGatewayPolicyModePrototype.Mode property.
// Policy mode VPN gateway.
const (
	VPNGatewayPrototypeVPNGatewayPolicyModePrototypeModePolicyConst = "policy"
)

func (*VPNGatewayPrototypeVPNGatewayPolicyModePrototype) isaVPNGatewayPrototype() bool {
	return true
}

// UnmarshalVPNGatewayPrototypeVPNGatewayPolicyModePrototype unmarshals an instance of VPNGatewayPrototypeVPNGatewayPolicyModePrototype from the specified map of raw messages.
func UnmarshalVPNGatewayPrototypeVPNGatewayPolicyModePrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPNGatewayPrototypeVPNGatewayPolicyModePrototype)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "mode", &obj.Mode)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VPNGatewayPrototypeVPNGatewayRouteModePrototype : VPNGatewayPrototypeVPNGatewayRouteModePrototype struct
// This model "extends" VPNGatewayPrototype
type VPNGatewayPrototypeVPNGatewayRouteModePrototype struct {
	// The user-defined name for this VPN gateway.
	Name *string `json:"name,omitempty"`

	ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`

	Subnet SubnetIdentityIntf `json:"subnet" validate:"required"`

	// Route mode VPN gateway.
	Mode *string `json:"mode,omitempty"`
}

// Constants associated with the VPNGatewayPrototypeVPNGatewayRouteModePrototype.Mode property.
// Route mode VPN gateway.
const (
	VPNGatewayPrototypeVPNGatewayRouteModePrototypeModeRouteConst = "route"
)

func (*VPNGatewayPrototypeVPNGatewayRouteModePrototype) isaVPNGatewayPrototype() bool {
	return true
}

// UnmarshalVPNGatewayPrototypeVPNGatewayRouteModePrototype unmarshals an instance of VPNGatewayPrototypeVPNGatewayRouteModePrototype from the specified map of raw messages.
func UnmarshalVPNGatewayPrototypeVPNGatewayRouteModePrototype(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPNGatewayPrototypeVPNGatewayRouteModePrototype)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "mode", &obj.Mode)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VPNGatewayRouteMode : VPNGatewayRouteMode struct
// This model "extends" VPNGateway
type VPNGatewayRouteMode struct {
	// Collection of references to VPN gateway connections.
	Connections []VPNGatewayConnectionReference `json:"connections" validate:"required"`

	// The date and time that this VPN gateway was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The VPN gateway's CRN.
	CRN *string `json:"crn" validate:"required"`

	// The VPN gateway's canonical URL.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this VPN gateway.
	ID *string `json:"id" validate:"required"`

	// Collection of VPN gateway members.
	Members []VPNGatewayMember `json:"members" validate:"required"`

	// The user-defined name for this VPN gateway.
	Name *string `json:"name" validate:"required"`

	// The resource group for this VPN gateway.
	ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"`

	// The resource type.
	ResourceType *string `json:"resource_type" validate:"required"`

	// The status of the VPN gateway.
	Status *string `json:"status" validate:"required"`

	Subnet *SubnetReference `json:"subnet" validate:"required"`

	// Route mode VPN gateway.
	Mode *string `json:"mode" validate:"required"`
}

// Constants associated with the VPNGatewayRouteMode.ResourceType property.
// The resource type.
const (
	VPNGatewayRouteModeResourceTypeVPNGatewayConst = "vpn_gateway"
)

// Constants associated with the VPNGatewayRouteMode.Status property.
// The status of the VPN gateway.
const (
	VPNGatewayRouteModeStatusAvailableConst = "available"
	VPNGatewayRouteModeStatusDeletingConst  = "deleting"
	VPNGatewayRouteModeStatusFailedConst    = "failed"
	VPNGatewayRouteModeStatusPendingConst   = "pending"
)

// Constants associated with the VPNGatewayRouteMode.Mode property.
// Route mode VPN gateway.
const (
	VPNGatewayRouteModeModeRouteConst = "route"
)

func (*VPNGatewayRouteMode) isaVPNGateway() bool {
	return true
}

// UnmarshalVPNGatewayRouteMode unmarshals an instance of VPNGatewayRouteMode from the specified map of raw messages.
func UnmarshalVPNGatewayRouteMode(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VPNGatewayRouteMode)
	err = core.UnmarshalModel(m, "connections", &obj.Connections, UnmarshalVPNGatewayConnectionReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "members", &obj.Members, UnmarshalVPNGatewayMember)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "status", &obj.Status)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "mode", &obj.Mode)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentity : Identifies a volume by a unique property.
// Models which "extend" this model:
// - VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByID
// - VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByCRN
// - VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByHref
// This model "extends" VolumeAttachmentVolumePrototypeInstanceContext
type VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentity struct {
	// The unique identifier for this volume.
	ID *string `json:"id,omitempty"`

	// The CRN for this volume.
	CRN *string `json:"crn,omitempty"`

	// The URL for this volume.
	Href *string `json:"href,omitempty"`
}

func (*VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentity) isaVolumeAttachmentVolumePrototypeInstanceContextVolumeIdentity() bool {
	return true
}

type VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityIntf interface {
	VolumeAttachmentVolumePrototypeInstanceContextIntf
	isaVolumeAttachmentVolumePrototypeInstanceContextVolumeIdentity() bool
}

func (*VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentity) isaVolumeAttachmentVolumePrototypeInstanceContext() bool {
	return true
}

// UnmarshalVolumeAttachmentVolumePrototypeInstanceContextVolumeIdentity unmarshals an instance of VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentity from the specified map of raw messages.
func UnmarshalVolumeAttachmentVolumePrototypeInstanceContextVolumeIdentity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentity)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContext : VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContext struct
// Models which "extend" this model:
// - VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity
// This model "extends" VolumeAttachmentVolumePrototypeInstanceContext
type VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContext struct {
	// The bandwidth for the volume.
	Iops *int64 `json:"iops,omitempty"`

	// The unique user-defined name for this volume.
	Name *string `json:"name,omitempty"`

	// The profile to use for this volume.
	Profile VolumeProfileIdentityIntf `json:"profile" validate:"required"`

	// The capacity of the volume in gigabytes. The specified minimum and maximum capacity values for creating or updating
	// volumes may expand in the future.
	Capacity *int64 `json:"capacity,omitempty"`

	// The identity of the root key to use to wrap the data encryption key for the volume.
	//
	// If this property is not provided, the `encryption` type for the volume will be
	// `provider_managed`.
	EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"`
}

func (*VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContext) isaVolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContext() bool {
	return true
}

type VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextIntf interface {
	VolumeAttachmentVolumePrototypeInstanceContextIntf
	isaVolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContext() bool
}

func (*VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContext) isaVolumeAttachmentVolumePrototypeInstanceContext() bool {
	return true
}

// UnmarshalVolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContext unmarshals an instance of VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContext from the specified map of raw messages.
func UnmarshalVolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContext(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContext)
	err = core.UnmarshalPrimitive(m, "iops", &obj.Iops)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumeIdentityByCRN : VolumeIdentityByCRN struct
// This model "extends" VolumeIdentity
type VolumeIdentityByCRN struct {
	// The CRN for this volume.
	CRN *string `json:"crn" validate:"required"`
}

// NewVolumeIdentityByCRN : Instantiate VolumeIdentityByCRN (Generic Model Constructor)
func (*VpcV1) NewVolumeIdentityByCRN(crn string) (model *VolumeIdentityByCRN, err error) {
	model = &VolumeIdentityByCRN{
		CRN: core.StringPtr(crn),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*VolumeIdentityByCRN) isaVolumeIdentity() bool {
	return true
}

// UnmarshalVolumeIdentityByCRN unmarshals an instance of VolumeIdentityByCRN from the specified map of raw messages.
func UnmarshalVolumeIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumeIdentityByCRN)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumeIdentityByHref : VolumeIdentityByHref struct
// This model "extends" VolumeIdentity
type VolumeIdentityByHref struct {
	// The URL for this volume.
	Href *string `json:"href" validate:"required"`
}

// NewVolumeIdentityByHref : Instantiate VolumeIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewVolumeIdentityByHref(href string) (model *VolumeIdentityByHref, err error) {
	model = &VolumeIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*VolumeIdentityByHref) isaVolumeIdentity() bool {
	return true
}

// UnmarshalVolumeIdentityByHref unmarshals an instance of VolumeIdentityByHref from the specified map of raw messages.
func UnmarshalVolumeIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumeIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumeIdentityByID : VolumeIdentityByID struct
// This model "extends" VolumeIdentity
type VolumeIdentityByID struct {
	// The unique identifier for this volume.
	ID *string `json:"id" validate:"required"`
}

// NewVolumeIdentityByID : Instantiate VolumeIdentityByID (Generic Model Constructor)
func (*VpcV1) NewVolumeIdentityByID(id string) (model *VolumeIdentityByID, err error) {
	model = &VolumeIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*VolumeIdentityByID) isaVolumeIdentity() bool {
	return true
}

// UnmarshalVolumeIdentityByID unmarshals an instance of VolumeIdentityByID from the specified map of raw messages.
func UnmarshalVolumeIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumeIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumeProfileIdentityByHref : VolumeProfileIdentityByHref struct
// This model "extends" VolumeProfileIdentity
type VolumeProfileIdentityByHref struct {
	// The URL for this volume profile.
	Href *string `json:"href" validate:"required"`
}

// NewVolumeProfileIdentityByHref : Instantiate VolumeProfileIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewVolumeProfileIdentityByHref(href string) (model *VolumeProfileIdentityByHref, err error) {
	model = &VolumeProfileIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*VolumeProfileIdentityByHref) isaVolumeProfileIdentity() bool {
	return true
}

// UnmarshalVolumeProfileIdentityByHref unmarshals an instance of VolumeProfileIdentityByHref from the specified map of raw messages.
func UnmarshalVolumeProfileIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumeProfileIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumeProfileIdentityByName : VolumeProfileIdentityByName struct
// This model "extends" VolumeProfileIdentity
type VolumeProfileIdentityByName struct {
	// The globally unique name for this volume profile.
	Name *string `json:"name" validate:"required"`
}

// NewVolumeProfileIdentityByName : Instantiate VolumeProfileIdentityByName (Generic Model Constructor)
func (*VpcV1) NewVolumeProfileIdentityByName(name string) (model *VolumeProfileIdentityByName, err error) {
	model = &VolumeProfileIdentityByName{
		Name: core.StringPtr(name),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*VolumeProfileIdentityByName) isaVolumeProfileIdentity() bool {
	return true
}

// UnmarshalVolumeProfileIdentityByName unmarshals an instance of VolumeProfileIdentityByName from the specified map of raw messages.
func UnmarshalVolumeProfileIdentityByName(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumeProfileIdentityByName)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumePrototypeVolumeByCapacity : VolumePrototypeVolumeByCapacity struct
// This model "extends" VolumePrototype
type VolumePrototypeVolumeByCapacity struct {
	// The bandwidth for the volume.
	Iops *int64 `json:"iops,omitempty"`

	// The unique user-defined name for this volume.
	Name *string `json:"name,omitempty"`

	// The profile to use for this volume.
	Profile VolumeProfileIdentityIntf `json:"profile" validate:"required"`

	ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"`

	// The zone this volume will reside in.
	Zone ZoneIdentityIntf `json:"zone" validate:"required"`

	// The capacity of the volume in gigabytes. The specified minimum and maximum capacity values for creating or updating
	// volumes may expand in the future.
	Capacity *int64 `json:"capacity" validate:"required"`

	// The identity of the root key to use to wrap the data encryption key for the volume.
	//
	// If this property is not provided, the `encryption` type for the volume will be
	// `provider_managed`.
	EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"`
}

// NewVolumePrototypeVolumeByCapacity : Instantiate VolumePrototypeVolumeByCapacity (Generic Model Constructor)
func (*VpcV1) NewVolumePrototypeVolumeByCapacity(profile VolumeProfileIdentityIntf, zone ZoneIdentityIntf, capacity int64) (model *VolumePrototypeVolumeByCapacity, err error) {
	model = &VolumePrototypeVolumeByCapacity{
		Profile:  profile,
		Zone:     zone,
		Capacity: core.Int64Ptr(capacity),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*VolumePrototypeVolumeByCapacity) isaVolumePrototype() bool {
	return true
}

// UnmarshalVolumePrototypeVolumeByCapacity unmarshals an instance of VolumePrototypeVolumeByCapacity from the specified map of raw messages.
func UnmarshalVolumePrototypeVolumeByCapacity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumePrototypeVolumeByCapacity)
	err = core.UnmarshalPrimitive(m, "iops", &obj.Iops)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ZoneIdentityByHref : ZoneIdentityByHref struct
// This model "extends" ZoneIdentity
type ZoneIdentityByHref struct {
	// The URL for this zone.
	Href *string `json:"href" validate:"required"`
}

// NewZoneIdentityByHref : Instantiate ZoneIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewZoneIdentityByHref(href string) (model *ZoneIdentityByHref, err error) {
	model = &ZoneIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*ZoneIdentityByHref) isaZoneIdentity() bool {
	return true
}

// UnmarshalZoneIdentityByHref unmarshals an instance of ZoneIdentityByHref from the specified map of raw messages.
func UnmarshalZoneIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ZoneIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ZoneIdentityByName : ZoneIdentityByName struct
// This model "extends" ZoneIdentity
type ZoneIdentityByName struct {
	// The globally unique name for this zone.
	Name *string `json:"name" validate:"required"`
}

// NewZoneIdentityByName : Instantiate ZoneIdentityByName (Generic Model Constructor)
func (*VpcV1) NewZoneIdentityByName(name string) (model *ZoneIdentityByName, err error) {
	model = &ZoneIdentityByName{
		Name: core.StringPtr(name),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*ZoneIdentityByName) isaZoneIdentity() bool {
	return true
}

// UnmarshalZoneIdentityByName unmarshals an instance of ZoneIdentityByName from the specified map of raw messages.
func UnmarshalZoneIdentityByName(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ZoneIdentityByName)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByHref : EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByHref struct
// This model "extends" EndpointGatewayReservedIPReservedIPIdentity
type EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByHref struct {
	// The URL for this reserved IP.
	Href *string `json:"href" validate:"required"`
}

// NewEndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByHref : Instantiate EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewEndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByHref(href string) (model *EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByHref, err error) {
	model = &EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByHref) isaEndpointGatewayReservedIPReservedIPIdentity() bool {
	return true
}

func (*EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByHref) isaEndpointGatewayReservedIP() bool {
	return true
}

// UnmarshalEndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByHref unmarshals an instance of EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByHref from the specified map of raw messages.
func UnmarshalEndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByID : EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByID struct
// This model "extends" EndpointGatewayReservedIPReservedIPIdentity
type EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByID struct {
	// The unique identifier for this reserved IP.
	ID *string `json:"id" validate:"required"`
}

// NewEndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByID : Instantiate EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByID (Generic Model Constructor)
func (*VpcV1) NewEndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByID(id string) (model *EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByID, err error) {
	model = &EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByID) isaEndpointGatewayReservedIPReservedIPIdentity() bool {
	return true
}

func (*EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByID) isaEndpointGatewayReservedIP() bool {
	return true
}

// UnmarshalEndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByID unmarshals an instance of EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByID from the specified map of raw messages.
func UnmarshalEndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(EndpointGatewayReservedIPReservedIPIdentityReservedIPIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN : EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN struct
// This model "extends" EndpointGatewayTargetPrototypeProviderCloudServiceIdentity
type EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN struct {
	// The type of target for this endpoint gateway.
	ResourceType *string `json:"resource_type" validate:"required"`

	// The CRN for this provider cloud service, or the CRN for the user's instance of a provider cloud service.
	CRN *string `json:"crn" validate:"required"`
}

// Constants associated with the EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN.ResourceType property.
// The type of target for this endpoint gateway.
const (
	EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRNResourceTypeProviderCloudServiceConst          = "provider_cloud_service"
	EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRNResourceTypeProviderInfrastructureServiceConst = "provider_infrastructure_service"
)

// NewEndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN : Instantiate EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN (Generic Model Constructor)
func (*VpcV1) NewEndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN(resourceType string, crn string) (model *EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN, err error) {
	model = &EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN{
		ResourceType: core.StringPtr(resourceType),
		CRN:          core.StringPtr(crn),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN) isaEndpointGatewayTargetPrototypeProviderCloudServiceIdentity() bool {
	return true
}

func (*EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN) isaEndpointGatewayTargetPrototype() bool {
	return true
}

// UnmarshalEndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN unmarshals an instance of EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN from the specified map of raw messages.
func UnmarshalEndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN)
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName : The name of this provider infrastructure service.
// This model "extends" EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity
type EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName struct {
	// The type of target for this endpoint gateway.
	ResourceType *string `json:"resource_type" validate:"required"`

	// The name of a provider infrastructure service. Must be:
	// - `ibm-ntp-server`: An NTP (Network Time Protocol) server provided by IBM.
	Name *string `json:"name" validate:"required"`
}

// Constants associated with the EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName.ResourceType property.
// The type of target for this endpoint gateway.
const (
	EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByNameResourceTypeProviderCloudServiceConst          = "provider_cloud_service"
	EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByNameResourceTypeProviderInfrastructureServiceConst = "provider_infrastructure_service"
)

// NewEndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName : Instantiate EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName (Generic Model Constructor)
func (*VpcV1) NewEndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName(resourceType string, name string) (model *EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName, err error) {
	model = &EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName{
		ResourceType: core.StringPtr(resourceType),
		Name:         core.StringPtr(name),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName) isaEndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity() bool {
	return true
}

func (*EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName) isaEndpointGatewayTargetPrototype() bool {
	return true
}

// UnmarshalEndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName unmarshals an instance of EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName from the specified map of raw messages.
func UnmarshalEndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName)
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN : FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN struct
// This model "extends" FlowLogCollectorTargetPrototypeInstanceIdentity
type FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN struct {
	// The CRN for this virtual server instance.
	CRN *string `json:"crn" validate:"required"`
}

// NewFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN : Instantiate FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN (Generic Model Constructor)
func (*VpcV1) NewFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN(crn string) (model *FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN, err error) {
	model = &FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN{
		CRN: core.StringPtr(crn),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN) isaFlowLogCollectorTargetPrototypeInstanceIdentity() bool {
	return true
}

func (*FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN) isaFlowLogCollectorTargetPrototype() bool {
	return true
}

// UnmarshalFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN unmarshals an instance of FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN from the specified map of raw messages.
func UnmarshalFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref : FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref struct
// This model "extends" FlowLogCollectorTargetPrototypeInstanceIdentity
type FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref struct {
	// The URL for this virtual server instance.
	Href *string `json:"href" validate:"required"`
}

// NewFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref : Instantiate FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref(href string) (model *FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref, err error) {
	model = &FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref) isaFlowLogCollectorTargetPrototypeInstanceIdentity() bool {
	return true
}

func (*FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref) isaFlowLogCollectorTargetPrototype() bool {
	return true
}

// UnmarshalFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref unmarshals an instance of FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref from the specified map of raw messages.
func UnmarshalFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID : FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID struct
// This model "extends" FlowLogCollectorTargetPrototypeInstanceIdentity
type FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID struct {
	// The unique identifier for this virtual server instance.
	ID *string `json:"id" validate:"required"`
}

// NewFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID : Instantiate FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID (Generic Model Constructor)
func (*VpcV1) NewFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID(id string) (model *FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID, err error) {
	model = &FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID) isaFlowLogCollectorTargetPrototypeInstanceIdentity() bool {
	return true
}

func (*FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID) isaFlowLogCollectorTargetPrototype() bool {
	return true
}

// UnmarshalFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID unmarshals an instance of FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID from the specified map of raw messages.
func UnmarshalFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref : FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref struct
// This model "extends" FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity
type FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref struct {
	// The URL for this network interface.
	Href *string `json:"href" validate:"required"`
}

// NewFlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref : Instantiate FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewFlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(href string) (model *FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref, err error) {
	model = &FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref) isaFlowLogCollectorTargetPrototypeNetworkInterfaceIdentity() bool {
	return true
}

func (*FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref) isaFlowLogCollectorTargetPrototype() bool {
	return true
}

// UnmarshalFlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref unmarshals an instance of FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref from the specified map of raw messages.
func UnmarshalFlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID : FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID struct
// This model "extends" FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity
type FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID struct {
	// The unique identifier for this network interface.
	ID *string `json:"id" validate:"required"`
}

// NewFlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID : Instantiate FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID (Generic Model Constructor)
func (*VpcV1) NewFlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID(id string) (model *FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID, err error) {
	model = &FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID) isaFlowLogCollectorTargetPrototypeNetworkInterfaceIdentity() bool {
	return true
}

func (*FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID) isaFlowLogCollectorTargetPrototype() bool {
	return true
}

// UnmarshalFlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID unmarshals an instance of FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID from the specified map of raw messages.
func UnmarshalFlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN : FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN struct
// This model "extends" FlowLogCollectorTargetPrototypeSubnetIdentity
type FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN struct {
	// The CRN for this subnet.
	CRN *string `json:"crn" validate:"required"`
}

// NewFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN : Instantiate FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN (Generic Model Constructor)
func (*VpcV1) NewFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN(crn string) (model *FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN, err error) {
	model = &FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN{
		CRN: core.StringPtr(crn),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN) isaFlowLogCollectorTargetPrototypeSubnetIdentity() bool {
	return true
}

func (*FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN) isaFlowLogCollectorTargetPrototype() bool {
	return true
}

// UnmarshalFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN unmarshals an instance of FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN from the specified map of raw messages.
func UnmarshalFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref : FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref struct
// This model "extends" FlowLogCollectorTargetPrototypeSubnetIdentity
type FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref struct {
	// The URL for this subnet.
	Href *string `json:"href" validate:"required"`
}

// NewFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref : Instantiate FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref(href string) (model *FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref, err error) {
	model = &FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref) isaFlowLogCollectorTargetPrototypeSubnetIdentity() bool {
	return true
}

func (*FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref) isaFlowLogCollectorTargetPrototype() bool {
	return true
}

// UnmarshalFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref unmarshals an instance of FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref from the specified map of raw messages.
func UnmarshalFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID : FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID struct
// This model "extends" FlowLogCollectorTargetPrototypeSubnetIdentity
type FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID struct {
	// The unique identifier for this subnet.
	ID *string `json:"id" validate:"required"`
}

// NewFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID : Instantiate FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID (Generic Model Constructor)
func (*VpcV1) NewFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID(id string) (model *FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID, err error) {
	model = &FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID) isaFlowLogCollectorTargetPrototypeSubnetIdentity() bool {
	return true
}

func (*FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID) isaFlowLogCollectorTargetPrototype() bool {
	return true
}

// UnmarshalFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID unmarshals an instance of FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID from the specified map of raw messages.
func UnmarshalFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN : FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN struct
// This model "extends" FlowLogCollectorTargetPrototypeVPCIdentity
type FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN struct {
	// The CRN for this VPC.
	CRN *string `json:"crn" validate:"required"`
}

// NewFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN : Instantiate FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN (Generic Model Constructor)
func (*VpcV1) NewFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN(crn string) (model *FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN, err error) {
	model = &FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN{
		CRN: core.StringPtr(crn),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN) isaFlowLogCollectorTargetPrototypeVPCIdentity() bool {
	return true
}

func (*FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN) isaFlowLogCollectorTargetPrototype() bool {
	return true
}

// UnmarshalFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN unmarshals an instance of FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN from the specified map of raw messages.
func UnmarshalFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref : FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref struct
// This model "extends" FlowLogCollectorTargetPrototypeVPCIdentity
type FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref struct {
	// The URL for this VPC.
	Href *string `json:"href" validate:"required"`
}

// NewFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref : Instantiate FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref(href string) (model *FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref, err error) {
	model = &FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref) isaFlowLogCollectorTargetPrototypeVPCIdentity() bool {
	return true
}

func (*FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref) isaFlowLogCollectorTargetPrototype() bool {
	return true
}

// UnmarshalFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref unmarshals an instance of FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref from the specified map of raw messages.
func UnmarshalFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID : FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID struct
// This model "extends" FlowLogCollectorTargetPrototypeVPCIdentity
type FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID struct {
	// The unique identifier for this VPC.
	ID *string `json:"id" validate:"required"`
}

// NewFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID : Instantiate FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID (Generic Model Constructor)
func (*VpcV1) NewFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID(id string) (model *FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID, err error) {
	model = &FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID) isaFlowLogCollectorTargetPrototypeVPCIdentity() bool {
	return true
}

func (*FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID) isaFlowLogCollectorTargetPrototype() bool {
	return true
}

// UnmarshalFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID unmarshals an instance of FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID from the specified map of raw messages.
func UnmarshalFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec : InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec struct
// Models which "extend" this model:
// - InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup
// - InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager
// This model "extends" InstanceGroupManagerActionPrototypeScheduledActionPrototype
type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec struct {
	// The user-defined name for this instance group manager action. Names must be unique within the instance group
	// manager.
	Name *string `json:"name,omitempty"`

	// The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min
	// period.
	CronSpec *string `json:"cron_spec,omitempty"`

	Group *InstanceGroupManagerScheduledActionGroupPrototype `json:"group,omitempty"`

	Manager InstanceGroupManagerScheduledActionByManagerManagerIntf `json:"manager,omitempty"`
}

func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec) isaInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec() bool {
	return true
}

type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecIntf interface {
	InstanceGroupManagerActionPrototypeScheduledActionPrototypeIntf
	isaInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec() bool
}

func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec) isaInstanceGroupManagerActionPrototypeScheduledActionPrototype() bool {
	return true
}

func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec) isaInstanceGroupManagerActionPrototype() bool {
	return true
}

// UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec unmarshals an instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec from the specified map of raw messages.
func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroupPrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionByManagerManager)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt : InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt struct
// Models which "extend" this model:
// - InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup
// - InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager
// This model "extends" InstanceGroupManagerActionPrototypeScheduledActionPrototype
type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt struct {
	// The user-defined name for this instance group manager action. Names must be unique within the instance group
	// manager.
	Name *string `json:"name,omitempty"`

	// The date and time the scheduled action will run.
	RunAt *strfmt.DateTime `json:"run_at,omitempty"`

	Group *InstanceGroupManagerScheduledActionGroupPrototype `json:"group,omitempty"`

	Manager InstanceGroupManagerScheduledActionByManagerManagerIntf `json:"manager,omitempty"`
}

func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt) isaInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt() bool {
	return true
}

type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtIntf interface {
	InstanceGroupManagerActionPrototypeScheduledActionPrototypeIntf
	isaInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt() bool
}

func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt) isaInstanceGroupManagerActionPrototypeScheduledActionPrototype() bool {
	return true
}

func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt) isaInstanceGroupManagerActionPrototype() bool {
	return true
}

// UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt unmarshals an instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt from the specified map of raw messages.
func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "run_at", &obj.RunAt)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroupPrototype)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionByManagerManager)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerActionScheduledActionGroup : InstanceGroupManagerActionScheduledActionGroup struct
// This model "extends" InstanceGroupManagerActionScheduledAction
type InstanceGroupManagerActionScheduledActionGroup struct {
	// If set to `true`, this scheduled action will be automatically deleted after it has finished and the
	// `auto_delete_timeout` time has passed.
	AutoDelete *bool `json:"auto_delete" validate:"required"`

	// Amount of time in hours that are required to pass before the scheduled action will be automatically deleted once it
	// has finished. If this value is 0, the action will be deleted on completion.
	AutoDeleteTimeout *int64 `json:"auto_delete_timeout" validate:"required"`

	// The date and time that the instance group manager action was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The URL for this instance group manager action.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this instance group manager action.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this instance group manager action. Names must be unique within the instance group
	// manager.
	Name *string `json:"name" validate:"required"`

	// The resource type.
	ResourceType *string `json:"resource_type" validate:"required"`

	// The status of the instance group action
	// - `active`: Action is ready to be run
	// - `completed`: Action was completed successfully
	// - `failed`: Action could not be completed successfully
	// - `incompatible`: Action parameters are not compatible with the group or manager
	// - `omitted`: Action was not applied because this action's manager was disabled.
	Status *string `json:"status" validate:"required"`

	// The date and time that the instance group manager action was modified.
	UpdatedAt *strfmt.DateTime `json:"updated_at" validate:"required"`

	// The type of action for the instance group.
	ActionType *string `json:"action_type" validate:"required"`

	// The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min
	// period.
	CronSpec *string `json:"cron_spec,omitempty"`

	// The date and time the scheduled action was last applied. If empty the action has never been applied.
	LastAppliedAt *strfmt.DateTime `json:"last_applied_at,omitempty"`

	// The date and time the scheduled action will next run. If empty the system is currently calculating the next run
	// time.
	NextRunAt *strfmt.DateTime `json:"next_run_at,omitempty"`

	Group *InstanceGroupManagerScheduledActionGroupGroup `json:"group" validate:"required"`
}

// Constants associated with the InstanceGroupManagerActionScheduledActionGroup.ResourceType property.
// The resource type.
const (
	InstanceGroupManagerActionScheduledActionGroupResourceTypeInstanceGroupManagerActionConst = "instance_group_manager_action"
)

// Constants associated with the InstanceGroupManagerActionScheduledActionGroup.Status property.
// The status of the instance group action
// - `active`: Action is ready to be run
// - `completed`: Action was completed successfully
// - `failed`: Action could not be completed successfully
// - `incompatible`: Action parameters are not compatible with the group or manager
// - `omitted`: Action was not applied because this action's manager was disabled.
const (
	InstanceGroupManagerActionScheduledActionGroupStatusActiveConst       = "active"
	InstanceGroupManagerActionScheduledActionGroupStatusCompletedConst    = "completed"
	InstanceGroupManagerActionScheduledActionGroupStatusFailedConst       = "failed"
	InstanceGroupManagerActionScheduledActionGroupStatusIncompatibleConst = "incompatible"
	InstanceGroupManagerActionScheduledActionGroupStatusOmittedConst      = "omitted"
)

// Constants associated with the InstanceGroupManagerActionScheduledActionGroup.ActionType property.
// The type of action for the instance group.
const (
	InstanceGroupManagerActionScheduledActionGroupActionTypeScheduledConst = "scheduled"
)

func (*InstanceGroupManagerActionScheduledActionGroup) isaInstanceGroupManagerActionScheduledAction() bool {
	return true
}

func (*InstanceGroupManagerActionScheduledActionGroup) isaInstanceGroupManagerAction() bool {
	return true
}

// UnmarshalInstanceGroupManagerActionScheduledActionGroup unmarshals an instance of InstanceGroupManagerActionScheduledActionGroup from the specified map of raw messages.
func UnmarshalInstanceGroupManagerActionScheduledActionGroup(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerActionScheduledActionGroup)
	err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "auto_delete_timeout", &obj.AutoDeleteTimeout)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "status", &obj.Status)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "action_type", &obj.ActionType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "last_applied_at", &obj.LastAppliedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "next_run_at", &obj.NextRunAt)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroupGroup)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerActionScheduledActionManager : InstanceGroupManagerActionScheduledActionManager struct
// This model "extends" InstanceGroupManagerActionScheduledAction
type InstanceGroupManagerActionScheduledActionManager struct {
	// If set to `true`, this scheduled action will be automatically deleted after it has finished and the
	// `auto_delete_timeout` time has passed.
	AutoDelete *bool `json:"auto_delete" validate:"required"`

	// Amount of time in hours that are required to pass before the scheduled action will be automatically deleted once it
	// has finished. If this value is 0, the action will be deleted on completion.
	AutoDeleteTimeout *int64 `json:"auto_delete_timeout" validate:"required"`

	// The date and time that the instance group manager action was created.
	CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"`

	// The URL for this instance group manager action.
	Href *string `json:"href" validate:"required"`

	// The unique identifier for this instance group manager action.
	ID *string `json:"id" validate:"required"`

	// The user-defined name for this instance group manager action. Names must be unique within the instance group
	// manager.
	Name *string `json:"name" validate:"required"`

	// The resource type.
	ResourceType *string `json:"resource_type" validate:"required"`

	// The status of the instance group action
	// - `active`: Action is ready to be run
	// - `completed`: Action was completed successfully
	// - `failed`: Action could not be completed successfully
	// - `incompatible`: Action parameters are not compatible with the group or manager
	// - `omitted`: Action was not applied because this action's manager was disabled.
	Status *string `json:"status" validate:"required"`

	// The date and time that the instance group manager action was modified.
	UpdatedAt *strfmt.DateTime `json:"updated_at" validate:"required"`

	// The type of action for the instance group.
	ActionType *string `json:"action_type" validate:"required"`

	// The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min
	// period.
	CronSpec *string `json:"cron_spec,omitempty"`

	// The date and time the scheduled action was last applied. If empty the action has never been applied.
	LastAppliedAt *strfmt.DateTime `json:"last_applied_at,omitempty"`

	// The date and time the scheduled action will next run. If empty the system is currently calculating the next run
	// time.
	NextRunAt *strfmt.DateTime `json:"next_run_at,omitempty"`

	Manager InstanceGroupManagerScheduledActionManagerManagerIntf `json:"manager" validate:"required"`
}

// Constants associated with the InstanceGroupManagerActionScheduledActionManager.ResourceType property.
// The resource type.
const (
	InstanceGroupManagerActionScheduledActionManagerResourceTypeInstanceGroupManagerActionConst = "instance_group_manager_action"
)

// Constants associated with the InstanceGroupManagerActionScheduledActionManager.Status property.
// The status of the instance group action
// - `active`: Action is ready to be run
// - `completed`: Action was completed successfully
// - `failed`: Action could not be completed successfully
// - `incompatible`: Action parameters are not compatible with the group or manager
// - `omitted`: Action was not applied because this action's manager was disabled.
const (
	InstanceGroupManagerActionScheduledActionManagerStatusActiveConst       = "active"
	InstanceGroupManagerActionScheduledActionManagerStatusCompletedConst    = "completed"
	InstanceGroupManagerActionScheduledActionManagerStatusFailedConst       = "failed"
	InstanceGroupManagerActionScheduledActionManagerStatusIncompatibleConst = "incompatible"
	InstanceGroupManagerActionScheduledActionManagerStatusOmittedConst      = "omitted"
)

// Constants associated with the InstanceGroupManagerActionScheduledActionManager.ActionType property.
// The type of action for the instance group.
const (
	InstanceGroupManagerActionScheduledActionManagerActionTypeScheduledConst = "scheduled"
)

func (*InstanceGroupManagerActionScheduledActionManager) isaInstanceGroupManagerActionScheduledAction() bool {
	return true
}

func (*InstanceGroupManagerActionScheduledActionManager) isaInstanceGroupManagerAction() bool {
	return true
}

// UnmarshalInstanceGroupManagerActionScheduledActionManager unmarshals an instance of InstanceGroupManagerActionScheduledActionManager from the specified map of raw messages.
func UnmarshalInstanceGroupManagerActionScheduledActionManager(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerActionScheduledActionManager)
	err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "auto_delete_timeout", &obj.AutoDeleteTimeout)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "status", &obj.Status)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "action_type", &obj.ActionType)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "last_applied_at", &obj.LastAppliedAt)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "next_run_at", &obj.NextRunAt)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionManagerManager)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototypeInstanceGroupManagerScheduledActionManagerAutoScalePrototypeInstanceGroupManagerIdentityByHref : InstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototypeInstanceGroupManagerScheduledActionManagerAutoScalePrototypeInstanceGroupManagerIdentityByHref struct
// This model "extends" InstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototype
type InstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototypeInstanceGroupManagerScheduledActionManagerAutoScalePrototypeInstanceGroupManagerIdentityByHref struct {
	// The maximum number of members the instance group should have at the scheduled time.
	MaxMembershipCount *int64 `json:"max_membership_count,omitempty"`

	// The minimum number of members the instance group should have at the scheduled time.
	MinMembershipCount *int64 `json:"min_membership_count,omitempty"`

	// The URL for this instance group manager.
	Href *string `json:"href" validate:"required"`
}

// NewInstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototypeInstanceGroupManagerScheduledActionManagerAutoScalePrototypeInstanceGroupManagerIdentityByHref : Instantiate InstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototypeInstanceGroupManagerScheduledActionManagerAutoScalePrototypeInstanceGroupManagerIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewInstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototypeInstanceGroupManagerScheduledActionManagerAutoScalePrototypeInstanceGroupManagerIdentityByHref(href string) (model *InstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototypeInstanceGroupManagerScheduledActionManagerAutoScalePrototypeInstanceGroupManagerIdentityByHref, err error) {
	model = &InstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototypeInstanceGroupManagerScheduledActionManagerAutoScalePrototypeInstanceGroupManagerIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*InstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototypeInstanceGroupManagerScheduledActionManagerAutoScalePrototypeInstanceGroupManagerIdentityByHref) isaInstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototype() bool {
	return true
}

func (*InstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototypeInstanceGroupManagerScheduledActionManagerAutoScalePrototypeInstanceGroupManagerIdentityByHref) isaInstanceGroupManagerScheduledActionByManagerManager() bool {
	return true
}

// UnmarshalInstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototypeInstanceGroupManagerScheduledActionManagerAutoScalePrototypeInstanceGroupManagerIdentityByHref unmarshals an instance of InstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototypeInstanceGroupManagerScheduledActionManagerAutoScalePrototypeInstanceGroupManagerIdentityByHref from the specified map of raw messages.
func UnmarshalInstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototypeInstanceGroupManagerScheduledActionManagerAutoScalePrototypeInstanceGroupManagerIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototypeInstanceGroupManagerScheduledActionManagerAutoScalePrototypeInstanceGroupManagerIdentityByHref)
	err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototypeInstanceGroupManagerScheduledActionManagerAutoScalePrototypeInstanceGroupManagerIdentityByID : InstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototypeInstanceGroupManagerScheduledActionManagerAutoScalePrototypeInstanceGroupManagerIdentityByID struct
// This model "extends" InstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototype
type InstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototypeInstanceGroupManagerScheduledActionManagerAutoScalePrototypeInstanceGroupManagerIdentityByID struct {
	// The maximum number of members the instance group should have at the scheduled time.
	MaxMembershipCount *int64 `json:"max_membership_count,omitempty"`

	// The minimum number of members the instance group should have at the scheduled time.
	MinMembershipCount *int64 `json:"min_membership_count,omitempty"`

	// The unique identifier for this instance group manager.
	ID *string `json:"id" validate:"required"`
}

// NewInstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototypeInstanceGroupManagerScheduledActionManagerAutoScalePrototypeInstanceGroupManagerIdentityByID : Instantiate InstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototypeInstanceGroupManagerScheduledActionManagerAutoScalePrototypeInstanceGroupManagerIdentityByID (Generic Model Constructor)
func (*VpcV1) NewInstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototypeInstanceGroupManagerScheduledActionManagerAutoScalePrototypeInstanceGroupManagerIdentityByID(id string) (model *InstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototypeInstanceGroupManagerScheduledActionManagerAutoScalePrototypeInstanceGroupManagerIdentityByID, err error) {
	model = &InstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototypeInstanceGroupManagerScheduledActionManagerAutoScalePrototypeInstanceGroupManagerIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*InstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototypeInstanceGroupManagerScheduledActionManagerAutoScalePrototypeInstanceGroupManagerIdentityByID) isaInstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototype() bool {
	return true
}

func (*InstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototypeInstanceGroupManagerScheduledActionManagerAutoScalePrototypeInstanceGroupManagerIdentityByID) isaInstanceGroupManagerScheduledActionByManagerManager() bool {
	return true
}

// UnmarshalInstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototypeInstanceGroupManagerScheduledActionManagerAutoScalePrototypeInstanceGroupManagerIdentityByID unmarshals an instance of InstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototypeInstanceGroupManagerScheduledActionManagerAutoScalePrototypeInstanceGroupManagerIdentityByID from the specified map of raw messages.
func UnmarshalInstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototypeInstanceGroupManagerScheduledActionManagerAutoScalePrototypeInstanceGroupManagerIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerScheduledActionByManagerManagerAutoScalePrototypeInstanceGroupManagerScheduledActionManagerAutoScalePrototypeInstanceGroupManagerIdentityByID)
	err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN : InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN struct
// This model "extends" InstancePlacementTargetPrototypeDedicatedHostGroupIdentity
type InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN struct {
	// The CRN for this dedicated host group.
	CRN *string `json:"crn" validate:"required"`
}

// NewInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN : Instantiate InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN (Generic Model Constructor)
func (*VpcV1) NewInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN(crn string) (model *InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN, err error) {
	model = &InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN{
		CRN: core.StringPtr(crn),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN) isaInstancePlacementTargetPrototypeDedicatedHostGroupIdentity() bool {
	return true
}

func (*InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN) isaInstancePlacementTargetPrototype() bool {
	return true
}

// UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN unmarshals an instance of InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN from the specified map of raw messages.
func UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref : InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref struct
// This model "extends" InstancePlacementTargetPrototypeDedicatedHostGroupIdentity
type InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref struct {
	// The URL for this dedicated host group.
	Href *string `json:"href" validate:"required"`
}

// NewInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref : Instantiate InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref(href string) (model *InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref, err error) {
	model = &InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref) isaInstancePlacementTargetPrototypeDedicatedHostGroupIdentity() bool {
	return true
}

func (*InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref) isaInstancePlacementTargetPrototype() bool {
	return true
}

// UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref unmarshals an instance of InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref from the specified map of raw messages.
func UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID : InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID struct
// This model "extends" InstancePlacementTargetPrototypeDedicatedHostGroupIdentity
type InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID struct {
	// The unique identifier for this dedicated host group.
	ID *string `json:"id" validate:"required"`
}

// NewInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID : Instantiate InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID (Generic Model Constructor)
func (*VpcV1) NewInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID(id string) (model *InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID, err error) {
	model = &InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID) isaInstancePlacementTargetPrototypeDedicatedHostGroupIdentity() bool {
	return true
}

func (*InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID) isaInstancePlacementTargetPrototype() bool {
	return true
}

// UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID unmarshals an instance of InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID from the specified map of raw messages.
func UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN : InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN struct
// This model "extends" InstancePlacementTargetPrototypeDedicatedHostIdentity
type InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN struct {
	// The CRN for this dedicated host.
	CRN *string `json:"crn" validate:"required"`
}

// NewInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN : Instantiate InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN (Generic Model Constructor)
func (*VpcV1) NewInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN(crn string) (model *InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN, err error) {
	model = &InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN{
		CRN: core.StringPtr(crn),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN) isaInstancePlacementTargetPrototypeDedicatedHostIdentity() bool {
	return true
}

func (*InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN) isaInstancePlacementTargetPrototype() bool {
	return true
}

// UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN unmarshals an instance of InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN from the specified map of raw messages.
func UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref : InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref struct
// This model "extends" InstancePlacementTargetPrototypeDedicatedHostIdentity
type InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref struct {
	// The URL for this dedicated host.
	Href *string `json:"href" validate:"required"`
}

// NewInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref : Instantiate InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref(href string) (model *InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref, err error) {
	model = &InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref) isaInstancePlacementTargetPrototypeDedicatedHostIdentity() bool {
	return true
}

func (*InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref) isaInstancePlacementTargetPrototype() bool {
	return true
}

// UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref unmarshals an instance of InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref from the specified map of raw messages.
func UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID : InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID struct
// This model "extends" InstancePlacementTargetPrototypeDedicatedHostIdentity
type InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID struct {
	// The unique identifier for this dedicated host.
	ID *string `json:"id" validate:"required"`
}

// NewInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID : Instantiate InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID (Generic Model Constructor)
func (*VpcV1) NewInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID(id string) (model *InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID, err error) {
	model = &InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID) isaInstancePlacementTargetPrototypeDedicatedHostIdentity() bool {
	return true
}

func (*InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID) isaInstancePlacementTargetPrototype() bool {
	return true
}

// UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID unmarshals an instance of InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID from the specified map of raw messages.
func UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref : LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref struct
// This model "extends" LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity
type LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref struct {
	// The pool's canonical URL.
	Href *string `json:"href" validate:"required"`
}

// NewLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref : Instantiate LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref(href string) (model *LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref, err error) {
	model = &LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref) isaLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity() bool {
	return true
}

func (*LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref) isaLoadBalancerListenerPolicyTargetPatch() bool {
	return true
}

// UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref unmarshals an instance of LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref from the specified map of raw messages.
func UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID : LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID struct
// This model "extends" LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity
type LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID struct {
	// The unique identifier for this load balancer pool.
	ID *string `json:"id" validate:"required"`
}

// NewLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID : Instantiate LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID (Generic Model Constructor)
func (*VpcV1) NewLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID(id string) (model *LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID, err error) {
	model = &LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID) isaLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity() bool {
	return true
}

func (*LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID) isaLoadBalancerListenerPolicyTargetPatch() bool {
	return true
}

// UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID unmarshals an instance of LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID from the specified map of raw messages.
func UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref : LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref struct
// This model "extends" LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity
type LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref struct {
	// The pool's canonical URL.
	Href *string `json:"href" validate:"required"`
}

// NewLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref : Instantiate LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref(href string) (model *LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref, err error) {
	model = &LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref) isaLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity() bool {
	return true
}

func (*LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref) isaLoadBalancerListenerPolicyTargetPrototype() bool {
	return true
}

// UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref unmarshals an instance of LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref from the specified map of raw messages.
func UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID : LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID struct
// This model "extends" LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity
type LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID struct {
	// The unique identifier for this load balancer pool.
	ID *string `json:"id" validate:"required"`
}

// NewLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID : Instantiate LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID (Generic Model Constructor)
func (*VpcV1) NewLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID(id string) (model *LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID, err error) {
	model = &LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID) isaLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity() bool {
	return true
}

func (*LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID) isaLoadBalancerListenerPolicyTargetPrototype() bool {
	return true
}

// UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID unmarshals an instance of LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID from the specified map of raw messages.
func UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN : LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN struct
// This model "extends" LoadBalancerPoolMemberTargetPrototypeInstanceIdentity
type LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN struct {
	// The CRN for this virtual server instance.
	CRN *string `json:"crn" validate:"required"`
}

// NewLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN : Instantiate LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN (Generic Model Constructor)
func (*VpcV1) NewLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN(crn string) (model *LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN, err error) {
	model = &LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN{
		CRN: core.StringPtr(crn),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN) isaLoadBalancerPoolMemberTargetPrototypeInstanceIdentity() bool {
	return true
}

func (*LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN) isaLoadBalancerPoolMemberTargetPrototype() bool {
	return true
}

// UnmarshalLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN unmarshals an instance of LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN from the specified map of raw messages.
func UnmarshalLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref : LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref struct
// This model "extends" LoadBalancerPoolMemberTargetPrototypeInstanceIdentity
type LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref struct {
	// The URL for this virtual server instance.
	Href *string `json:"href" validate:"required"`
}

// NewLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref : Instantiate LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref(href string) (model *LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref, err error) {
	model = &LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref) isaLoadBalancerPoolMemberTargetPrototypeInstanceIdentity() bool {
	return true
}

func (*LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref) isaLoadBalancerPoolMemberTargetPrototype() bool {
	return true
}

// UnmarshalLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref unmarshals an instance of LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref from the specified map of raw messages.
func UnmarshalLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID : LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID struct
// This model "extends" LoadBalancerPoolMemberTargetPrototypeInstanceIdentity
type LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID struct {
	// The unique identifier for this virtual server instance.
	ID *string `json:"id" validate:"required"`
}

// NewLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID : Instantiate LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID (Generic Model Constructor)
func (*VpcV1) NewLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID(id string) (model *LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID, err error) {
	model = &LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) isaLoadBalancerPoolMemberTargetPrototypeInstanceIdentity() bool {
	return true
}

func (*LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) isaLoadBalancerPoolMemberTargetPrototype() bool {
	return true
}

// UnmarshalLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID unmarshals an instance of LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID from the specified map of raw messages.
func UnmarshalLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress : PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress struct
// This model "extends" PublicGatewayFloatingIPPrototypeFloatingIPIdentity
type PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress struct {
	// The globally unique IP address.
	Address *string `json:"address" validate:"required"`
}

// NewPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress : Instantiate PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress (Generic Model Constructor)
func (*VpcV1) NewPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress(address string) (model *PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress, err error) {
	model = &PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress{
		Address: core.StringPtr(address),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress) isaPublicGatewayFloatingIPPrototypeFloatingIPIdentity() bool {
	return true
}

func (*PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress) isaPublicGatewayFloatingIPPrototype() bool {
	return true
}

// UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress unmarshals an instance of PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress from the specified map of raw messages.
func UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress)
	err = core.UnmarshalPrimitive(m, "address", &obj.Address)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN : PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN struct
// This model "extends" PublicGatewayFloatingIPPrototypeFloatingIPIdentity
type PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN struct {
	// The CRN for this floating IP.
	CRN *string `json:"crn" validate:"required"`
}

// NewPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN : Instantiate PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN (Generic Model Constructor)
func (*VpcV1) NewPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN(crn string) (model *PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN, err error) {
	model = &PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN{
		CRN: core.StringPtr(crn),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN) isaPublicGatewayFloatingIPPrototypeFloatingIPIdentity() bool {
	return true
}

func (*PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN) isaPublicGatewayFloatingIPPrototype() bool {
	return true
}

// UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN unmarshals an instance of PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN from the specified map of raw messages.
func UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref : PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref struct
// This model "extends" PublicGatewayFloatingIPPrototypeFloatingIPIdentity
type PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref struct {
	// The URL for this floating IP.
	Href *string `json:"href" validate:"required"`
}

// NewPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref : Instantiate PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref(href string) (model *PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref, err error) {
	model = &PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref) isaPublicGatewayFloatingIPPrototypeFloatingIPIdentity() bool {
	return true
}

func (*PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref) isaPublicGatewayFloatingIPPrototype() bool {
	return true
}

// UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref unmarshals an instance of PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref from the specified map of raw messages.
func UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID : PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID struct
// This model "extends" PublicGatewayFloatingIPPrototypeFloatingIPIdentity
type PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID struct {
	// The unique identifier for this floating IP.
	ID *string `json:"id" validate:"required"`
}

// NewPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID : Instantiate PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID (Generic Model Constructor)
func (*VpcV1) NewPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID(id string) (model *PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID, err error) {
	model = &PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID) isaPublicGatewayFloatingIPPrototypeFloatingIPIdentity() bool {
	return true
}

func (*PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID) isaPublicGatewayFloatingIPPrototype() bool {
	return true
}

// UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID unmarshals an instance of PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID from the specified map of raw messages.
func UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN : ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN struct
// This model "extends" ReservedIPTargetPrototypeEndpointGatewayIdentity
type ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN struct {
	// The CRN for this endpoint gateway.
	CRN *string `json:"crn" validate:"required"`
}

// NewReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN : Instantiate ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN (Generic Model Constructor)
func (*VpcV1) NewReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN(crn string) (model *ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN, err error) {
	model = &ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN{
		CRN: core.StringPtr(crn),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN) isaReservedIPTargetPrototypeEndpointGatewayIdentity() bool {
	return true
}

func (*ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN) isaReservedIPTargetPrototype() bool {
	return true
}

// UnmarshalReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN unmarshals an instance of ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN from the specified map of raw messages.
func UnmarshalReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref : ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref struct
// This model "extends" ReservedIPTargetPrototypeEndpointGatewayIdentity
type ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref struct {
	// The URL for this endpoint gateway.
	Href *string `json:"href" validate:"required"`
}

// NewReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref : Instantiate ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref(href string) (model *ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref, err error) {
	model = &ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref) isaReservedIPTargetPrototypeEndpointGatewayIdentity() bool {
	return true
}

func (*ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref) isaReservedIPTargetPrototype() bool {
	return true
}

// UnmarshalReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref unmarshals an instance of ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref from the specified map of raw messages.
func UnmarshalReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID : ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID struct
// This model "extends" ReservedIPTargetPrototypeEndpointGatewayIdentity
type ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID struct {
	// The unique identifier for this endpoint gateway.
	ID *string `json:"id" validate:"required"`
}

// NewReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID : Instantiate ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID (Generic Model Constructor)
func (*VpcV1) NewReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID(id string) (model *ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID, err error) {
	model = &ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID) isaReservedIPTargetPrototypeEndpointGatewayIdentity() bool {
	return true
}

func (*ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID) isaReservedIPTargetPrototype() bool {
	return true
}

// UnmarshalReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID unmarshals an instance of ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID from the specified map of raw messages.
func UnmarshalReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref : RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref struct
// This model "extends" RouteNextHopPrototypeVPNGatewayConnectionIdentity
type RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref struct {
	// The VPN connection's canonical URL.
	Href *string `json:"href" validate:"required"`
}

// NewRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref : Instantiate RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref(href string) (model *RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref, err error) {
	model = &RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref) isaRouteNextHopPrototypeVPNGatewayConnectionIdentity() bool {
	return true
}

func (*RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref) isaRouteNextHopPrototype() bool {
	return true
}

// UnmarshalRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref unmarshals an instance of RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref from the specified map of raw messages.
func UnmarshalRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID : RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID struct
// This model "extends" RouteNextHopPrototypeVPNGatewayConnectionIdentity
type RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID struct {
	// The unique identifier for this VPN gateway connection.
	ID *string `json:"id" validate:"required"`
}

// NewRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID : Instantiate RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID (Generic Model Constructor)
func (*VpcV1) NewRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID(id string) (model *RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID, err error) {
	model = &RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID) isaRouteNextHopPrototypeVPNGatewayConnectionIdentity() bool {
	return true
}

func (*RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID) isaRouteNextHopPrototype() bool {
	return true
}

// UnmarshalRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID unmarshals an instance of RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID from the specified map of raw messages.
func UnmarshalRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(RouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN : SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN struct
// This model "extends" SecurityGroupRuleRemotePatchSecurityGroupIdentity
type SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN struct {
	// The security group's CRN.
	CRN *string `json:"crn" validate:"required"`
}

// NewSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN : Instantiate SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN (Generic Model Constructor)
func (*VpcV1) NewSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN(crn string) (model *SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN, err error) {
	model = &SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN{
		CRN: core.StringPtr(crn),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN) isaSecurityGroupRuleRemotePatchSecurityGroupIdentity() bool {
	return true
}

func (*SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN) isaSecurityGroupRuleRemotePatch() bool {
	return true
}

// UnmarshalSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN unmarshals an instance of SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN from the specified map of raw messages.
func UnmarshalSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref : SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref struct
// This model "extends" SecurityGroupRuleRemotePatchSecurityGroupIdentity
type SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref struct {
	// The security group's canonical URL.
	Href *string `json:"href" validate:"required"`
}

// NewSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref : Instantiate SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref(href string) (model *SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref, err error) {
	model = &SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref) isaSecurityGroupRuleRemotePatchSecurityGroupIdentity() bool {
	return true
}

func (*SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref) isaSecurityGroupRuleRemotePatch() bool {
	return true
}

// UnmarshalSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref unmarshals an instance of SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref from the specified map of raw messages.
func UnmarshalSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID : SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID struct
// This model "extends" SecurityGroupRuleRemotePatchSecurityGroupIdentity
type SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID struct {
	// The unique identifier for this security group.
	ID *string `json:"id" validate:"required"`
}

// NewSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID : Instantiate SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID (Generic Model Constructor)
func (*VpcV1) NewSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID(id string) (model *SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID, err error) {
	model = &SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID) isaSecurityGroupRuleRemotePatchSecurityGroupIdentity() bool {
	return true
}

func (*SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID) isaSecurityGroupRuleRemotePatch() bool {
	return true
}

// UnmarshalSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID unmarshals an instance of SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID from the specified map of raw messages.
func UnmarshalSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN : SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN struct
// This model "extends" SecurityGroupRuleRemotePrototypeSecurityGroupIdentity
type SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN struct {
	// The security group's CRN.
	CRN *string `json:"crn" validate:"required"`
}

// NewSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN : Instantiate SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN (Generic Model Constructor)
func (*VpcV1) NewSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN(crn string) (model *SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN, err error) {
	model = &SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN{
		CRN: core.StringPtr(crn),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN) isaSecurityGroupRuleRemotePrototypeSecurityGroupIdentity() bool {
	return true
}

func (*SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN) isaSecurityGroupRuleRemotePrototype() bool {
	return true
}

// UnmarshalSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN unmarshals an instance of SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN from the specified map of raw messages.
func UnmarshalSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref : SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref struct
// This model "extends" SecurityGroupRuleRemotePrototypeSecurityGroupIdentity
type SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref struct {
	// The security group's canonical URL.
	Href *string `json:"href" validate:"required"`
}

// NewSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref : Instantiate SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref(href string) (model *SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref, err error) {
	model = &SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref) isaSecurityGroupRuleRemotePrototypeSecurityGroupIdentity() bool {
	return true
}

func (*SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref) isaSecurityGroupRuleRemotePrototype() bool {
	return true
}

// UnmarshalSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref unmarshals an instance of SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref from the specified map of raw messages.
func UnmarshalSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID : SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID struct
// This model "extends" SecurityGroupRuleRemotePrototypeSecurityGroupIdentity
type SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID struct {
	// The unique identifier for this security group.
	ID *string `json:"id" validate:"required"`
}

// NewSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID : Instantiate SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID (Generic Model Constructor)
func (*VpcV1) NewSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID(id string) (model *SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID, err error) {
	model = &SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID) isaSecurityGroupRuleRemotePrototypeSecurityGroupIdentity() bool {
	return true
}

func (*SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID) isaSecurityGroupRuleRemotePrototype() bool {
	return true
}

// UnmarshalSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID unmarshals an instance of SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID from the specified map of raw messages.
func UnmarshalSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByCRN : VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByCRN struct
// This model "extends" VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentity
type VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByCRN struct {
	// The CRN for this volume.
	CRN *string `json:"crn" validate:"required"`
}

// NewVolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByCRN : Instantiate VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByCRN (Generic Model Constructor)
func (*VpcV1) NewVolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByCRN(crn string) (model *VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByCRN, err error) {
	model = &VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByCRN{
		CRN: core.StringPtr(crn),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByCRN) isaVolumeAttachmentVolumePrototypeInstanceContextVolumeIdentity() bool {
	return true
}

func (*VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByCRN) isaVolumeAttachmentVolumePrototypeInstanceContext() bool {
	return true
}

// UnmarshalVolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByCRN unmarshals an instance of VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByCRN from the specified map of raw messages.
func UnmarshalVolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByCRN)
	err = core.UnmarshalPrimitive(m, "crn", &obj.CRN)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByHref : VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByHref struct
// This model "extends" VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentity
type VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByHref struct {
	// The URL for this volume.
	Href *string `json:"href" validate:"required"`
}

// NewVolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByHref : Instantiate VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByHref (Generic Model Constructor)
func (*VpcV1) NewVolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByHref(href string) (model *VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByHref, err error) {
	model = &VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByHref{
		Href: core.StringPtr(href),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByHref) isaVolumeAttachmentVolumePrototypeInstanceContextVolumeIdentity() bool {
	return true
}

func (*VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByHref) isaVolumeAttachmentVolumePrototypeInstanceContext() bool {
	return true
}

// UnmarshalVolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByHref unmarshals an instance of VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByHref from the specified map of raw messages.
func UnmarshalVolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByHref)
	err = core.UnmarshalPrimitive(m, "href", &obj.Href)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByID : VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByID struct
// This model "extends" VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentity
type VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByID struct {
	// The unique identifier for this volume.
	ID *string `json:"id" validate:"required"`
}

// NewVolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByID : Instantiate VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByID (Generic Model Constructor)
func (*VpcV1) NewVolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByID(id string) (model *VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByID, err error) {
	model = &VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByID{
		ID: core.StringPtr(id),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByID) isaVolumeAttachmentVolumePrototypeInstanceContextVolumeIdentity() bool {
	return true
}

func (*VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByID) isaVolumeAttachmentVolumePrototypeInstanceContext() bool {
	return true
}

// UnmarshalVolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByID unmarshals an instance of VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByID from the specified map of raw messages.
func UnmarshalVolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumeAttachmentVolumePrototypeInstanceContextVolumeIdentityVolumeIdentityByID)
	err = core.UnmarshalPrimitive(m, "id", &obj.ID)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity : VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity struct
// This model "extends" VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContext
type VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity struct {
	// The bandwidth for the volume.
	Iops *int64 `json:"iops,omitempty"`

	// The unique user-defined name for this volume.
	Name *string `json:"name,omitempty"`

	// The profile to use for this volume.
	Profile VolumeProfileIdentityIntf `json:"profile" validate:"required"`

	// The capacity of the volume in gigabytes. The specified minimum and maximum capacity values for creating or updating
	// volumes may expand in the future.
	Capacity *int64 `json:"capacity" validate:"required"`

	// The identity of the root key to use to wrap the data encryption key for the volume.
	//
	// If this property is not provided, the `encryption` type for the volume will be
	// `provider_managed`.
	EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"`
}

// NewVolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity : Instantiate VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity (Generic Model Constructor)
func (*VpcV1) NewVolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity(profile VolumeProfileIdentityIntf, capacity int64) (model *VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity, err error) {
	model = &VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity{
		Profile:  profile,
		Capacity: core.Int64Ptr(capacity),
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity) isaVolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContext() bool {
	return true
}

func (*VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity) isaVolumeAttachmentVolumePrototypeInstanceContext() bool {
	return true
}

// UnmarshalVolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity unmarshals an instance of VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity from the specified map of raw messages.
func UnmarshalVolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(VolumeAttachmentVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity)
	err = core.UnmarshalPrimitive(m, "iops", &obj.Iops)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileIdentity)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup : InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup struct
// This model "extends" InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec
type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup struct {
	// The user-defined name for this instance group manager action. Names must be unique within the instance group
	// manager.
	Name *string `json:"name,omitempty"`

	// The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min
	// period.
	CronSpec *string `json:"cron_spec,omitempty"`

	Group *InstanceGroupManagerScheduledActionGroupPrototype `json:"group" validate:"required"`
}

// NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup : Instantiate InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup (Generic Model Constructor)
func (*VpcV1) NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup(group *InstanceGroupManagerScheduledActionGroupPrototype) (model *InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup, err error) {
	model = &InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup{
		Group: group,
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup) isaInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec() bool {
	return true
}

func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup) isaInstanceGroupManagerActionPrototypeScheduledActionPrototype() bool {
	return true
}

func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup) isaInstanceGroupManagerActionPrototype() bool {
	return true
}

// UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup unmarshals an instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup from the specified map of raw messages.
func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroupPrototype)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager : InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager struct
// This model "extends" InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec
type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager struct {
	// The user-defined name for this instance group manager action. Names must be unique within the instance group
	// manager.
	Name *string `json:"name,omitempty"`

	// The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min
	// period.
	CronSpec *string `json:"cron_spec,omitempty"`

	Manager InstanceGroupManagerScheduledActionByManagerManagerIntf `json:"manager" validate:"required"`
}

// NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager : Instantiate InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager (Generic Model Constructor)
func (*VpcV1) NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager(manager InstanceGroupManagerScheduledActionByManagerManagerIntf) (model *InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager, err error) {
	model = &InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager{
		Manager: manager,
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager) isaInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec() bool {
	return true
}

func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager) isaInstanceGroupManagerActionPrototypeScheduledActionPrototype() bool {
	return true
}

func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager) isaInstanceGroupManagerActionPrototype() bool {
	return true
}

// UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager unmarshals an instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager from the specified map of raw messages.
func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionByManagerManager)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup : InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup struct
// This model "extends" InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt
type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup struct {
	// The user-defined name for this instance group manager action. Names must be unique within the instance group
	// manager.
	Name *string `json:"name,omitempty"`

	// The date and time the scheduled action will run.
	RunAt *strfmt.DateTime `json:"run_at,omitempty"`

	Group *InstanceGroupManagerScheduledActionGroupPrototype `json:"group" validate:"required"`
}

// NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup : Instantiate InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup (Generic Model Constructor)
func (*VpcV1) NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup(group *InstanceGroupManagerScheduledActionGroupPrototype) (model *InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup, err error) {
	model = &InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup{
		Group: group,
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup) isaInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt() bool {
	return true
}

func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup) isaInstanceGroupManagerActionPrototypeScheduledActionPrototype() bool {
	return true
}

func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup) isaInstanceGroupManagerActionPrototype() bool {
	return true
}

// UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup unmarshals an instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup from the specified map of raw messages.
func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "run_at", &obj.RunAt)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroupPrototype)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}

// InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager : InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager struct
// This model "extends" InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt
type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager struct {
	// The user-defined name for this instance group manager action. Names must be unique within the instance group
	// manager.
	Name *string `json:"name,omitempty"`

	// The date and time the scheduled action will run.
	RunAt *strfmt.DateTime `json:"run_at,omitempty"`

	Manager InstanceGroupManagerScheduledActionByManagerManagerIntf `json:"manager" validate:"required"`
}

// NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager : Instantiate InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager (Generic Model Constructor)
func (*VpcV1) NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager(manager InstanceGroupManagerScheduledActionByManagerManagerIntf) (model *InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager, err error) {
	model = &InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager{
		Manager: manager,
	}
	err = core.ValidateStruct(model, "required parameters")
	return
}

func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager) isaInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt() bool {
	return true
}

func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager) isaInstanceGroupManagerActionPrototypeScheduledActionPrototype() bool {
	return true
}

func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager) isaInstanceGroupManagerActionPrototype() bool {
	return true
}

// UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager unmarshals an instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager from the specified map of raw messages.
func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager(m map[string]json.RawMessage, result interface{}) (err error) {
	obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager)
	err = core.UnmarshalPrimitive(m, "name", &obj.Name)
	if err != nil {
		return
	}
	err = core.UnmarshalPrimitive(m, "run_at", &obj.RunAt)
	if err != nil {
		return
	}
	err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionByManagerManager)
	if err != nil {
		return
	}
	reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
	return
}
