ipapi

package module
v3.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MPL-2.0 Imports: 21 Imported by: 3

README

Go API client for ipapi

Public IP blocks are a set of contiguous IPs that allow you to access your servers or networks from the internet. Use the IP Addresses API to request and delete IP blocks.

Knowledge base articles to help you can be found here

All URLs are relative to (https://api.phoenixnap.com/ips/v1/)

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import ipapi "github.com/phoenixnap/go-sdk-bmc/ipapi"

To use a proxy, set the environment variable HTTP_PROXY:

os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")

Configuration of Server URL

Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.

Select Server Configuration

For using other server than the one defined on index 0 set context value ipapi.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), ipapi.ContextServerIndex, 1)
Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value ipapi.ContextServerVariables of type map[string]string.

ctx := context.WithValue(context.Background(), ipapi.ContextServerVariables, map[string]string{
	"basePath": "v2",
})

Note, enum values are always validated and all unused variables are silently ignored.

URLs Configuration per Operation

Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "{classname}Service.{nickname}" string. Similar rules for overriding default operation server index and variables applies by using ipapi.ContextOperationServerIndices and ipapi.ContextOperationServerVariables context maps.

ctx := context.WithValue(context.Background(), ipapi.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), ipapi.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

All URIs are relative to https://api.phoenixnap.com/ips/v1

Class Method HTTP request Description
IPBlocksAPI IpBlocksGet Get /ip-blocks List IP Blocks.
IPBlocksAPI IpBlocksIpBlockIdDelete Delete /ip-blocks/{ipBlockId} Delete IP Block.
IPBlocksAPI IpBlocksIpBlockIdGet Get /ip-blocks/{ipBlockId} Get IP Block.
IPBlocksAPI IpBlocksIpBlockIdPatch Patch /ip-blocks/{ipBlockId} Update IP block.
IPBlocksAPI IpBlocksIpBlockIdTagsPut Put /ip-blocks/{ipBlockId}/tags Overwrite tags assigned for IP Block.
IPBlocksAPI IpBlocksPost Post /ip-blocks Create an IP Block.

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

OAuth2
  • Type: OAuth
  • Flow: application
  • Authorization URL:
  • Scopes:
  • bmc: Grants full access to bmc-api.
  • bmc.read: Grants read only access to bmc-api.

Example

auth := context.WithValue(context.Background(), ipapi.ContextAccessToken, "ACCESSTOKENSTRING")
r, err := client.Service.Operation(auth, args)

Or via OAuth2 module to automatically refresh tokens and perform user authentication.

import "golang.org/x/oauth2"

/* Perform OAuth2 round trip request and obtain a token */

tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token)
auth := context.WithValue(oauth2.NoContext, ipapi.ContextOAuth2, tokenSource)
r, err := client.Service.Operation(auth, args)

Documentation for Utility Methods

Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:

  • PtrBool
  • PtrInt
  • PtrInt32
  • PtrInt64
  • PtrFloat
  • PtrFloat32
  • PtrFloat64
  • PtrString
  • PtrTime

Author

support@phoenixnap.com

Documentation

Index

Constants

View Source
const SdkVersion = "3.0.2"

Variables

View Source
var (
	JsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?json)`)
	XmlCheck  = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?xml)`)
)
View Source
var (
	// ContextOAuth2 takes an oauth2.TokenSource as authentication for the request.
	ContextOAuth2 = contextKey("token")

	// ContextServerIndex uses a server configuration from the index.
	ContextServerIndex = contextKey("serverIndex")

	// ContextOperationServerIndices uses a server configuration from the index mapping.
	ContextOperationServerIndices = contextKey("serverOperationIndices")

	// ContextServerVariables overrides a server configuration variables.
	ContextServerVariables = contextKey("serverVariables")

	// ContextOperationServerVariables overrides a server configuration variables using operation specific values.
	ContextOperationServerVariables = contextKey("serverOperationVariables")
)

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

func IsNil

func IsNil(i interface{}) bool

IsNil checks if an input is nil

func PtrBool

func PtrBool(v bool) *bool

PtrBool is a helper routine that returns a pointer to given boolean value.

func PtrFloat32

func PtrFloat32(v float32) *float32

PtrFloat32 is a helper routine that returns a pointer to given float value.

func PtrFloat64

func PtrFloat64(v float64) *float64

PtrFloat64 is a helper routine that returns a pointer to given float value.

func PtrInt

func PtrInt(v int) *int

PtrInt is a helper routine that returns a pointer to given integer value.

func PtrInt32

func PtrInt32(v int32) *int32

PtrInt32 is a helper routine that returns a pointer to given integer value.

func PtrInt64

func PtrInt64(v int64) *int64

PtrInt64 is a helper routine that returns a pointer to given integer value.

func PtrString

func PtrString(v string) *string

PtrString is a helper routine that returns a pointer to given string value.

func PtrTime

func PtrTime(v time.Time) *time.Time

PtrTime is helper routine that returns a pointer to given Time value.

Types

type APIClient

type APIClient struct {
	IPBlocksAPI IPBlocksAPI
	// contains filtered or unexported fields
}

APIClient manages communication with the IP Addresses API API v1.0 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) GetConfig

func (c *APIClient) GetConfig() *Configuration

Allow modification of underlying config for alternate implementations and testing Caution: modifying the configuration while live can cause data races and potentially unwanted behavior

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the OpenAPI operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

APIResponse stores the API response returned by the server.

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

NewAPIResponse returns a new APIResponse object.

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

NewAPIResponseWithError returns a new APIResponse object with the provided error message.

type ApiIpBlocksGetRequest

type ApiIpBlocksGetRequest struct {
	ApiService IPBlocksAPI
	// contains filtered or unexported fields
}

func (ApiIpBlocksGetRequest) Execute

func (r ApiIpBlocksGetRequest) Execute() ([]IpBlock, *http.Response, error)

func (ApiIpBlocksGetRequest) Tag

List of tags, in the form tagName.tagValue, to filter by.

type ApiIpBlocksIpBlockIdDeleteRequest

type ApiIpBlocksIpBlockIdDeleteRequest struct {
	ApiService IPBlocksAPI
	// contains filtered or unexported fields
}

func (ApiIpBlocksIpBlockIdDeleteRequest) Execute

type ApiIpBlocksIpBlockIdGetRequest

type ApiIpBlocksIpBlockIdGetRequest struct {
	ApiService IPBlocksAPI
	// contains filtered or unexported fields
}

func (ApiIpBlocksIpBlockIdGetRequest) Execute

type ApiIpBlocksIpBlockIdPatchRequest

type ApiIpBlocksIpBlockIdPatchRequest struct {
	ApiService IPBlocksAPI
	// contains filtered or unexported fields
}

