vendor: update all dependencies to latest versions

This commit is contained in:
Nick Craig-Wood
2017-09-30 15:27:27 +01:00
parent 911d121bb9
commit b017fcfe9a
3048 changed files with 537055 additions and 189679 deletions
+384 -19
View File
@@ -14,17 +14,46 @@ package recoveryservices
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"encoding/json"
"errors"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
"net/http"
)
// AuthType enumerates the values for auth type.
type AuthType string
const (
// AAD specifies the aad state for auth type.
AAD AuthType = "AAD"
// AccessControlService specifies the access control service state for auth type.
AccessControlService AuthType = "AccessControlService"
// ACS specifies the acs state for auth type.
ACS AuthType = "ACS"
// AzureActiveDirectory specifies the azure active directory state for auth type.
AzureActiveDirectory AuthType = "AzureActiveDirectory"
// Invalid specifies the invalid state for auth type.
Invalid AuthType = "Invalid"
)
// EnhancedSecurityState enumerates the values for enhanced security state.
type EnhancedSecurityState string
const (
// EnhancedSecurityStateDisabled specifies the enhanced security state disabled state for enhanced security state.
EnhancedSecurityStateDisabled EnhancedSecurityState = "Disabled"
// EnhancedSecurityStateEnabled specifies the enhanced security state enabled state for enhanced security state.
EnhancedSecurityStateEnabled EnhancedSecurityState = "Enabled"
// EnhancedSecurityStateInvalid specifies the enhanced security state invalid state for enhanced security state.
EnhancedSecurityStateInvalid EnhancedSecurityState = "Invalid"
)
// SkuName enumerates the values for sku name.
type SkuName string
@@ -35,6 +64,42 @@ const (
Standard SkuName = "Standard"
)
// StorageModelType enumerates the values for storage model type.
type StorageModelType string
const (
// StorageModelTypeGeoRedundant specifies the storage model type geo redundant state for storage model type.
StorageModelTypeGeoRedundant StorageModelType = "GeoRedundant"
// StorageModelTypeInvalid specifies the storage model type invalid state for storage model type.
StorageModelTypeInvalid StorageModelType = "Invalid"
// StorageModelTypeLocallyRedundant specifies the storage model type locally redundant state for storage model type.
StorageModelTypeLocallyRedundant StorageModelType = "LocallyRedundant"
)
// StorageType enumerates the values for storage type.
type StorageType string
const (
// StorageTypeGeoRedundant specifies the storage type geo redundant state for storage type.
StorageTypeGeoRedundant StorageType = "GeoRedundant"
// StorageTypeInvalid specifies the storage type invalid state for storage type.
StorageTypeInvalid StorageType = "Invalid"
// StorageTypeLocallyRedundant specifies the storage type locally redundant state for storage type.
StorageTypeLocallyRedundant StorageType = "LocallyRedundant"
)
// StorageTypeState enumerates the values for storage type state.
type StorageTypeState string
const (
// StorageTypeStateInvalid specifies the storage type state invalid state for storage type state.
StorageTypeStateInvalid StorageTypeState = "Invalid"
// StorageTypeStateLocked specifies the storage type state locked state for storage type state.
StorageTypeStateLocked StorageTypeState = "Locked"
// StorageTypeStateUnlocked specifies the storage type state unlocked state for storage type state.
StorageTypeStateUnlocked StorageTypeState = "Unlocked"
)
// TriggerType enumerates the values for trigger type.
type TriggerType string
@@ -45,6 +110,24 @@ const (
UserTriggered TriggerType = "UserTriggered"
)
// UsagesUnit enumerates the values for usages unit.
type UsagesUnit string
const (
// Bytes specifies the bytes state for usages unit.
Bytes UsagesUnit = "Bytes"
// BytesPerSecond specifies the bytes per second state for usages unit.
BytesPerSecond UsagesUnit = "BytesPerSecond"
// Count specifies the count state for usages unit.
Count UsagesUnit = "Count"
// CountPerSecond specifies the count per second state for usages unit.
CountPerSecond UsagesUnit = "CountPerSecond"
// Percent specifies the percent state for usages unit.
Percent UsagesUnit = "Percent"
// Seconds specifies the seconds state for usages unit.
Seconds UsagesUnit = "Seconds"
)
// VaultUpgradeState enumerates the values for vault upgrade state.
type VaultUpgradeState string
@@ -59,6 +142,45 @@ const (
Upgraded VaultUpgradeState = "Upgraded"
)
// BackupStorageConfig is the backup storage config.
type BackupStorageConfig struct {
autorest.Response `json:"-"`
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Type *string `json:"type,omitempty"`
ETag *string `json:"eTag,omitempty"`
*BackupStorageConfigProperties `json:"properties,omitempty"`
}
// BackupStorageConfigProperties is the backup storage config.
type BackupStorageConfigProperties struct {
StorageModelType StorageModelType `json:"storageModelType,omitempty"`
StorageType StorageType `json:"storageType,omitempty"`
StorageTypeState StorageTypeState `json:"storageTypeState,omitempty"`
}
// BackupVaultConfig is backup vault config details.
type BackupVaultConfig struct {
autorest.Response `json:"-"`
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Type *string `json:"type,omitempty"`
ETag *string `json:"eTag,omitempty"`
*BackupVaultConfigProperties `json:"properties,omitempty"`
}
// BackupVaultConfigProperties is backup vault config details.
type BackupVaultConfigProperties struct {
StorageType StorageType `json:"storageType,omitempty"`
StorageTypeState StorageTypeState `json:"storageTypeState,omitempty"`
EnhancedSecurityState EnhancedSecurityState `json:"enhancedSecurityState,omitempty"`
}
// CertificateRequest is details of the certificate to be uploaded to the vault.
type CertificateRequest struct {
Properties *RawCertificateData `json:"properties,omitempty"`
}
// ClientDiscoveryDisplay is localized display information of an operation.
type ClientDiscoveryDisplay struct {
Provider *string `json:"Provider,omitempty"`
@@ -67,24 +189,24 @@ type ClientDiscoveryDisplay struct {
Description *string `json:"Description,omitempty"`
}
// ClientDiscoveryForLogSpecification is log specification for the operation.
// ClientDiscoveryForLogSpecification is class to represent shoebox log specification in json client discovery.
type ClientDiscoveryForLogSpecification struct {
Name *string `json:"name,omitempty"`
DisplayName *string `json:"displayName,omitempty"`
BlobDuration *date.Time `json:"blobDuration,omitempty"`
Name *string `json:"name,omitempty"`
DisplayName *string `json:"displayName,omitempty"`
BlobDuration *string `json:"blobDuration,omitempty"`
}
// ClientDiscoveryForServiceSpecification is operation properties.
// ClientDiscoveryForProperties is class to represent shoebox properties in json client discovery.
type ClientDiscoveryForProperties struct {
ServiceSpecification *ClientDiscoveryForServiceSpecification `json:"serviceSpecification,omitempty"`
}
// ClientDiscoveryForServiceSpecification is class to represent shoebox service specification in json client discovery.
type ClientDiscoveryForServiceSpecification struct {
LogSpecifications *[]ClientDiscoveryForLogSpecification `json:"logSpecifications,omitempty"`
}
// ClientDiscoveryProperties is operation properties.
type ClientDiscoveryProperties struct {
ServiceSpecification *ClientDiscoveryForServiceSpecification `json:"serviceSpecification,omitempty"`
}
// ClientDiscoveryResponse is list of available operations.
// ClientDiscoveryResponse is operations List response which contains list of available APIs.
type ClientDiscoveryResponse struct {
autorest.Response `json:"-"`
Value *[]ClientDiscoveryValueForSingleAPI `json:"Value,omitempty"`
@@ -105,13 +227,58 @@ func (client ClientDiscoveryResponse) ClientDiscoveryResponsePreparer() (*http.R
// ClientDiscoveryValueForSingleAPI is available operation details.
type ClientDiscoveryValueForSingleAPI struct {
Name *string `json:"Name,omitempty"`
Display *ClientDiscoveryDisplay `json:"Display,omitempty"`
Origin *string `json:"Origin,omitempty"`
*ClientDiscoveryProperties `json:"Properties,omitempty"`
Name *string `json:"Name,omitempty"`
Display *ClientDiscoveryDisplay `json:"Display,omitempty"`
Origin *string `json:"Origin,omitempty"`
Properties *ClientDiscoveryForProperties `json:"Properties,omitempty"`
}
// Resource is aRM Resource.
// JobsSummary is summary of the replication job data for this vault.
type JobsSummary struct {
FailedJobs *int32 `json:"failedJobs,omitempty"`
SuspendedJobs *int32 `json:"suspendedJobs,omitempty"`
InProgressJobs *int32 `json:"inProgressJobs,omitempty"`
}
// MonitoringSummary is summary of the replication monitoring data for this vault.
type MonitoringSummary struct {
UnHealthyVMCount *int32 `json:"unHealthyVmCount,omitempty"`
UnHealthyProviderCount *int32 `json:"unHealthyProviderCount,omitempty"`
EventsCount *int32 `json:"eventsCount,omitempty"`
DeprecatedProviderCount *int32 `json:"deprecatedProviderCount,omitempty"`
SupportedProviderCount *int32 `json:"supportedProviderCount,omitempty"`
UnsupportedProviderCount *int32 `json:"unsupportedProviderCount,omitempty"`
}
// NameInfo is the name of usage.
type NameInfo struct {
Value *string `json:"value,omitempty"`
LocalizedValue *string `json:"localizedValue,omitempty"`
}
// RawCertificateData is raw certificate data.
type RawCertificateData struct {
AuthType AuthType `json:"authType,omitempty"`
Certificate *[]byte `json:"certificate,omitempty"`
}
// ReplicationUsage is replication usages of a vault.
type ReplicationUsage struct {
MonitoringSummary *MonitoringSummary `json:"monitoringSummary,omitempty"`
JobsSummary *JobsSummary `json:"jobsSummary,omitempty"`
ProtectedItemCount *int32 `json:"protectedItemCount,omitempty"`
RecoveryPlanCount *int32 `json:"recoveryPlanCount,omitempty"`
RegisteredServersCount *int32 `json:"registeredServersCount,omitempty"`
RecoveryServicesProviderAuthType *int32 `json:"recoveryServicesProviderAuthType,omitempty"`
}
// ReplicationUsageList is replication usages for vault.
type ReplicationUsageList struct {
autorest.Response `json:"-"`
Value *[]ReplicationUsage `json:"value,omitempty"`
}
// Resource is ARM Resource.
type Resource struct {
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
@@ -119,6 +286,127 @@ type Resource struct {
ETag *string `json:"eTag,omitempty"`
}
// ResourceCertificateAndAadDetails is certificate details representing the Vault credentials for AAD.
type ResourceCertificateAndAadDetails struct {
Certificate *[]byte `json:"certificate,omitempty"`
FriendlyName *string `json:"friendlyName,omitempty"`
Issuer *string `json:"issuer,omitempty"`
ResourceID *int64 `json:"resourceId,omitempty"`
Subject *string `json:"subject,omitempty"`
Thumbprint *string `json:"thumbprint,omitempty"`
ValidFrom *date.Time `json:"validFrom,omitempty"`
ValidTo *date.Time `json:"validTo,omitempty"`
AuthType AuthType `json:"authType,omitempty"`
AadAuthority *string `json:"aadAuthority,omitempty"`
AadTenantID *string `json:"aadTenantId,omitempty"`
ServicePrincipalClientID *string `json:"servicePrincipalClientId,omitempty"`
ServicePrincipalObjectID *string `json:"servicePrincipalObjectId,omitempty"`
AzureManagementEndpointAudience *string `json:"azureManagementEndpointAudience,omitempty"`
}
// MarshalJSON is the custom marshaler for ResourceCertificateAndAadDetails.
func (rcaad ResourceCertificateAndAadDetails) MarshalJSON() ([]byte, error) {
rcaad.AuthType = AzureActiveDirectory
type Alias ResourceCertificateAndAadDetails
return json.Marshal(&struct {
Alias
}{
Alias: (Alias)(rcaad),
})
}
// AsResourceCertificateAndAadDetails is the ResourceCertificateDetails implementation for ResourceCertificateAndAadDetails.
func (rcaad ResourceCertificateAndAadDetails) AsResourceCertificateAndAadDetails() (*ResourceCertificateAndAadDetails, bool) {
return &rcaad, true
}
// AsResourceCertificateAndAcsDetails is the ResourceCertificateDetails implementation for ResourceCertificateAndAadDetails.
func (rcaad ResourceCertificateAndAadDetails) AsResourceCertificateAndAcsDetails() (*ResourceCertificateAndAcsDetails, bool) {
return nil, false
}
// ResourceCertificateAndAcsDetails is certificate details representing the Vault credentials for ACS.
type ResourceCertificateAndAcsDetails struct {
Certificate *[]byte `json:"certificate,omitempty"`
FriendlyName *string `json:"friendlyName,omitempty"`
Issuer *string `json:"issuer,omitempty"`
ResourceID *int64 `json:"resourceId,omitempty"`
Subject *string `json:"subject,omitempty"`
Thumbprint *string `json:"thumbprint,omitempty"`
ValidFrom *date.Time `json:"validFrom,omitempty"`
ValidTo *date.Time `json:"validTo,omitempty"`
AuthType AuthType `json:"authType,omitempty"`
GlobalAcsNamespace *string `json:"globalAcsNamespace,omitempty"`
GlobalAcsHostName *string `json:"globalAcsHostName,omitempty"`
GlobalAcsRPRealm *string `json:"globalAcsRPRealm,omitempty"`
}
// MarshalJSON is the custom marshaler for ResourceCertificateAndAcsDetails.
func (rcaad ResourceCertificateAndAcsDetails) MarshalJSON() ([]byte, error) {
rcaad.AuthType = AccessControlService
type Alias ResourceCertificateAndAcsDetails
return json.Marshal(&struct {
Alias
}{
Alias: (Alias)(rcaad),
})
}
// AsResourceCertificateAndAadDetails is the ResourceCertificateDetails implementation for ResourceCertificateAndAcsDetails.
func (rcaad ResourceCertificateAndAcsDetails) AsResourceCertificateAndAadDetails() (*ResourceCertificateAndAadDetails, bool) {
return nil, false
}
// AsResourceCertificateAndAcsDetails is the ResourceCertificateDetails implementation for ResourceCertificateAndAcsDetails.
func (rcaad ResourceCertificateAndAcsDetails) AsResourceCertificateAndAcsDetails() (*ResourceCertificateAndAcsDetails, bool) {
return &rcaad, true
}
// ResourceCertificateDetails is certificate details representing the Vault credentials.
type ResourceCertificateDetails interface {
AsResourceCertificateAndAadDetails() (*ResourceCertificateAndAadDetails, bool)
AsResourceCertificateAndAcsDetails() (*ResourceCertificateAndAcsDetails, bool)
}
func unmarshalResourceCertificateDetails(body []byte) (ResourceCertificateDetails, error) {
var m map[string]interface{}
err := json.Unmarshal(body, &m)
if err != nil {
return nil, err
}
switch m["authType"] {
case string(AzureActiveDirectory):
var rcaad ResourceCertificateAndAadDetails
err := json.Unmarshal(body, &rcaad)
return rcaad, err
case string(AccessControlService):
var rcaad ResourceCertificateAndAcsDetails
err := json.Unmarshal(body, &rcaad)
return rcaad, err
default:
return nil, errors.New("Unsupported type")
}
}
func unmarshalResourceCertificateDetailsArray(body []byte) ([]ResourceCertificateDetails, error) {
var rawMessages []*json.RawMessage
err := json.Unmarshal(body, &rawMessages)
if err != nil {
return nil, err
}
rcdArray := make([]ResourceCertificateDetails, len(rawMessages))
for index, rawMessage := range rawMessages {
rcd, err := unmarshalResourceCertificateDetails(*rawMessage)
if err != nil {
return nil, err
}
rcdArray[index] = rcd
}
return rcdArray, nil
}
// Sku is identifies the unique system identifier for each Azure resource.
type Sku struct {
Name SkuName `json:"name,omitempty"`
@@ -160,6 +448,67 @@ type Vault struct {
Sku *Sku `json:"sku,omitempty"`
}
// VaultCertificateResponse is certificate corresponding to a vault that can be used by clients to register themselves
// with the vault.
type VaultCertificateResponse struct {
autorest.Response `json:"-"`
Name *string `json:"name,omitempty"`
Type *string `json:"type,omitempty"`
ID *string `json:"id,omitempty"`
Properties ResourceCertificateDetails `json:"properties,omitempty"`
}
// UnmarshalJSON is the custom unmarshaler for VaultCertificateResponse struct.
func (vcr *VaultCertificateResponse) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
var v *json.RawMessage
v = m["name"]
if v != nil {
var name string
err = json.Unmarshal(*m["name"], &name)
if err != nil {
return err
}
vcr.Name = &name
}
v = m["type"]
if v != nil {
var typeVar string
err = json.Unmarshal(*m["type"], &typeVar)
if err != nil {
return err
}
vcr.Type = &typeVar
}
v = m["id"]
if v != nil {
var ID string
err = json.Unmarshal(*m["id"], &ID)
if err != nil {
return err
}
vcr.ID = &ID
}
v = m["properties"]
if v != nil {
properties, err := unmarshalResourceCertificateDetails(*m["properties"])
if err != nil {
return err
}
vcr.Properties = properties
}
return nil
}
// VaultExtendedInfo is vault extended information.
type VaultExtendedInfo struct {
IntegrityKey *string `json:"integrityKey,omitempty"`
@@ -190,3 +539,19 @@ type VaultProperties struct {
ProvisioningState *string `json:"provisioningState,omitempty"`
UpgradeDetails *UpgradeDetails `json:"upgradeDetails,omitempty"`
}
// VaultUsage is usages of a vault.
type VaultUsage struct {
Unit UsagesUnit `json:"unit,omitempty"`
QuotaPeriod *string `json:"quotaPeriod,omitempty"`
NextResetTime *date.Time `json:"nextResetTime,omitempty"`
CurrentValue *int64 `json:"currentValue,omitempty"`
Limit *int64 `json:"limit,omitempty"`
Name *NameInfo `json:"name,omitempty"`
}
// VaultUsageList is usage for vault.
type VaultUsageList struct {
autorest.Response `json:"-"`
Value *[]VaultUsage `json:"value,omitempty"`
}