2017-08-05 18:30:20 +00:00
|
|
|
package relay
|
|
|
|
|
|
|
|
// Copyright (c) Microsoft and contributors. All rights reserved.
|
|
|
|
//
|
|
|
|
// 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.
|
|
|
|
//
|
2017-10-01 08:13:39 +00:00
|
|
|
// Code generated by Microsoft (R) AutoRest Code Generator.
|
|
|
|
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
2017-08-05 18:30:20 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/Azure/go-autorest/autorest"
|
|
|
|
"github.com/Azure/go-autorest/autorest/date"
|
|
|
|
"github.com/Azure/go-autorest/autorest/to"
|
|
|
|
"net/http"
|
|
|
|
)
|
|
|
|
|
|
|
|
// AccessRights enumerates the values for access rights.
|
|
|
|
type AccessRights string
|
|
|
|
|
|
|
|
const (
|
|
|
|
// Listen specifies the listen state for access rights.
|
|
|
|
Listen AccessRights = "Listen"
|
|
|
|
// Manage specifies the manage state for access rights.
|
|
|
|
Manage AccessRights = "Manage"
|
|
|
|
// Send specifies the send state for access rights.
|
|
|
|
Send AccessRights = "Send"
|
|
|
|
)
|
|
|
|
|
2017-10-01 08:13:39 +00:00
|
|
|
// KeyType enumerates the values for key type.
|
|
|
|
type KeyType string
|
2017-08-05 18:30:20 +00:00
|
|
|
|
|
|
|
const (
|
2017-10-01 08:13:39 +00:00
|
|
|
// PrimaryKey specifies the primary key state for key type.
|
|
|
|
PrimaryKey KeyType = "PrimaryKey"
|
|
|
|
// SecondaryKey specifies the secondary key state for key type.
|
|
|
|
SecondaryKey KeyType = "SecondaryKey"
|
|
|
|
)
|
|
|
|
|
|
|
|
// ProvisioningStateEnum enumerates the values for provisioning state enum.
|
|
|
|
type ProvisioningStateEnum string
|
|
|
|
|
|
|
|
const (
|
|
|
|
// Created specifies the created state for provisioning state enum.
|
|
|
|
Created ProvisioningStateEnum = "Created"
|
|
|
|
// Deleted specifies the deleted state for provisioning state enum.
|
|
|
|
Deleted ProvisioningStateEnum = "Deleted"
|
|
|
|
// Failed specifies the failed state for provisioning state enum.
|
|
|
|
Failed ProvisioningStateEnum = "Failed"
|
|
|
|
// Succeeded specifies the succeeded state for provisioning state enum.
|
|
|
|
Succeeded ProvisioningStateEnum = "Succeeded"
|
|
|
|
// Unknown specifies the unknown state for provisioning state enum.
|
|
|
|
Unknown ProvisioningStateEnum = "Unknown"
|
|
|
|
// Updating specifies the updating state for provisioning state enum.
|
|
|
|
Updating ProvisioningStateEnum = "Updating"
|
2017-08-05 18:30:20 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// RelaytypeEnum enumerates the values for relaytype enum.
|
|
|
|
type RelaytypeEnum string
|
|
|
|
|
|
|
|
const (
|
|
|
|
// HTTP specifies the http state for relaytype enum.
|
|
|
|
HTTP RelaytypeEnum = "Http"
|
|
|
|
// NetTCP specifies the net tcp state for relaytype enum.
|
|
|
|
NetTCP RelaytypeEnum = "NetTcp"
|
|
|
|
)
|
|
|
|
|
2017-10-01 08:13:39 +00:00
|
|
|
// SkuTier enumerates the values for sku tier.
|
|
|
|
type SkuTier string
|
|
|
|
|
|
|
|
const (
|
|
|
|
// Standard specifies the standard state for sku tier.
|
|
|
|
Standard SkuTier = "Standard"
|
|
|
|
)
|
|
|
|
|
2017-08-05 18:30:20 +00:00
|
|
|
// UnavailableReason enumerates the values for unavailable reason.
|
|
|
|
type UnavailableReason string
|
|
|
|
|
|
|
|
const (
|
|
|
|
// InvalidName specifies the invalid name state for unavailable reason.
|
|
|
|
InvalidName UnavailableReason = "InvalidName"
|
2017-10-01 08:13:39 +00:00
|
|
|
// NameInLockdown specifies the name in lockdown state for unavailable reason.
|
2017-08-05 18:30:20 +00:00
|
|
|
NameInLockdown UnavailableReason = "NameInLockdown"
|
|
|
|
// NameInUse specifies the name in use state for unavailable reason.
|
|
|
|
NameInUse UnavailableReason = "NameInUse"
|
|
|
|
// None specifies the none state for unavailable reason.
|
|
|
|
None UnavailableReason = "None"
|
2017-10-01 08:13:39 +00:00
|
|
|
// SubscriptionIsDisabled specifies the subscription is disabled state for unavailable reason.
|
2017-08-05 18:30:20 +00:00
|
|
|
SubscriptionIsDisabled UnavailableReason = "SubscriptionIsDisabled"
|
2017-10-01 08:13:39 +00:00
|
|
|
// TooManyNamespaceInCurrentSubscription specifies the too many namespace in current subscription state for unavailable
|
|
|
|
// reason.
|
2017-08-05 18:30:20 +00:00
|
|
|
TooManyNamespaceInCurrentSubscription UnavailableReason = "TooManyNamespaceInCurrentSubscription"
|
|
|
|
)
|
|
|
|
|
2017-10-01 08:13:39 +00:00
|
|
|
// AccessKeys is namespace/Relay Connection String
|
|
|
|
type AccessKeys struct {
|
|
|
|
autorest.Response `json:"-"`
|
|
|
|
PrimaryConnectionString *string `json:"primaryConnectionString,omitempty"`
|
|
|
|
SecondaryConnectionString *string `json:"secondaryConnectionString,omitempty"`
|
|
|
|
PrimaryKey *string `json:"primaryKey,omitempty"`
|
|
|
|
SecondaryKey *string `json:"secondaryKey,omitempty"`
|
|
|
|
KeyName *string `json:"keyName,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// AuthorizationRule is description of a namespace authorization rule.
|
2017-08-05 18:30:20 +00:00
|
|
|
type AuthorizationRule struct {
|
|
|
|
autorest.Response `json:"-"`
|
|
|
|
ID *string `json:"id,omitempty"`
|
|
|
|
Name *string `json:"name,omitempty"`
|
|
|
|
Type *string `json:"type,omitempty"`
|
|
|
|
*AuthorizationRuleProperties `json:"properties,omitempty"`
|
|
|
|
}
|
|
|
|
|
2017-10-01 08:13:39 +00:00
|
|
|
// AuthorizationRuleProperties is authorization rule properties.
|
|
|
|
type AuthorizationRuleProperties struct {
|
|
|
|
Rights *[]AccessRights `json:"rights,omitempty"`
|
2017-08-05 18:30:20 +00:00
|
|
|
}
|
|
|
|
|
2017-10-01 08:13:39 +00:00
|
|
|
// AuthorizationRuleListResult is the response from the list namespace operation.
|
2017-08-05 18:30:20 +00:00
|
|
|
type AuthorizationRuleListResult struct {
|
|
|
|
autorest.Response `json:"-"`
|
|
|
|
Value *[]AuthorizationRule `json:"value,omitempty"`
|
|
|
|
NextLink *string `json:"nextLink,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// AuthorizationRuleListResultPreparer prepares a request to retrieve the next set of results. It returns
|
|
|
|
// nil if no more results exist.
|
|
|
|
func (client AuthorizationRuleListResult) AuthorizationRuleListResultPreparer() (*http.Request, error) {
|
|
|
|
if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 {
|
|
|
|
return nil, nil
|
|
|
|
}
|
|
|
|
return autorest.Prepare(&http.Request{},
|
|
|
|
autorest.AsJSON(),
|
|
|
|
autorest.AsGet(),
|
|
|
|
autorest.WithBaseURL(to.String(client.NextLink)))
|
|
|
|
}
|
|
|
|
|
2017-10-01 08:13:39 +00:00
|
|
|
// CheckNameAvailability is description of the check name availability request properties.
|
2017-08-05 18:30:20 +00:00
|
|
|
type CheckNameAvailability struct {
|
|
|
|
Name *string `json:"name,omitempty"`
|
|
|
|
}
|
|
|
|
|
2017-10-01 08:13:39 +00:00
|
|
|
// CheckNameAvailabilityResult is description of the check name availability request properties.
|
2017-08-05 18:30:20 +00:00
|
|
|
type CheckNameAvailabilityResult struct {
|
|
|
|
autorest.Response `json:"-"`
|
2017-10-01 08:13:39 +00:00
|
|
|
Message *string `json:"message,omitempty"`
|
2017-08-05 18:30:20 +00:00
|
|
|
NameAvailable *bool `json:"nameAvailable,omitempty"`
|
|
|
|
Reason UnavailableReason `json:"reason,omitempty"`
|
|
|
|
}
|
|
|
|
|
2017-10-01 08:13:39 +00:00
|
|
|
// ErrorResponse is error reponse indicates Relay service is not able to process the incoming request. The reason is
|
|
|
|
// provided in the error message.
|
2017-08-05 18:30:20 +00:00
|
|
|
type ErrorResponse struct {
|
|
|
|
Code *string `json:"code,omitempty"`
|
|
|
|
Message *string `json:"message,omitempty"`
|
|
|
|
}
|
|
|
|
|
2017-10-01 08:13:39 +00:00
|
|
|
// HybridConnection is description of hybrid connection resource.
|
2017-08-05 18:30:20 +00:00
|
|
|
type HybridConnection struct {
|
|
|
|
autorest.Response `json:"-"`
|
|
|
|
ID *string `json:"id,omitempty"`
|
|
|
|
Name *string `json:"name,omitempty"`
|
|
|
|
Type *string `json:"type,omitempty"`
|
|
|
|
*HybridConnectionProperties `json:"properties,omitempty"`
|
|
|
|
}
|
|
|
|
|
2017-10-01 08:13:39 +00:00
|
|
|
// HybridConnectionProperties is properties of the HybridConnection.
|
|
|
|
type HybridConnectionProperties struct {
|
|
|
|
CreatedAt *date.Time `json:"createdAt,omitempty"`
|
|
|
|
UpdatedAt *date.Time `json:"updatedAt,omitempty"`
|
|
|
|
ListenerCount *int32 `json:"listenerCount,omitempty"`
|
|
|
|
RequiresClientAuthorization *bool `json:"requiresClientAuthorization,omitempty"`
|
|
|
|
UserMetadata *string `json:"userMetadata,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// HybridConnectionListResult is the response of the list hybrid connection operation.
|
2017-08-05 18:30:20 +00:00
|
|
|
type HybridConnectionListResult struct {
|
|
|
|
autorest.Response `json:"-"`
|
|
|
|
Value *[]HybridConnection `json:"value,omitempty"`
|
|
|
|
NextLink *string `json:"nextLink,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// HybridConnectionListResultPreparer prepares a request to retrieve the next set of results. It returns
|
|
|
|
// nil if no more results exist.
|
|
|
|
func (client HybridConnectionListResult) HybridConnectionListResultPreparer() (*http.Request, error) {
|
|
|
|
if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 {
|
|
|
|
return nil, nil
|
|
|
|
}
|
|
|
|
return autorest.Prepare(&http.Request{},
|
|
|
|
autorest.AsJSON(),
|
|
|
|
autorest.AsGet(),
|
|
|
|
autorest.WithBaseURL(to.String(client.NextLink)))
|
|
|
|
}
|
|
|
|
|
2017-10-01 08:13:39 +00:00
|
|
|
// Namespace is description of a namespace resource.
|
2017-08-05 18:30:20 +00:00
|
|
|
type Namespace struct {
|
|
|
|
autorest.Response `json:"-"`
|
|
|
|
ID *string `json:"id,omitempty"`
|
|
|
|
Name *string `json:"name,omitempty"`
|
|
|
|
Type *string `json:"type,omitempty"`
|
|
|
|
Location *string `json:"location,omitempty"`
|
|
|
|
Tags *map[string]*string `json:"tags,omitempty"`
|
|
|
|
Sku *Sku `json:"sku,omitempty"`
|
|
|
|
*NamespaceProperties `json:"properties,omitempty"`
|
|
|
|
}
|
|
|
|
|
2017-10-01 08:13:39 +00:00
|
|
|
// NamespaceListResult is the response from the list namespace operation.
|
2017-08-05 18:30:20 +00:00
|
|
|
type NamespaceListResult struct {
|
|
|
|
autorest.Response `json:"-"`
|
|
|
|
Value *[]Namespace `json:"value,omitempty"`
|
|
|
|
NextLink *string `json:"nextLink,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// NamespaceListResultPreparer prepares a request to retrieve the next set of results. It returns
|
|
|
|
// nil if no more results exist.
|
|
|
|
func (client NamespaceListResult) NamespaceListResultPreparer() (*http.Request, error) {
|
|
|
|
if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 {
|
|
|
|
return nil, nil
|
|
|
|
}
|
|
|
|
return autorest.Prepare(&http.Request{},
|
|
|
|
autorest.AsJSON(),
|
|
|
|
autorest.AsGet(),
|
|
|
|
autorest.WithBaseURL(to.String(client.NextLink)))
|
|
|
|
}
|
|
|
|
|
2017-10-01 08:13:39 +00:00
|
|
|
// NamespaceProperties is properties of the namespace.
|
2017-08-05 18:30:20 +00:00
|
|
|
type NamespaceProperties struct {
|
2017-10-01 08:13:39 +00:00
|
|
|
ProvisioningState ProvisioningStateEnum `json:"provisioningState,omitempty"`
|
|
|
|
CreatedAt *date.Time `json:"createdAt,omitempty"`
|
|
|
|
UpdatedAt *date.Time `json:"updatedAt,omitempty"`
|
|
|
|
ServiceBusEndpoint *string `json:"serviceBusEndpoint,omitempty"`
|
|
|
|
MetricID *string `json:"metricId,omitempty"`
|
2017-08-05 18:30:20 +00:00
|
|
|
}
|
|
|
|
|
2017-10-01 08:13:39 +00:00
|
|
|
// Operation is a Relay REST API operation.
|
2017-08-05 18:30:20 +00:00
|
|
|
type Operation struct {
|
|
|
|
Name *string `json:"name,omitempty"`
|
|
|
|
Display *OperationDisplay `json:"display,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// OperationDisplay is the object that represents the operation.
|
|
|
|
type OperationDisplay struct {
|
|
|
|
Provider *string `json:"provider,omitempty"`
|
|
|
|
Resource *string `json:"resource,omitempty"`
|
|
|
|
Operation *string `json:"operation,omitempty"`
|
|
|
|
}
|
|
|
|
|
2017-10-01 08:13:39 +00:00
|
|
|
// OperationListResult is result of the request to list Relay operations. It contains a list of operations and a URL
|
|
|
|
// link to get the next set of results.
|
2017-08-05 18:30:20 +00:00
|
|
|
type OperationListResult struct {
|
|
|
|
autorest.Response `json:"-"`
|
|
|
|
Value *[]Operation `json:"value,omitempty"`
|
|
|
|
NextLink *string `json:"nextLink,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// OperationListResultPreparer prepares a request to retrieve the next set of results. It returns
|
|
|
|
// nil if no more results exist.
|
|
|
|
func (client OperationListResult) OperationListResultPreparer() (*http.Request, error) {
|
|
|
|
if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 {
|
|
|
|
return nil, nil
|
|
|
|
}
|
|
|
|
return autorest.Prepare(&http.Request{},
|
|
|
|
autorest.AsJSON(),
|
|
|
|
autorest.AsGet(),
|
|
|
|
autorest.WithBaseURL(to.String(client.NextLink)))
|
|
|
|
}
|
|
|
|
|
2017-10-01 08:13:39 +00:00
|
|
|
// RegenerateAccessKeyParameters is parameters supplied to the regenerate authorization rule operation, specifies which
|
|
|
|
// key neeeds to be reset.
|
|
|
|
type RegenerateAccessKeyParameters struct {
|
|
|
|
KeyType KeyType `json:"keyType,omitempty"`
|
|
|
|
Key *string `json:"key,omitempty"`
|
2017-08-05 18:30:20 +00:00
|
|
|
}
|
|
|
|
|
2017-10-01 08:13:39 +00:00
|
|
|
// Resource is the resource definition.
|
2017-08-05 18:30:20 +00:00
|
|
|
type Resource struct {
|
|
|
|
ID *string `json:"id,omitempty"`
|
|
|
|
Name *string `json:"name,omitempty"`
|
|
|
|
Type *string `json:"type,omitempty"`
|
|
|
|
}
|
|
|
|
|
2017-10-01 08:13:39 +00:00
|
|
|
// ResourceNamespacePatch is definition of resource.
|
|
|
|
type ResourceNamespacePatch struct {
|
|
|
|
ID *string `json:"id,omitempty"`
|
|
|
|
Name *string `json:"name,omitempty"`
|
|
|
|
Type *string `json:"type,omitempty"`
|
|
|
|
Tags *map[string]*string `json:"tags,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// Sku is SKU of the namespace.
|
2017-08-05 18:30:20 +00:00
|
|
|
type Sku struct {
|
|
|
|
Name *string `json:"name,omitempty"`
|
2017-10-01 08:13:39 +00:00
|
|
|
Tier SkuTier `json:"tier,omitempty"`
|
2017-08-05 18:30:20 +00:00
|
|
|
}
|
|
|
|
|
2017-10-01 08:13:39 +00:00
|
|
|
// TrackedResource is definition of resource.
|
2017-08-05 18:30:20 +00:00
|
|
|
type TrackedResource struct {
|
|
|
|
ID *string `json:"id,omitempty"`
|
|
|
|
Name *string `json:"name,omitempty"`
|
|
|
|
Type *string `json:"type,omitempty"`
|
|
|
|
Location *string `json:"location,omitempty"`
|
|
|
|
Tags *map[string]*string `json:"tags,omitempty"`
|
|
|
|
}
|
|
|
|
|
2017-10-01 08:13:39 +00:00
|
|
|
// UpdateParameters is description of a namespace resource.
|
|
|
|
type UpdateParameters struct {
|
|
|
|
ID *string `json:"id,omitempty"`
|
|
|
|
Name *string `json:"name,omitempty"`
|
|
|
|
Type *string `json:"type,omitempty"`
|
|
|
|
Tags *map[string]*string `json:"tags,omitempty"`
|
|
|
|
Sku *Sku `json:"sku,omitempty"`
|
|
|
|
*NamespaceProperties `json:"properties,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// WcfRelay is description of the WCF relay resource.
|
2017-08-05 18:30:20 +00:00
|
|
|
type WcfRelay struct {
|
|
|
|
autorest.Response `json:"-"`
|
|
|
|
ID *string `json:"id,omitempty"`
|
|
|
|
Name *string `json:"name,omitempty"`
|
|
|
|
Type *string `json:"type,omitempty"`
|
|
|
|
*WcfRelayProperties `json:"properties,omitempty"`
|
|
|
|
}
|
|
|
|
|
2017-10-01 08:13:39 +00:00
|
|
|
// WcfRelayProperties is properties of the WCF relay.
|
2017-08-05 18:30:20 +00:00
|
|
|
type WcfRelayProperties struct {
|
2017-10-01 08:13:39 +00:00
|
|
|
IsDynamic *bool `json:"isDynamic,omitempty"`
|
2017-08-05 18:30:20 +00:00
|
|
|
CreatedAt *date.Time `json:"createdAt,omitempty"`
|
|
|
|
UpdatedAt *date.Time `json:"updatedAt,omitempty"`
|
|
|
|
ListenerCount *int32 `json:"listenerCount,omitempty"`
|
2017-10-01 08:13:39 +00:00
|
|
|
RelayType RelaytypeEnum `json:"relayType,omitempty"`
|
2017-08-05 18:30:20 +00:00
|
|
|
RequiresClientAuthorization *bool `json:"requiresClientAuthorization,omitempty"`
|
|
|
|
RequiresTransportSecurity *bool `json:"requiresTransportSecurity,omitempty"`
|
|
|
|
UserMetadata *string `json:"userMetadata,omitempty"`
|
|
|
|
}
|
|
|
|
|
2017-10-01 08:13:39 +00:00
|
|
|
// WcfRelaysListResult is the response of the list WCF relay operation.
|
2017-08-05 18:30:20 +00:00
|
|
|
type WcfRelaysListResult struct {
|
|
|
|
autorest.Response `json:"-"`
|
|
|
|
Value *[]WcfRelay `json:"value,omitempty"`
|
|
|
|
NextLink *string `json:"nextLink,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// WcfRelaysListResultPreparer prepares a request to retrieve the next set of results. It returns
|
|
|
|
// nil if no more results exist.
|
|
|
|
func (client WcfRelaysListResult) WcfRelaysListResultPreparer() (*http.Request, error) {
|
|
|
|
if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 {
|
|
|
|
return nil, nil
|
|
|
|
}
|
|
|
|
return autorest.Prepare(&http.Request{},
|
|
|
|
autorest.AsJSON(),
|
|
|
|
autorest.AsGet(),
|
|
|
|
autorest.WithBaseURL(to.String(client.NextLink)))
|
|
|
|
}
|