func (ApiIpBlocksIpBlockIdPatchRequest) Execute

func (ApiIpBlocksIpBlockIdPatchRequest) IpBlockPatch

type ApiIpBlocksIpBlockIdTagsPutRequest

type ApiIpBlocksIpBlockIdTagsPutRequest struct {
	ApiService IPBlocksAPI
	// contains filtered or unexported fields
}

func (ApiIpBlocksIpBlockIdTagsPutRequest) Execute

func (ApiIpBlocksIpBlockIdTagsPutRequest) TagAssignmentRequest

type ApiIpBlocksPostRequest

type ApiIpBlocksPostRequest struct {
	ApiService IPBlocksAPI
	// contains filtered or unexported fields
}

func (ApiIpBlocksPostRequest) Execute

func (r ApiIpBlocksPostRequest) Execute() (*IpBlock, *http.Response, error)

func (ApiIpBlocksPostRequest) IpBlockCreate

func (r ApiIpBlocksPostRequest) IpBlockCreate(ipBlockCreate IpBlockCreate) ApiIpBlocksPostRequest

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type Configuration

type Configuration struct {
	Host             string            `json:"host,omitempty"`
	Scheme           string            `json:"scheme,omitempty"`
	DefaultHeader    map[string]string `json:"defaultHeader,omitempty"`
	UserAgent        string            `json:"userAgent,omitempty"`
	XPoweredBy       string            `json:"xPoweredBy,omitempty"`
	Debug            bool              `json:"debug,omitempty"`
	Servers          ServerConfigurations
	OperationServers map[string]ServerConfigurations
	HTTPClient       *http.Client
}

Configuration stores the configuration of the API client

func NewConfiguration

func NewConfiguration() *Configuration

NewConfiguration returns a new Configuration object

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

AddDefaultHeader adds a new HTTP header to the default header in the request

func (*Configuration) ServerURL

func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error)

ServerURL returns URL based on server settings

func (*Configuration) ServerURLWithContext

func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error)

ServerURLWithContext returns a new server URL given an endpoint

type DeleteIpBlockResult

type DeleteIpBlockResult struct {
	// IP Block has been deleted.
	Result string `json:"result"`
	// The unique identifier of the IP Block.
	IpBlockId            string `json:"ipBlockId"`
	AdditionalProperties map[string]interface{}
}

DeleteIpBlockResult Result of a successful delete action.

func NewDeleteIpBlockResult

func NewDeleteIpBlockResult(result string, ipBlockId string) *DeleteIpBlockResult

NewDeleteIpBlockResult instantiates a new DeleteIpBlockResult object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewDeleteIpBlockResultWithDefaults

func NewDeleteIpBlockResultWithDefaults() *DeleteIpBlockResult

NewDeleteIpBlockResultWithDefaults instantiates a new DeleteIpBlockResult object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*DeleteIpBlockResult) GetIpBlockId

func (o *DeleteIpBlockResult) GetIpBlockId() string

GetIpBlockId returns the IpBlockId field value

func (*DeleteIpBlockResult) GetIpBlockIdOk

func (o *DeleteIpBlockResult) GetIpBlockIdOk() (*string, bool)

GetIpBlockIdOk returns a tuple with the IpBlockId field value and a boolean to check if the value has been set.

func (*DeleteIpBlockResult) GetResult

func (o *DeleteIpBlockResult) GetResult() string

GetResult returns the Result field value

func (*DeleteIpBlockResult) GetResultOk

func (o *DeleteIpBlockResult) GetResultOk() (*string, bool)

GetResultOk returns a tuple with the Result field value and a boolean to check if the value has been set.

func (DeleteIpBlockResult) MarshalJSON

func (o DeleteIpBlockResult) MarshalJSON() ([]byte, error)

func (*DeleteIpBlockResult) SetIpBlockId

func (o *DeleteIpBlockResult) SetIpBlockId(v string)

SetIpBlockId sets field value

func (*DeleteIpBlockResult) SetResult

func (o *DeleteIpBlockResult) SetResult(v string)

SetResult sets field value

func (DeleteIpBlockResult) ToMap

func (o DeleteIpBlockResult) ToMap() (map[string]interface{}, error)

func (*DeleteIpBlockResult) UnmarshalJSON

func (o *DeleteIpBlockResult) UnmarshalJSON(data []byte) (err error)

type Error

type Error struct {
	// The description detailing the cause of the error code.
	Message string `json:"message"`
	// Validation errors, if any.
	ValidationErrors     []string `json:"validationErrors,omitempty"`
	AdditionalProperties map[string]interface{}
}

Error struct for Error

func NewError

func NewError(message string) *Error

NewError instantiates a new Error object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewErrorWithDefaults

func NewErrorWithDefaults() *Error

NewErrorWithDefaults instantiates a new Error object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*Error) GetMessage

func (o *Error) GetMessage() string

GetMessage returns the Message field value

func (*Error) GetMessageOk

func (o *Error) GetMessageOk() (*string, bool)

GetMessageOk returns a tuple with the Message field value and a boolean to check if the value has been set.

func (*Error) GetValidationErrors

func (o *Error) GetValidationErrors() []string

GetValidationErrors returns the ValidationErrors field value if set, zero value otherwise.

func (*Error) GetValidationErrorsOk

func (o *Error) GetValidationErrorsOk() ([]string, bool)

GetValidationErrorsOk returns a tuple with the ValidationErrors field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Error) HasValidationErrors

func (o *Error) HasValidationErrors() bool

HasValidationErrors returns a boolean if a field has been set.

func (Error) MarshalJSON

func (o Error) MarshalJSON() ([]byte, error)

func (*Error) SetMessage

func (o *Error) SetMessage(v string)

SetMessage sets field value

func (*Error) SetValidationErrors

func (o *Error) SetValidationErrors(v []string)

SetValidationErrors gets a reference to the given []string and assigns it to the ValidationErrors field.

func (Error) ToMap

func (o Error) ToMap() (map[string]interface{}, error)

func (*Error) UnmarshalJSON

func (o *Error) UnmarshalJSON(data []byte) (err error)

type GenericOpenAPIError

type GenericOpenAPIError struct {
	// contains filtered or unexported fields
}

GenericOpenAPIError Provides access to the body, error and model on returned errors.

func (GenericOpenAPIError) Body

func (e GenericOpenAPIError) Body() []byte

Body returns the raw bytes of the response

func (GenericOpenAPIError) Error

func (e GenericOpenAPIError) Error() string

Error returns non-empty string if there was an error.

func (GenericOpenAPIError) Model

func (e GenericOpenAPIError) Model() interface{}

Model returns the unpacked model of the error

type IPBlocksAPI

type IPBlocksAPI interface {

	/*
		IpBlocksGet List IP Blocks.

		List all IP Blocks.

		@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
		@return ApiIpBlocksGetRequest
	*/
	IpBlocksGet(ctx context.Context) ApiIpBlocksGetRequest

	// IpBlocksGetExecute executes the request
	//  @return []IpBlock
	IpBlocksGetExecute(r ApiIpBlocksGetRequest) ([]IpBlock, *http.Response, error)

	/*
		IpBlocksIpBlockIdDelete Delete IP Block.

		Delete an IP Block. An IP Block can only be deleted if not assigned to any resource.

		@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
		@param ipBlockId The IP Block identifier.
		@return ApiIpBlocksIpBlockIdDeleteRequest
	*/
	IpBlocksIpBlockIdDelete(ctx context.Context, ipBlockId string) ApiIpBlocksIpBlockIdDeleteRequest

	// IpBlocksIpBlockIdDeleteExecute executes the request
	//  @return DeleteIpBlockResult
	IpBlocksIpBlockIdDeleteExecute(r ApiIpBlocksIpBlockIdDeleteRequest) (*DeleteIpBlockResult, *http.Response, error)

	/*
		IpBlocksIpBlockIdGet Get IP Block.

		Get IP Block.

		@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
		@param ipBlockId The IP Block identifier.
		@return ApiIpBlocksIpBlockIdGetRequest
	*/
	IpBlocksIpBlockIdGet(ctx context.Context, ipBlockId string) ApiIpBlocksIpBlockIdGetRequest

	// IpBlocksIpBlockIdGetExecute executes the request
	//  @return IpBlock
	IpBlocksIpBlockIdGetExecute(r ApiIpBlocksIpBlockIdGetRequest) (*IpBlock, *http.Response, error)

	/*
		IpBlocksIpBlockIdPatch Update IP block.

		Update IP Block's details.

		@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
		@param ipBlockId The IP Block identifier.
		@return ApiIpBlocksIpBlockIdPatchRequest
	*/
	IpBlocksIpBlockIdPatch(ctx context.Context, ipBlockId string) ApiIpBlocksIpBlockIdPatchRequest

	// IpBlocksIpBlockIdPatchExecute executes the request
	//  @return IpBlock
	IpBlocksIpBlockIdPatchExecute(r ApiIpBlocksIpBlockIdPatchRequest) (*IpBlock, *http.Response, error)

	/*
		IpBlocksIpBlockIdTagsPut Overwrite tags assigned for IP Block.

		Overwrites tags assigned for IP Block and unassigns any tags not part of the request.

		@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
		@param ipBlockId The IP Block identifier.
		@return ApiIpBlocksIpBlockIdTagsPutRequest
	*/
	IpBlocksIpBlockIdTagsPut(ctx context.Context, ipBlockId string) ApiIpBlocksIpBlockIdTagsPutRequest

	// IpBlocksIpBlockIdTagsPutExecute executes the request
	//  @return IpBlock
	IpBlocksIpBlockIdTagsPutExecute(r ApiIpBlocksIpBlockIdTagsPutRequest) (*IpBlock, *http.Response, error)

	/*
		IpBlocksPost Create an IP Block.

		Request an IP Block. An IP Block is a set of contiguous IPs that can be assigned to other resources such as servers.

		@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
		@return ApiIpBlocksPostRequest
	*/
	IpBlocksPost(ctx context.Context) ApiIpBlocksPostRequest

	// IpBlocksPostExecute executes the request
	//  @return IpBlock
	IpBlocksPostExecute(r ApiIpBlocksPostRequest) (*IpBlock, *http.Response, error)
}

type IPBlocksAPIService

type IPBlocksAPIService service

IPBlocksAPIService IPBlocksAPI service

func (*IPBlocksAPIService) IpBlocksGet

IpBlocksGet List IP Blocks.

List all IP Blocks.

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiIpBlocksGetRequest

func (*IPBlocksAPIService) IpBlocksGetExecute

func (a *IPBlocksAPIService) IpBlocksGetExecute(r ApiIpBlocksGetRequest) ([]IpBlock, *http.Response, error)

Execute executes the request

@return []IpBlock

func (*IPBlocksAPIService) IpBlocksIpBlockIdDelete

func (a *IPBlocksAPIService) IpBlocksIpBlockIdDelete(ctx context.Context, ipBlockId string) ApiIpBlocksIpBlockIdDeleteRequest

IpBlocksIpBlockIdDelete Delete IP Block.

Delete an IP Block. An IP Block can only be deleted if not assigned to any resource.

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ipBlockId The IP Block identifier.
@return ApiIpBlocksIpBlockIdDeleteRequest

func (*IPBlocksAPIService) IpBlocksIpBlockIdDeleteExecute

Execute executes the request

@return DeleteIpBlockResult

func (*IPBlocksAPIService) IpBlocksIpBlockIdGet

func (a *IPBlocksAPIService) IpBlocksIpBlockIdGet(ctx context.Context, ipBlockId string) ApiIpBlocksIpBlockIdGetRequest

IpBlocksIpBlockIdGet Get IP Block.

Get IP Block.

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ipBlockId The IP Block identifier.
@return ApiIpBlocksIpBlockIdGetRequest

func (*IPBlocksAPIService) IpBlocksIpBlockIdGetExecute

func (a *IPBlocksAPIService) IpBlocksIpBlockIdGetExecute(r ApiIpBlocksIpBlockIdGetRequest) (*IpBlock, *http.Response, error)

Execute executes the request

@return IpBlock

func (*IPBlocksAPIService) IpBlocksIpBlockIdPatch

func (a *IPBlocksAPIService) IpBlocksIpBlockIdPatch(ctx context.Context, ipBlockId string) ApiIpBlocksIpBlockIdPatchRequest

IpBlocksIpBlockIdPatch Update IP block.

Update IP Block's details.

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ipBlockId The IP Block identifier.
@return ApiIpBlocksIpBlockIdPatchRequest

func (*IPBlocksAPIService) IpBlocksIpBlockIdPatchExecute

func (a *IPBlocksAPIService) IpBlocksIpBlockIdPatchExecute(r ApiIpBlocksIpBlockIdPatchRequest) (*IpBlock, *http.Response, error)

Execute executes the request

@return IpBlock

func (*IPBlocksAPIService) IpBlocksIpBlockIdTagsPut

func (a *IPBlocksAPIService) IpBlocksIpBlockIdTagsPut(ctx context.Context, ipBlockId string) ApiIpBlocksIpBlockIdTagsPutRequest

IpBlocksIpBlockIdTagsPut Overwrite tags assigned for IP Block.

Overwrites tags assigned for IP Block and unassigns any tags not part of the request.

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ipBlockId The IP Block identifier.
@return ApiIpBlocksIpBlockIdTagsPutRequest

func (*IPBlocksAPIService) IpBlocksIpBlockIdTagsPutExecute

func (a *IPBlocksAPIService) IpBlocksIpBlockIdTagsPutExecute(r ApiIpBlocksIpBlockIdTagsPutRequest) (*IpBlock, *http.Response, error)

Execute executes the request

@return IpBlock

func (*IPBlocksAPIService) IpBlocksPost

IpBlocksPost Create an IP Block.

Request an IP Block. An IP Block is a set of contiguous IPs that can be assigned to other resources such as servers.

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiIpBlocksPostRequest

func (*IPBlocksAPIService) IpBlocksPostExecute

func (a *IPBlocksAPIService) IpBlocksPostExecute(r ApiIpBlocksPostRequest) (*IpBlock, *http.Response, error)

Execute executes the request

@return IpBlock

type IpBlock

type IpBlock struct {
	// IP Block identifier.
	Id string `json:"id"`
	// IP Block location ID. Currently this field should be set to `PHX`, `ASH`, `SGP`, `NLD`, `CHI`, `SEA` or `AUS`.
	Location string `json:"location"`
	// CIDR IP Block Size. Currently this field should be set to either `/31`, `/30`, `/29`, `/28`, `/27`, `/26`, `/25`, `/24`, `/23` or `/22`.
	CidrBlockSize string `json:"cidrBlockSize"`
	// The IP Block in CIDR notation.
	Cidr string `json:"cidr"`
	// The status of the IP Block. Can have one of the following values: `creating` , `assigning` , `error assigning` , `assigned` , `unassigning` , `error unassigning` or `unassigned`.
	Status string `json:"status"`
	// ID of the resource assigned to the IP Block.
	AssignedResourceId *string `json:"assignedResourceId,omitempty"`
	// Type of the resource assigned to the IP Block.
	AssignedResourceType *string `json:"assignedResourceType,omitempty"`
	// The description of the IP Block.
	Description *string `json:"description,omitempty"`
	// The tags assigned if any.
	Tags []TagAssignment `json:"tags,omitempty"`
	// True if the IP block is a `bring your own` block.
	IsBringYourOwn bool `json:"isBringYourOwn"`
	// Date and time when the IP block was created.
	CreatedOn            time.Time `json:"createdOn"`
	AdditionalProperties map[string]interface{}
}

IpBlock IP Block Details.

func NewIpBlock

func NewIpBlock(id string, location string, cidrBlockSize string, cidr string, status string, isBringYourOwn bool, createdOn time.Time) *IpBlock

NewIpBlock instantiates a new IpBlock object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewIpBlockWithDefaults

func NewIpBlockWithDefaults() *IpBlock

NewIpBlockWithDefaults instantiates a new IpBlock object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*IpBlock) GetAssignedResourceId

func (o *IpBlock) GetAssignedResourceId() string

GetAssignedResourceId returns the AssignedResourceId field value if set, zero value otherwise.

func (*IpBlock) GetAssignedResourceIdOk

func (o *IpBlock) GetAssignedResourceIdOk() (*string, bool)

GetAssignedResourceIdOk returns a tuple with the AssignedResourceId field value if set, nil otherwise and a boolean to check if the value has been set.

func (*IpBlock) GetAssignedResourceType

func (o *IpBlock) GetAssignedResourceType() string

GetAssignedResourceType returns the AssignedResourceType field value if set, zero value otherwise.

func (*IpBlock) GetAssignedResourceTypeOk

func (o *IpBlock) GetAssignedResourceTypeOk() (*string, bool)

GetAssignedResourceTypeOk returns a tuple with the AssignedResourceType field value if set, nil otherwise and a boolean to check if the value has been set.

func (*IpBlock) GetCidr

func (o *IpBlock) GetCidr() string

GetCidr returns the Cidr field value

func (*IpBlock) GetCidrBlockSize

func (o *IpBlock) GetCidrBlockSize() string

GetCidrBlockSize returns the CidrBlockSize field value

func (*IpBlock) GetCidrBlockSizeOk

func (o *IpBlock) GetCidrBlockSizeOk() (*string, bool)

GetCidrBlockSizeOk returns a tuple with the CidrBlockSize field value and a boolean to check if the value has been set.

func (*IpBlock) GetCidrOk

func (o *IpBlock) GetCidrOk() (*string, bool)

GetCidrOk returns a tuple with the Cidr field value and a boolean to check if the value has been set.

func (*IpBlock) GetCreatedOn

func (o *IpBlock) GetCreatedOn() time.Time

GetCreatedOn returns the CreatedOn field value

func (*IpBlock) GetCreatedOnOk

func (o *IpBlock) GetCreatedOnOk() (*time.Time, bool)

GetCreatedOnOk returns a tuple with the CreatedOn field value and a boolean to check if the value has been set.

func (*IpBlock) GetDescription

func (o *IpBlock) GetDescription() string

GetDescription returns the Description field value if set, zero value otherwise.

func (*IpBlock) GetDescriptionOk

func (o *IpBlock) GetDescriptionOk() (*string, bool)

GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise and a boolean to check if the value has been set.

func (*IpBlock) GetId

func (o *IpBlock) GetId() string

GetId returns the Id field value

func (*IpBlock) GetIdOk

func (o *IpBlock) GetIdOk() (*string, bool)

GetIdOk returns a tuple with the Id field value and a boolean to check if the value has been set.

func (*IpBlock) GetIsBringYourOwn

func (o *IpBlock) GetIsBringYourOwn() bool

GetIsBringYourOwn returns the IsBringYourOwn field value

func (*IpBlock) GetIsBringYourOwnOk

func (o *IpBlock) GetIsBringYourOwnOk() (*bool, bool)

GetIsBringYourOwnOk returns a tuple with the IsBringYourOwn field value and a boolean to check if the value has been set.

func (*IpBlock) GetLocation

func (o *IpBlock) GetLocation() string

GetLocation returns the Location field value

func (*IpBlock) GetLocationOk

func (o *IpBlock) GetLocationOk() (*string, bool)

GetLocationOk returns a tuple with the Location field value and a boolean to check if the value has been set.

func (*IpBlock) GetStatus

func (o *IpBlock) GetStatus() string

GetStatus returns the Status field value

func (*IpBlock) GetStatusOk

func (o *IpBlock) GetStatusOk() (*string, bool)

GetStatusOk returns a tuple with the Status field value and a boolean to check if the value has been set.

func (*IpBlock) GetTags

func (o *IpBlock) GetTags() []TagAssignment

GetTags returns the Tags field value if set, zero value otherwise.

func (*IpBlock) GetTagsOk

func (o *IpBlock) GetTagsOk() ([]TagAssignment, bool)

GetTagsOk returns a tuple with the Tags field value if set, nil otherwise and a boolean to check if the value has been set.

func (*IpBlock) HasAssignedResourceId

func (o *IpBlock) HasAssignedResourceId() bool

HasAssignedResourceId returns a boolean if a field has been set.

func (*IpBlock) HasAssignedResourceType

func (o *IpBlock) HasAssignedResourceType() bool

HasAssignedResourceType returns a boolean if a field has been set.

func (*IpBlock) HasDescription

func (o *IpBlock) HasDescription() bool

HasDescription returns a boolean if a field has been set.

func (*IpBlock) HasTags

func (o *IpBlock) HasTags() bool

HasTags returns a boolean if a field has been set.

func (IpBlock) MarshalJSON

func (o IpBlock) MarshalJSON() ([]byte, error)

func (*IpBlock) SetAssignedResourceId

func (o *IpBlock) SetAssignedResourceId(v string)

SetAssignedResourceId gets a reference to the given string and assigns it to the AssignedResourceId field.

func (*IpBlock) SetAssignedResourceType

func (o *IpBlock) SetAssignedResourceType(v string)

SetAssignedResourceType gets a reference to the given string and assigns it to the AssignedResourceType field.

func (*IpBlock) SetCidr

func (o *IpBlock) SetCidr(v string)

SetCidr sets field value

func (*IpBlock) SetCidrBlockSize

func (o *IpBlock) SetCidrBlockSize(v string)

SetCidrBlockSize sets field value

func (*IpBlock) SetCreatedOn

func (o *IpBlock) SetCreatedOn(v time.Time)

SetCreatedOn sets field value

func (*IpBlock) SetDescription

func (o *IpBlock) SetDescription(v string)

SetDescription gets a reference to the given string and assigns it to the Description field.

func (*IpBlock) SetId

func (o *IpBlock) SetId(v string)

SetId sets field value

func (*IpBlock) SetIsBringYourOwn

func (o *IpBlock) SetIsBringYourOwn(v bool)

SetIsBringYourOwn sets field value

func (*IpBlock) SetLocation

func (o *IpBlock) SetLocation(v string)

SetLocation sets field value

func (*IpBlock) SetStatus

func (o *IpBlock) SetStatus(v string)

SetStatus sets field value

func (*IpBlock) SetTags

func (o *IpBlock) SetTags(v []TagAssignment)

SetTags gets a reference to the given []TagAssignment and assigns it to the Tags field.

func (IpBlock) ToMap

func (o IpBlock) ToMap() (map[string]interface{}, error)

func (*IpBlock) UnmarshalJSON

func (o *IpBlock) UnmarshalJSON(data []byte) (err error)

type IpBlockCreate

type IpBlockCreate struct {
	// IP Block location ID. Currently this field should be set to `PHX`, `ASH`, `SGP`, `NLD`, `CHI`, `SEA` or `AUS`.
	Location string `json:"location"`
	// CIDR IP Block Size. Currently this field should be set to either `/31`, `/30`, `/29` or `/28`. For a larger Block Size contact support.
	CidrBlockSize string `json:"cidrBlockSize"`
	// The description of the IP Block.
	Description *string `json:"description,omitempty"`
	// Tags to set to the ip-block. To create a new tag or list all the existing tags that you can use, refer to [Tags API](https://developers.phoenixnap.com/docs/tags/1/overview).
	Tags                 []TagAssignmentRequest `json:"tags,omitempty"`
	AdditionalProperties map[string]interface{}
}

IpBlockCreate IP Block Request.

func NewIpBlockCreate

func NewIpBlockCreate(location string, cidrBlockSize string) *IpBlockCreate

NewIpBlockCreate instantiates a new IpBlockCreate object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewIpBlockCreateWithDefaults

func NewIpBlockCreateWithDefaults() *IpBlockCreate

NewIpBlockCreateWithDefaults instantiates a new IpBlockCreate object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*IpBlockCreate) GetCidrBlockSize

func (o *IpBlockCreate) GetCidrBlockSize() string

GetCidrBlockSize returns the CidrBlockSize field value

func (*IpBlockCreate) GetCidrBlockSizeOk

func (o *IpBlockCreate) GetCidrBlockSizeOk() (*string, bool)

GetCidrBlockSizeOk returns a tuple with the CidrBlockSize field value and a boolean to check if the value has been set.

func (*IpBlockCreate) GetDescription

func (o *IpBlockCreate) GetDescription() string

GetDescription returns the Description field value if set, zero value otherwise.

func (*IpBlockCreate) GetDescriptionOk

func (o *IpBlockCreate) GetDescriptionOk() (*string, bool)

GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise and a boolean to check if the value has been set.

func (*IpBlockCreate) GetLocation

func (o *IpBlockCreate) GetLocation() string

GetLocation returns the Location field value

func (*IpBlockCreate) GetLocationOk

func (o *IpBlockCreate) GetLocationOk() (*string, bool)

GetLocationOk returns a tuple with the Location field value and a boolean to check if the value has been set.

func (*IpBlockCreate) GetTags

func (o *IpBlockCreate) GetTags() []TagAssignmentRequest

GetTags returns the Tags field value if set, zero value otherwise.

func (*IpBlockCreate) GetTagsOk

func (o *IpBlockCreate) GetTagsOk() ([]TagAssignmentRequest, bool)

GetTagsOk returns a tuple with the Tags field value if set, nil otherwise and a boolean to check if the value has been set.

func (*IpBlockCreate) HasDescription

func (o *IpBlockCreate) HasDescription() bool

HasDescription returns a boolean if a field has been set.

func (*IpBlockCreate) HasTags

func (o *IpBlockCreate) HasTags() bool

HasTags returns a boolean if a field has been set.

func (IpBlockCreate) MarshalJSON

func (o IpBlockCreate) MarshalJSON() ([]byte, error)

func (*IpBlockCreate) SetCidrBlockSize

func (o *IpBlockCreate) SetCidrBlockSize(v string)

SetCidrBlockSize sets field value

func (*IpBlockCreate) SetDescription

func (o *IpBlockCreate) SetDescription(v string)

SetDescription gets a reference to the given string and assigns it to the Description field.

func (*IpBlockCreate) SetLocation

func (o *IpBlockCreate) SetLocation(v string)

SetLocation sets field value

func (*IpBlockCreate) SetTags

func (o *IpBlockCreate) SetTags(v []TagAssignmentRequest)

SetTags gets a reference to the given []TagAssignmentRequest and assigns it to the Tags field.

func (IpBlockCreate) ToMap

func (o IpBlockCreate) ToMap() (map[string]interface{}, error)

func (*IpBlockCreate) UnmarshalJSON

func (o *IpBlockCreate) UnmarshalJSON(data []byte) (err error)

type IpBlockPatch

type IpBlockPatch struct {
	// The description of the Ip Block.
	Description          *string `json:"description,omitempty"`
	AdditionalProperties map[string]interface{}
}

IpBlockPatch IP Block patch.

func NewIpBlockPatch

func NewIpBlockPatch() *IpBlockPatch

NewIpBlockPatch instantiates a new IpBlockPatch object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewIpBlockPatchWithDefaults

func NewIpBlockPatchWithDefaults() *IpBlockPatch

NewIpBlockPatchWithDefaults instantiates a new IpBlockPatch object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*IpBlockPatch) GetDescription

func (o *IpBlockPatch) GetDescription() string

GetDescription returns the Description field value if set, zero value otherwise.

func (*IpBlockPatch) GetDescriptionOk

func (o *IpBlockPatch) GetDescriptionOk() (*string, bool)

GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise and a boolean to check if the value has been set.

func (*IpBlockPatch) HasDescription

func (o *IpBlockPatch) HasDescription() bool

HasDescription returns a boolean if a field has been set.

func (IpBlockPatch) MarshalJSON

func (o IpBlockPatch) MarshalJSON() ([]byte, error)

func (*IpBlockPatch) SetDescription

func (o *IpBlockPatch) SetDescription(v string)

SetDescription gets a reference to the given string and assigns it to the Description field.

func (IpBlockPatch) ToMap

func (o IpBlockPatch) ToMap() (map[string]interface{}, error)

func (*IpBlockPatch) UnmarshalJSON added in v3.0.1

func (o *IpBlockPatch) UnmarshalJSON(data []byte) (err error)

type MappedNullable

type MappedNullable interface {
	ToMap() (map[string]interface{}, error)
}

type NullableBool

type NullableBool struct {
	// contains filtered or unexported fields
}

func NewNullableBool

func NewNullableBool(val *bool) *NullableBool

func (NullableBool) Get

func (v NullableBool) Get() *bool

func (NullableBool) IsSet

func (v NullableBool) IsSet() bool

func (NullableBool) MarshalJSON

func (v NullableBool) MarshalJSON() ([]byte, error)

func (*NullableBool) Set

func (v *NullableBool) Set(val *bool)

func (*NullableBool) UnmarshalJSON

func (v *NullableBool) UnmarshalJSON(src []byte) error

func (*NullableBool) Unset

func (v *NullableBool) Unset()

type NullableDeleteIpBlockResult

type NullableDeleteIpBlockResult struct {
	// contains filtered or unexported fields
}

func NewNullableDeleteIpBlockResult

func NewNullableDeleteIpBlockResult(val *DeleteIpBlockResult) *NullableDeleteIpBlockResult

func (NullableDeleteIpBlockResult) Get

func (NullableDeleteIpBlockResult) IsSet

func (NullableDeleteIpBlockResult) MarshalJSON

func (v NullableDeleteIpBlockResult) MarshalJSON() ([]byte, error)

func (*NullableDeleteIpBlockResult) Set

func (*NullableDeleteIpBlockResult) UnmarshalJSON

func (v *NullableDeleteIpBlockResult) UnmarshalJSON(src []byte) error

func (*NullableDeleteIpBlockResult) Unset

func (v *NullableDeleteIpBlockResult) Unset()

type NullableError

type NullableError struct {
	// contains filtered or unexported fields
}

func NewNullableError

func NewNullableError(val *Error) *NullableError

func (NullableError) Get

func (v NullableError) Get() *Error

func (NullableError) IsSet

func (v NullableError) IsSet() bool

func (NullableError) MarshalJSON

func (v NullableError) MarshalJSON() ([]byte, error)

func (*NullableError) Set

func (v *NullableError) Set(val *Error)

func (*NullableError) UnmarshalJSON

func (v *NullableError) UnmarshalJSON(src []byte) error

func (*NullableError) Unset

func (v *NullableError) Unset()

type NullableFloat32

type NullableFloat32 struct {
	// contains filtered or unexported fields
}

func NewNullableFloat32

func NewNullableFloat32(val *float32) *NullableFloat32

func (NullableFloat32) Get

func (v NullableFloat32) Get() *float32

func (NullableFloat32) IsSet

func (v NullableFloat32) IsSet() bool

func (NullableFloat32) MarshalJSON

func (v NullableFloat32) MarshalJSON() ([]byte, error)

func (*NullableFloat32) Set

func (v *NullableFloat32) Set(val *float32)

func (*NullableFloat32) UnmarshalJSON

func (v *NullableFloat32) UnmarshalJSON(src []byte) error

func (*NullableFloat32) Unset

func (v *NullableFloat32) Unset()

type NullableFloat64

type NullableFloat64 struct {
	// contains filtered or unexported fields
}

func NewNullableFloat64

func NewNullableFloat64(val *float64) *NullableFloat64

func (NullableFloat64) Get

func (v NullableFloat64) Get() *float64

func (NullableFloat64) IsSet

func (v NullableFloat64) IsSet() bool

func (NullableFloat64) MarshalJSON

func (v NullableFloat64) MarshalJSON() ([]byte, error)

func (*NullableFloat64) Set

func (v *NullableFloat64) Set(val *float64)

func (*NullableFloat64) UnmarshalJSON

func (v *NullableFloat64) UnmarshalJSON(src []byte) error

func (*NullableFloat64) Unset

func (v *NullableFloat64) Unset()

type NullableInt

type NullableInt struct {
	// contains filtered or unexported fields
}

func NewNullableInt

func NewNullableInt(val *int) *NullableInt

func (NullableInt) Get

func (v NullableInt) Get() *int

func (NullableInt) IsSet

func (v NullableInt) IsSet() bool

func (NullableInt) MarshalJSON

func (v NullableInt) MarshalJSON() ([]byte, error)

func (*NullableInt) Set

func (v *NullableInt) Set(val *int)

func (*NullableInt) UnmarshalJSON

func (v *NullableInt) UnmarshalJSON(src []byte) error

func (*NullableInt) Unset

func (v *NullableInt) Unset()

type NullableInt32

type NullableInt32 struct {
	// contains filtered or unexported fields
}

func NewNullableInt32

func NewNullableInt32(val *int32) *NullableInt32

func (NullableInt32) Get

func (v NullableInt32) Get() *int32

func (NullableInt32) IsSet

func (v NullableInt32) IsSet() bool

func (NullableInt32) MarshalJSON

func (v NullableInt32) MarshalJSON() ([]byte, error)

func (*NullableInt32) Set

func (v *NullableInt32) Set(val *int32)

func (*NullableInt32) UnmarshalJSON

func (v *NullableInt32) UnmarshalJSON(src []byte) error

func (*NullableInt32) Unset

func (v *NullableInt32) Unset()

type NullableInt64

type NullableInt64 struct {
	// contains filtered or unexported fields
}

func NewNullableInt64

func NewNullableInt64(val *int64) *NullableInt64

func (NullableInt64) Get

func (v NullableInt64) Get() *int64

func (NullableInt64) IsSet

func (v NullableInt64) IsSet() bool

func (NullableInt64) MarshalJSON

func (v NullableInt64) MarshalJSON() ([]byte, error)

func (*NullableInt64) Set

func (v *NullableInt64) Set(val *int64)

func (*NullableInt64) UnmarshalJSON

func (v *NullableInt64) UnmarshalJSON(src []byte) error

func (*NullableInt64) Unset

func (v *NullableInt64) Unset()

type NullableIpBlock

type NullableIpBlock struct {
	// contains filtered or unexported fields
}

func NewNullableIpBlock

func NewNullableIpBlock(val *IpBlock) *NullableIpBlock

func (NullableIpBlock) Get

func (v NullableIpBlock) Get() *IpBlock

func (NullableIpBlock) IsSet

func (v NullableIpBlock) IsSet() bool

func (NullableIpBlock) MarshalJSON

func (v NullableIpBlock) MarshalJSON() ([]byte, error)

func (*NullableIpBlock) Set

func (v *NullableIpBlock) Set(val *IpBlock)

func (*NullableIpBlock) UnmarshalJSON

func (v *NullableIpBlock) UnmarshalJSON(src []byte) error

func (*NullableIpBlock) Unset

func (v *NullableIpBlock) Unset()

type NullableIpBlockCreate

type NullableIpBlockCreate struct {
	// contains filtered or unexported fields
}

func NewNullableIpBlockCreate

func NewNullableIpBlockCreate(val *IpBlockCreate) *NullableIpBlockCreate

func (NullableIpBlockCreate) Get

func (NullableIpBlockCreate) IsSet

func (v NullableIpBlockCreate) IsSet() bool

func (NullableIpBlockCreate) MarshalJSON

func (v NullableIpBlockCreate) MarshalJSON() ([]byte, error)

func (*NullableIpBlockCreate) Set

func (v *NullableIpBlockCreate) Set(val *IpBlockCreate)

func (*NullableIpBlockCreate) UnmarshalJSON

func (v *NullableIpBlockCreate) UnmarshalJSON(src []byte) error

func (*NullableIpBlockCreate) Unset

func (v *NullableIpBlockCreate) Unset()

type NullableIpBlockPatch

type NullableIpBlockPatch struct {
	// contains filtered or unexported fields
}

func NewNullableIpBlockPatch

func NewNullableIpBlockPatch(val *IpBlockPatch) *NullableIpBlockPatch

func (NullableIpBlockPatch) Get

func (NullableIpBlockPatch) IsSet

func (v NullableIpBlockPatch) IsSet() bool

func (NullableIpBlockPatch) MarshalJSON

func (v NullableIpBlockPatch) MarshalJSON() ([]byte, error)

func (*NullableIpBlockPatch) Set

func (v *NullableIpBlockPatch) Set(val *IpBlockPatch)

func (*NullableIpBlockPatch) UnmarshalJSON

func (v *NullableIpBlockPatch) UnmarshalJSON(src []byte) error

func (*NullableIpBlockPatch) Unset

func (v *NullableIpBlockPatch) Unset()

type NullableString

type NullableString struct {
	// contains filtered or unexported fields
}

func NewNullableString

func NewNullableString(val *string) *NullableString

func (NullableString) Get

func (v NullableString) Get() *string

func (NullableString) IsSet

func (v NullableString) IsSet() bool

func (NullableString) MarshalJSON

func (v NullableString) MarshalJSON() ([]byte, error)

func (*NullableString) Set

func (v *NullableString) Set(val *string)

func (*NullableString) UnmarshalJSON

func (v *NullableString) UnmarshalJSON(src []byte) error

func (*NullableString) Unset

func (v *NullableString) Unset()

type NullableTagAssignment

type NullableTagAssignment struct {
	// contains filtered or unexported fields
}

func NewNullableTagAssignment

func NewNullableTagAssignment(val *TagAssignment) *NullableTagAssignment

func (NullableTagAssignment) Get

func (NullableTagAssignment) IsSet

func (v NullableTagAssignment) IsSet() bool

func (NullableTagAssignment) MarshalJSON

func (v NullableTagAssignment) MarshalJSON() ([]byte, error)

func (*NullableTagAssignment) Set

func (v *NullableTagAssignment) Set(val *TagAssignment)

func (*NullableTagAssignment) UnmarshalJSON

func (v *NullableTagAssignment) UnmarshalJSON(src []byte) error

func (*NullableTagAssignment) Unset

func (v *NullableTagAssignment) Unset()

type NullableTagAssignmentRequest

type NullableTagAssignmentRequest struct {
	// contains filtered or unexported fields
}

func NewNullableTagAssignmentRequest

func NewNullableTagAssignmentRequest(val *TagAssignmentRequest) *NullableTagAssignmentRequest

func (NullableTagAssignmentRequest) Get

func (NullableTagAssignmentRequest) IsSet

func (NullableTagAssignmentRequest) MarshalJSON

func (v NullableTagAssignmentRequest) MarshalJSON() ([]byte, error)

func (*NullableTagAssignmentRequest) Set

func (*NullableTagAssignmentRequest) UnmarshalJSON

func (v *NullableTagAssignmentRequest) UnmarshalJSON(src []byte) error

func (*NullableTagAssignmentRequest) Unset

func (v *NullableTagAssignmentRequest) Unset()

type NullableTime

type NullableTime struct {
	// contains filtered or unexported fields
}

func NewNullableTime

func NewNullableTime(val *time.Time) *NullableTime

func (NullableTime) Get

func (v NullableTime) Get() *time.Time

func (NullableTime) IsSet

func (v NullableTime) IsSet() bool

func (NullableTime) MarshalJSON

func (v NullableTime) MarshalJSON() ([]byte, error)

func (*NullableTime) Set

func (v *NullableTime) Set(val *time.Time)

func (*NullableTime) UnmarshalJSON

func (v *NullableTime) UnmarshalJSON(src []byte) error

func (*NullableTime) Unset

func (v *NullableTime) Unset()

type ServerConfiguration

type ServerConfiguration struct {
	URL         string
	Description string
	Variables   map[string]ServerVariable
}

ServerConfiguration stores the information about a server

type ServerConfigurations

type ServerConfigurations []ServerConfiguration

ServerConfigurations stores multiple ServerConfiguration items

func (ServerConfigurations) URL

func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error)

URL formats template on a index using given variables

type ServerVariable

type ServerVariable struct {
	Description  string
	DefaultValue string
	EnumValues   []string
}

ServerVariable stores the information about a server variable

type TagAssignment

type TagAssignment struct {
	// The unique id of the tag.
	Id string `json:"id"`
	// The name of the tag.
	Name string `json:"name"`
	// The value of the tag assigned to the resource.
	Value *string `json:"value,omitempty"`
	// Whether or not to show the tag as part of billing and invoices
	IsBillingTag bool `json:"isBillingTag"`
	// Who the tag was created by.
	CreatedBy            *string `json:"createdBy,omitempty"`
	AdditionalProperties map[string]interface{}
}

TagAssignment Tag assigned to resource.

func NewTagAssignment

func NewTagAssignment(id string, name string, isBillingTag bool) *TagAssignment

NewTagAssignment instantiates a new TagAssignment object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewTagAssignmentWithDefaults

func NewTagAssignmentWithDefaults() *TagAssignment

NewTagAssignmentWithDefaults instantiates a new TagAssignment object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*TagAssignment) GetCreatedBy

func (o *TagAssignment) GetCreatedBy() string

GetCreatedBy returns the CreatedBy field value if set, zero value otherwise.

func (*TagAssignment) GetCreatedByOk

func (o *TagAssignment) GetCreatedByOk() (*string, bool)

GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise and a boolean to check if the value has been set.

func (*TagAssignment) GetId

func (o *TagAssignment) GetId() string

GetId returns the Id field value

func (*TagAssignment) GetIdOk

func (o *TagAssignment) GetIdOk() (*string, bool)

GetIdOk returns a tuple with the Id field value and a boolean to check if the value has been set.

func (*TagAssignment) GetIsBillingTag

func (o *TagAssignment) GetIsBillingTag() bool

GetIsBillingTag returns the IsBillingTag field value

func (*TagAssignment) GetIsBillingTagOk

func (o *TagAssignment) GetIsBillingTagOk() (*bool, bool)

GetIsBillingTagOk returns a tuple with the IsBillingTag field value and a boolean to check if the value has been set.

func (*TagAssignment) GetName

func (o *TagAssignment) GetName() string

GetName returns the Name field value

func (*TagAssignment) GetNameOk

func (o *TagAssignment) GetNameOk() (*string, bool)

GetNameOk returns a tuple with the Name field value and a boolean to check if the value has been set.

func (*TagAssignment) GetValue

func (o *TagAssignment) GetValue() string

GetValue returns the Value field value if set, zero value otherwise.

func (*TagAssignment) GetValueOk

func (o *TagAssignment) GetValueOk() (*string, bool)

GetValueOk returns a tuple with the Value field value if set, nil otherwise and a boolean to check if the value has been set.

func (*TagAssignment) HasCreatedBy

func (o *TagAssignment) HasCreatedBy() bool

HasCreatedBy returns a boolean if a field has been set.

func (*TagAssignment) HasValue

func (o *TagAssignment) HasValue() bool

HasValue returns a boolean if a field has been set.

func (TagAssignment) MarshalJSON

func (o TagAssignment) MarshalJSON() ([]byte, error)

func (*TagAssignment) SetCreatedBy

func (o *TagAssignment) SetCreatedBy(v string)

SetCreatedBy gets a reference to the given string and assigns it to the CreatedBy field.

func (*TagAssignment) SetId

func (o *TagAssignment) SetId(v string)

SetId sets field value

func (*TagAssignment) SetIsBillingTag

func (o *TagAssignment) SetIsBillingTag(v bool)

SetIsBillingTag sets field value

func (*TagAssignment) SetName

func (o *TagAssignment) SetName(v string)

SetName sets field value

func (*TagAssignment) SetValue

func (o *TagAssignment) SetValue(v string)

SetValue gets a reference to the given string and assigns it to the Value field.

func (TagAssignment) ToMap

func (o TagAssignment) ToMap() (map[string]interface{}, error)

func (*TagAssignment) UnmarshalJSON

func (o *TagAssignment) UnmarshalJSON(data []byte) (err error)

type TagAssignmentRequest

type TagAssignmentRequest struct {
	// The name of the tag. Tag names are case-sensitive, and should be composed of a maximum of 100 characters including UTF-8 Unicode letters, numbers, and the following symbols: '-', '_'. Regex: [A-zÀ-ú0-9_-]{1,100}.
	Name string `json:"name"`
	// The value of the tag assigned to the resource. Tag values are case-sensitive, and should be composed of a maximum of 100 characters including UTF-8 Unicode letters, numbers, and the following symbols: '-', '_'. Regex: [A-zÀ-ú0-9_-]{1,100}.
	Value                *string `json:"value,omitempty"`
	AdditionalProperties map[string]interface{}
}

TagAssignmentRequest Tag request to assign to resource.

func NewTagAssignmentRequest

func NewTagAssignmentRequest(name string) *TagAssignmentRequest

NewTagAssignmentRequest instantiates a new TagAssignmentRequest object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewTagAssignmentRequestWithDefaults

func NewTagAssignmentRequestWithDefaults() *TagAssignmentRequest

NewTagAssignmentRequestWithDefaults instantiates a new TagAssignmentRequest object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*TagAssignmentRequest) GetName

func (o *TagAssignmentRequest) GetName() string

GetName returns the Name field value

func (*TagAssignmentRequest) GetNameOk

func (o *TagAssignmentRequest) GetNameOk() (*string, bool)

GetNameOk returns a tuple with the Name field value and a boolean to check if the value has been set.

func (*TagAssignmentRequest) GetValue

func (o *TagAssignmentRequest) GetValue() string

GetValue returns the Value field value if set, zero value otherwise.

func (*TagAssignmentRequest) GetValueOk

func (o *TagAssignmentRequest) GetValueOk() (*string, bool)

GetValueOk returns a tuple with the Value field value if set, nil otherwise and a boolean to check if the value has been set.

func (*TagAssignmentRequest) HasValue

func (o *TagAssignmentRequest) HasValue() bool

HasValue returns a boolean if a field has been set.

func (TagAssignmentRequest) MarshalJSON

func (o TagAssignmentRequest) MarshalJSON() ([]byte, error)

func (*TagAssignmentRequest) SetName

func (o *TagAssignmentRequest) SetName(v string)

SetName sets field value

func (*TagAssignmentRequest) SetValue

func (o *TagAssignmentRequest) SetValue(v string)

SetValue gets a reference to the given string and assigns it to the Value field.

func (TagAssignmentRequest) ToMap

func (o TagAssignmentRequest) ToMap() (map[string]interface{}, error)

func (*TagAssignmentRequest) UnmarshalJSON

func (o *TagAssignmentRequest) UnmarshalJSON(data []byte) (err error)

Jump to

Keyboard shortcuts

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