diff --git a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/models.go b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/models.go index 41249399842b..0390b7ef1342 100644 --- a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/models.go +++ b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/models.go @@ -81,6 +81,40 @@ func PossibleIdentityTypeValues() []IdentityType { return []IdentityType{SystemAssigned} } +// InfrastructureEncryption enumerates the values for infrastructure encryption. +type InfrastructureEncryption string + +const ( + // InfrastructureEncryptionDisabled ... + InfrastructureEncryptionDisabled InfrastructureEncryption = "Disabled" + // InfrastructureEncryptionEnabled ... + InfrastructureEncryptionEnabled InfrastructureEncryption = "Enabled" +) + +// PossibleInfrastructureEncryptionValues returns an array of possible values for the InfrastructureEncryption const type. +func PossibleInfrastructureEncryptionValues() []InfrastructureEncryption { + return []InfrastructureEncryption{InfrastructureEncryptionDisabled, InfrastructureEncryptionEnabled} +} + +// MinimalTLSVersionEnum enumerates the values for minimal tls version enum. +type MinimalTLSVersionEnum string + +const ( + // TLS10 ... + TLS10 MinimalTLSVersionEnum = "TLS1_0" + // TLS11 ... + TLS11 MinimalTLSVersionEnum = "TLS1_1" + // TLS12 ... + TLS12 MinimalTLSVersionEnum = "TLS1_2" + // TLSEnforcementDisabled ... + TLSEnforcementDisabled MinimalTLSVersionEnum = "TLSEnforcementDisabled" +) + +// PossibleMinimalTLSVersionEnumValues returns an array of possible values for the MinimalTLSVersionEnum const type. +func PossibleMinimalTLSVersionEnumValues() []MinimalTLSVersionEnum { + return []MinimalTLSVersionEnum{TLS10, TLS11, TLS12, TLSEnforcementDisabled} +} + // OperationOrigin enumerates the values for operation origin. type OperationOrigin string @@ -98,6 +132,76 @@ func PossibleOperationOriginValues() []OperationOrigin { return []OperationOrigin{NotSpecified, System, User} } +// PrivateEndpointProvisioningState enumerates the values for private endpoint provisioning state. +type PrivateEndpointProvisioningState string + +const ( + // Approving ... + Approving PrivateEndpointProvisioningState = "Approving" + // Dropping ... + Dropping PrivateEndpointProvisioningState = "Dropping" + // Failed ... + Failed PrivateEndpointProvisioningState = "Failed" + // Ready ... + Ready PrivateEndpointProvisioningState = "Ready" + // Rejecting ... + Rejecting PrivateEndpointProvisioningState = "Rejecting" +) + +// PossiblePrivateEndpointProvisioningStateValues returns an array of possible values for the PrivateEndpointProvisioningState const type. +func PossiblePrivateEndpointProvisioningStateValues() []PrivateEndpointProvisioningState { + return []PrivateEndpointProvisioningState{Approving, Dropping, Failed, Ready, Rejecting} +} + +// PrivateLinkServiceConnectionStateActionsRequire enumerates the values for private link service connection +// state actions require. +type PrivateLinkServiceConnectionStateActionsRequire string + +const ( + // None ... + None PrivateLinkServiceConnectionStateActionsRequire = "None" +) + +// PossiblePrivateLinkServiceConnectionStateActionsRequireValues returns an array of possible values for the PrivateLinkServiceConnectionStateActionsRequire const type. +func PossiblePrivateLinkServiceConnectionStateActionsRequireValues() []PrivateLinkServiceConnectionStateActionsRequire { + return []PrivateLinkServiceConnectionStateActionsRequire{None} +} + +// PrivateLinkServiceConnectionStateStatus enumerates the values for private link service connection state +// status. +type PrivateLinkServiceConnectionStateStatus string + +const ( + // Approved ... + Approved PrivateLinkServiceConnectionStateStatus = "Approved" + // Disconnected ... + Disconnected PrivateLinkServiceConnectionStateStatus = "Disconnected" + // Pending ... + Pending PrivateLinkServiceConnectionStateStatus = "Pending" + // Rejected ... + Rejected PrivateLinkServiceConnectionStateStatus = "Rejected" +) + +// PossiblePrivateLinkServiceConnectionStateStatusValues returns an array of possible values for the PrivateLinkServiceConnectionStateStatus const type. +func PossiblePrivateLinkServiceConnectionStateStatusValues() []PrivateLinkServiceConnectionStateStatus { + return []PrivateLinkServiceConnectionStateStatus{Approved, Disconnected, Pending, Rejected} +} + +// PublicNetworkAccessEnum enumerates the values for public network access enum. +type PublicNetworkAccessEnum string + +const ( + // PublicNetworkAccessEnumDisabled ... + PublicNetworkAccessEnumDisabled PublicNetworkAccessEnum = "Disabled" + // PublicNetworkAccessEnumEnabled ... + PublicNetworkAccessEnumEnabled PublicNetworkAccessEnum = "Enabled" +) + +// PossiblePublicNetworkAccessEnumValues returns an array of possible values for the PublicNetworkAccessEnum const type. +func PossiblePublicNetworkAccessEnumValues() []PublicNetworkAccessEnum { + return []PublicNetworkAccessEnum{PublicNetworkAccessEnumDisabled, PublicNetworkAccessEnumEnabled} +} + // ServerSecurityAlertPolicyState enumerates the values for server security alert policy state. type ServerSecurityAlertPolicyState string @@ -121,13 +225,15 @@ const ( ServerStateDisabled ServerState = "Disabled" // ServerStateDropping ... ServerStateDropping ServerState = "Dropping" + // ServerStateInaccessible ... + ServerStateInaccessible ServerState = "Inaccessible" // ServerStateReady ... ServerStateReady ServerState = "Ready" ) // PossibleServerStateValues returns an array of possible values for the ServerState const type. func PossibleServerStateValues() []ServerState { - return []ServerState{ServerStateDisabled, ServerStateDropping, ServerStateReady} + return []ServerState{ServerStateDisabled, ServerStateDropping, ServerStateInaccessible, ServerStateReady} } // ServerVersion enumerates the values for server version. @@ -204,21 +310,21 @@ func PossibleStorageAutogrowValues() []StorageAutogrow { type VirtualNetworkRuleState string const ( - // Deleting ... - Deleting VirtualNetworkRuleState = "Deleting" - // Initializing ... - Initializing VirtualNetworkRuleState = "Initializing" - // InProgress ... - InProgress VirtualNetworkRuleState = "InProgress" - // Ready ... - Ready VirtualNetworkRuleState = "Ready" - // Unknown ... - Unknown VirtualNetworkRuleState = "Unknown" + // VirtualNetworkRuleStateDeleting ... + VirtualNetworkRuleStateDeleting VirtualNetworkRuleState = "Deleting" + // VirtualNetworkRuleStateInitializing ... + VirtualNetworkRuleStateInitializing VirtualNetworkRuleState = "Initializing" + // VirtualNetworkRuleStateInProgress ... + VirtualNetworkRuleStateInProgress VirtualNetworkRuleState = "InProgress" + // VirtualNetworkRuleStateReady ... + VirtualNetworkRuleStateReady VirtualNetworkRuleState = "Ready" + // VirtualNetworkRuleStateUnknown ... + VirtualNetworkRuleStateUnknown VirtualNetworkRuleState = "Unknown" ) // PossibleVirtualNetworkRuleStateValues returns an array of possible values for the VirtualNetworkRuleState const type. func PossibleVirtualNetworkRuleStateValues() []VirtualNetworkRuleState { - return []VirtualNetworkRuleState{Deleting, Initializing, InProgress, Ready, Unknown} + return []VirtualNetworkRuleState{VirtualNetworkRuleStateDeleting, VirtualNetworkRuleStateInitializing, VirtualNetworkRuleStateInProgress, VirtualNetworkRuleStateReady, VirtualNetworkRuleStateUnknown} } // CloudError an error response from the Batch service. @@ -827,6 +933,32 @@ type PerformanceTierServiceLevelObjectives struct { MinStorageMB *int32 `json:"minStorageMB,omitempty"` } +// PrivateEndpointConnectionProperties properties of a private endpoint connection. +type PrivateEndpointConnectionProperties struct { + // PrivateEndpoint - Private endpoint which the connection belongs to. + PrivateEndpoint *PrivateEndpointProperty `json:"privateEndpoint,omitempty"` + // PrivateLinkServiceConnectionState - Connection state of the private endpoint connection. + PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionStateProperty `json:"privateLinkServiceConnectionState,omitempty"` + // ProvisioningState - READ-ONLY; State of the private endpoint connection. Possible values include: 'Approving', 'Ready', 'Dropping', 'Failed', 'Rejecting' + ProvisioningState PrivateEndpointProvisioningState `json:"provisioningState,omitempty"` +} + +// PrivateEndpointProperty ... +type PrivateEndpointProperty struct { + // ID - Resource id of the private endpoint. + ID *string `json:"id,omitempty"` +} + +// PrivateLinkServiceConnectionStateProperty ... +type PrivateLinkServiceConnectionStateProperty struct { + // Status - The private link service connection status. Possible values include: 'Approved', 'Pending', 'Rejected', 'Disconnected' + Status PrivateLinkServiceConnectionStateStatus `json:"status,omitempty"` + // Description - The private link service connection description. + Description *string `json:"description,omitempty"` + // ActionsRequired - READ-ONLY; The actions required for private link service connection. Possible values include: 'None' + ActionsRequired PrivateLinkServiceConnectionStateActionsRequire `json:"actionsRequired,omitempty"` +} + // ProxyResource resource properties. type ProxyResource struct { // ID - READ-ONLY; Resource ID @@ -998,7 +1130,7 @@ func (s *Server) UnmarshalJSON(body []byte) error { type ServerAdministratorProperties struct { // AdministratorType - The type of administrator. AdministratorType *string `json:"administratorType,omitempty"` - // Login - The server administrator login value. + // Login - The server administrator login account name. Login *string `json:"login,omitempty"` // Sid - The server administrator Sid (Secure ID). Sid *uuid.UUID `json:"sid,omitempty"` @@ -1123,7 +1255,7 @@ type ServerAdministratorsDeleteFuture struct { // Result returns the result of the asynchronous operation. // If the operation has not completed it will return an error. -func (future *ServerAdministratorsDeleteFuture) Result(client ServerAdministratorsClient) (sar ServerAdministratorResource, err error) { +func (future *ServerAdministratorsDeleteFuture) Result(client ServerAdministratorsClient) (ar autorest.Response, err error) { var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { @@ -1134,13 +1266,7 @@ func (future *ServerAdministratorsDeleteFuture) Result(client ServerAdministrato err = azure.NewAsyncOpIncompleteError("postgresql.ServerAdministratorsDeleteFuture") return } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if sar.Response.Response, err = future.GetResult(sender); err == nil && sar.Response.Response.StatusCode != http.StatusNoContent { - sar, err = client.DeleteResponder(sar.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "postgresql.ServerAdministratorsDeleteFuture", "Result", sar.Response.Response, "Failure responding to request") - } - } + ar.Response = future.Response() return } @@ -1229,6 +1355,14 @@ type ServerListResult struct { Value *[]Server `json:"value,omitempty"` } +// ServerPrivateEndpointConnection a private endpoint connection under a server +type ServerPrivateEndpointConnection struct { + // ID - READ-ONLY; Resource Id of the private endpoint connection. + ID *string `json:"id,omitempty"` + // Properties - READ-ONLY; Private endpoint connection properties + Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` +} + // ServerProperties the properties of a server. type ServerProperties struct { // AdministratorLogin - The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). @@ -1237,7 +1371,13 @@ type ServerProperties struct { Version ServerVersion `json:"version,omitempty"` // SslEnforcement - Enable ssl enforcement or not when connect to server. Possible values include: 'SslEnforcementEnumEnabled', 'SslEnforcementEnumDisabled' SslEnforcement SslEnforcementEnum `json:"sslEnforcement,omitempty"` - // UserVisibleState - A state of a server that is visible to user. Possible values include: 'ServerStateReady', 'ServerStateDropping', 'ServerStateDisabled' + // MinimalTLSVersion - Enforce a minimal Tls version for the server. Possible values include: 'TLS10', 'TLS11', 'TLS12', 'TLSEnforcementDisabled' + MinimalTLSVersion MinimalTLSVersionEnum `json:"minimalTlsVersion,omitempty"` + // ByokEnforcement - READ-ONLY; Status showing whether the server data encryption is enabled with customer-managed keys. + ByokEnforcement *string `json:"byokEnforcement,omitempty"` + // InfrastructureEncryption - Status showing whether the server enabled infrastructure encryption. Possible values include: 'InfrastructureEncryptionEnabled', 'InfrastructureEncryptionDisabled' + InfrastructureEncryption InfrastructureEncryption `json:"infrastructureEncryption,omitempty"` + // UserVisibleState - A state of a server that is visible to user. Possible values include: 'ServerStateReady', 'ServerStateDropping', 'ServerStateDisabled', 'ServerStateInaccessible' UserVisibleState ServerState `json:"userVisibleState,omitempty"` // FullyQualifiedDomainName - The fully qualified domain name of a server. FullyQualifiedDomainName *string `json:"fullyQualifiedDomainName,omitempty"` @@ -1251,6 +1391,10 @@ type ServerProperties struct { MasterServerID *string `json:"masterServerId,omitempty"` // ReplicaCapacity - The maximum number of replicas that a master server can have. ReplicaCapacity *int32 `json:"replicaCapacity,omitempty"` + // PublicNetworkAccess - Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'PublicNetworkAccessEnumEnabled', 'PublicNetworkAccessEnumDisabled' + PublicNetworkAccess PublicNetworkAccessEnum `json:"publicNetworkAccess,omitempty"` + // PrivateEndpointConnections - READ-ONLY; List of private endpoint connections on a server + PrivateEndpointConnections *[]ServerPrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` } // BasicServerPropertiesForCreate the properties used to create a new server. @@ -1268,6 +1412,8 @@ type ServerPropertiesForCreate struct { Version ServerVersion `json:"version,omitempty"` // SslEnforcement - Enable ssl enforcement or not when connect to server. Possible values include: 'SslEnforcementEnumEnabled', 'SslEnforcementEnumDisabled' SslEnforcement SslEnforcementEnum `json:"sslEnforcement,omitempty"` + // MinimalTLSVersion - Enforce a minimal Tls version for the server. Possible values include: 'TLS10', 'TLS11', 'TLS12', 'TLSEnforcementDisabled' + MinimalTLSVersion MinimalTLSVersionEnum `json:"minimalTlsVersion,omitempty"` // StorageProfile - Storage profile of a server. StorageProfile *StorageProfile `json:"storageProfile,omitempty"` // CreateMode - Possible values include: 'CreateModeServerPropertiesForCreate', 'CreateModeDefault', 'CreateModePointInTimeRestore', 'CreateModeGeoRestore', 'CreateModeReplica' @@ -1333,6 +1479,9 @@ func (spfc ServerPropertiesForCreate) MarshalJSON() ([]byte, error) { if spfc.SslEnforcement != "" { objectMap["sslEnforcement"] = spfc.SslEnforcement } + if spfc.MinimalTLSVersion != "" { + objectMap["minimalTlsVersion"] = spfc.MinimalTLSVersion + } if spfc.StorageProfile != nil { objectMap["storageProfile"] = spfc.StorageProfile } @@ -1382,6 +1531,8 @@ type ServerPropertiesForDefaultCreate struct { Version ServerVersion `json:"version,omitempty"` // SslEnforcement - Enable ssl enforcement or not when connect to server. Possible values include: 'SslEnforcementEnumEnabled', 'SslEnforcementEnumDisabled' SslEnforcement SslEnforcementEnum `json:"sslEnforcement,omitempty"` + // MinimalTLSVersion - Enforce a minimal Tls version for the server. Possible values include: 'TLS10', 'TLS11', 'TLS12', 'TLSEnforcementDisabled' + MinimalTLSVersion MinimalTLSVersionEnum `json:"minimalTlsVersion,omitempty"` // StorageProfile - Storage profile of a server. StorageProfile *StorageProfile `json:"storageProfile,omitempty"` // CreateMode - Possible values include: 'CreateModeServerPropertiesForCreate', 'CreateModeDefault', 'CreateModePointInTimeRestore', 'CreateModeGeoRestore', 'CreateModeReplica' @@ -1404,6 +1555,9 @@ func (spfdc ServerPropertiesForDefaultCreate) MarshalJSON() ([]byte, error) { if spfdc.SslEnforcement != "" { objectMap["sslEnforcement"] = spfdc.SslEnforcement } + if spfdc.MinimalTLSVersion != "" { + objectMap["minimalTlsVersion"] = spfdc.MinimalTLSVersion + } if spfdc.StorageProfile != nil { objectMap["storageProfile"] = spfdc.StorageProfile } @@ -1452,6 +1606,8 @@ type ServerPropertiesForGeoRestore struct { Version ServerVersion `json:"version,omitempty"` // SslEnforcement - Enable ssl enforcement or not when connect to server. Possible values include: 'SslEnforcementEnumEnabled', 'SslEnforcementEnumDisabled' SslEnforcement SslEnforcementEnum `json:"sslEnforcement,omitempty"` + // MinimalTLSVersion - Enforce a minimal Tls version for the server. Possible values include: 'TLS10', 'TLS11', 'TLS12', 'TLSEnforcementDisabled' + MinimalTLSVersion MinimalTLSVersionEnum `json:"minimalTlsVersion,omitempty"` // StorageProfile - Storage profile of a server. StorageProfile *StorageProfile `json:"storageProfile,omitempty"` // CreateMode - Possible values include: 'CreateModeServerPropertiesForCreate', 'CreateModeDefault', 'CreateModePointInTimeRestore', 'CreateModeGeoRestore', 'CreateModeReplica' @@ -1471,6 +1627,9 @@ func (spfgr ServerPropertiesForGeoRestore) MarshalJSON() ([]byte, error) { if spfgr.SslEnforcement != "" { objectMap["sslEnforcement"] = spfgr.SslEnforcement } + if spfgr.MinimalTLSVersion != "" { + objectMap["minimalTlsVersion"] = spfgr.MinimalTLSVersion + } if spfgr.StorageProfile != nil { objectMap["storageProfile"] = spfgr.StorageProfile } @@ -1518,6 +1677,8 @@ type ServerPropertiesForReplica struct { Version ServerVersion `json:"version,omitempty"` // SslEnforcement - Enable ssl enforcement or not when connect to server. Possible values include: 'SslEnforcementEnumEnabled', 'SslEnforcementEnumDisabled' SslEnforcement SslEnforcementEnum `json:"sslEnforcement,omitempty"` + // MinimalTLSVersion - Enforce a minimal Tls version for the server. Possible values include: 'TLS10', 'TLS11', 'TLS12', 'TLSEnforcementDisabled' + MinimalTLSVersion MinimalTLSVersionEnum `json:"minimalTlsVersion,omitempty"` // StorageProfile - Storage profile of a server. StorageProfile *StorageProfile `json:"storageProfile,omitempty"` // CreateMode - Possible values include: 'CreateModeServerPropertiesForCreate', 'CreateModeDefault', 'CreateModePointInTimeRestore', 'CreateModeGeoRestore', 'CreateModeReplica' @@ -1537,6 +1698,9 @@ func (spfr ServerPropertiesForReplica) MarshalJSON() ([]byte, error) { if spfr.SslEnforcement != "" { objectMap["sslEnforcement"] = spfr.SslEnforcement } + if spfr.MinimalTLSVersion != "" { + objectMap["minimalTlsVersion"] = spfr.MinimalTLSVersion + } if spfr.StorageProfile != nil { objectMap["storageProfile"] = spfr.StorageProfile } @@ -1586,6 +1750,8 @@ type ServerPropertiesForRestore struct { Version ServerVersion `json:"version,omitempty"` // SslEnforcement - Enable ssl enforcement or not when connect to server. Possible values include: 'SslEnforcementEnumEnabled', 'SslEnforcementEnumDisabled' SslEnforcement SslEnforcementEnum `json:"sslEnforcement,omitempty"` + // MinimalTLSVersion - Enforce a minimal Tls version for the server. Possible values include: 'TLS10', 'TLS11', 'TLS12', 'TLSEnforcementDisabled' + MinimalTLSVersion MinimalTLSVersionEnum `json:"minimalTlsVersion,omitempty"` // StorageProfile - Storage profile of a server. StorageProfile *StorageProfile `json:"storageProfile,omitempty"` // CreateMode - Possible values include: 'CreateModeServerPropertiesForCreate', 'CreateModeDefault', 'CreateModePointInTimeRestore', 'CreateModeGeoRestore', 'CreateModeReplica' @@ -1608,6 +1774,9 @@ func (spfr ServerPropertiesForRestore) MarshalJSON() ([]byte, error) { if spfr.SslEnforcement != "" { objectMap["sslEnforcement"] = spfr.SslEnforcement } + if spfr.MinimalTLSVersion != "" { + objectMap["minimalTlsVersion"] = spfr.MinimalTLSVersion + } if spfr.StorageProfile != nil { objectMap["storageProfile"] = spfr.StorageProfile } @@ -1930,6 +2099,8 @@ type ServerUpdateParametersProperties struct { Version ServerVersion `json:"version,omitempty"` // SslEnforcement - Enable ssl enforcement or not when connect to server. Possible values include: 'SslEnforcementEnumEnabled', 'SslEnforcementEnumDisabled' SslEnforcement SslEnforcementEnum `json:"sslEnforcement,omitempty"` + // MinimalTLSVersion - Enforce a minimal Tls version for the server. Possible values include: 'TLS10', 'TLS11', 'TLS12', 'TLSEnforcementDisabled' + MinimalTLSVersion MinimalTLSVersionEnum `json:"minimalTlsVersion,omitempty"` // ReplicationRole - The replication role of the server. ReplicationRole *string `json:"replicationRole,omitempty"` } @@ -2211,7 +2382,7 @@ type VirtualNetworkRuleProperties struct { VirtualNetworkSubnetID *string `json:"virtualNetworkSubnetId,omitempty"` // IgnoreMissingVnetServiceEndpoint - Create firewall rule before the virtual network has vnet service endpoint enabled. IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty"` - // State - READ-ONLY; Virtual Network Rule State. Possible values include: 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' + // State - READ-ONLY; Virtual Network Rule State. Possible values include: 'VirtualNetworkRuleStateInitializing', 'VirtualNetworkRuleStateInProgress', 'VirtualNetworkRuleStateReady', 'VirtualNetworkRuleStateDeleting', 'VirtualNetworkRuleStateUnknown' State VirtualNetworkRuleState `json:"state,omitempty"` } diff --git a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/postgresqlapi/interfaces.go b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/postgresqlapi/interfaces.go index e84595961f90..6033eba5f2ab 100644 --- a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/postgresqlapi/interfaces.go +++ b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/postgresqlapi/interfaces.go @@ -94,7 +94,7 @@ type ServerAdministratorsClientAPI interface { CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, properties postgresql.ServerAdministratorResource) (result postgresql.ServerAdministratorsCreateOrUpdateFuture, err error) Delete(ctx context.Context, resourceGroupName string, serverName string) (result postgresql.ServerAdministratorsDeleteFuture, err error) Get(ctx context.Context, resourceGroupName string, serverName string) (result postgresql.ServerAdministratorResource, err error) - ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result postgresql.ServerAdministratorResourceListResult, err error) + List(ctx context.Context, resourceGroupName string, serverName string) (result postgresql.ServerAdministratorResourceListResult, err error) } var _ ServerAdministratorsClientAPI = (*postgresql.ServerAdministratorsClient)(nil) diff --git a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/serveradministrators.go b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/serveradministrators.go index d1bb901b7527..ffaf57769585 100644 --- a/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/serveradministrators.go +++ b/services/preview/postgresql/mgmt/2017-12-01-preview/postgresql/serveradministrators.go @@ -203,14 +203,13 @@ func (client ServerAdministratorsClient) DeleteSender(req *http.Request) (future // DeleteResponder handles the response to the Delete request. The method always // closes the http.Response Body. -func (client ServerAdministratorsClient) DeleteResponder(resp *http.Response) (result ServerAdministratorResource, err error) { +func (client ServerAdministratorsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), - autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} + result.Response = resp return } @@ -291,14 +290,14 @@ func (client ServerAdministratorsClient) GetResponder(resp *http.Response) (resu return } -// ListByServer returns a list of server Administrators. +// List returns a list of server Administrators. // Parameters: // resourceGroupName - the name of the resource group that contains the resource. You can obtain this value // from the Azure Resource Manager API or the portal. // serverName - the name of the server. -func (client ServerAdministratorsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result ServerAdministratorResourceListResult, err error) { +func (client ServerAdministratorsClient) List(ctx context.Context, resourceGroupName string, serverName string) (result ServerAdministratorResourceListResult, err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerAdministratorsClient.ListByServer") + ctx = tracing.StartSpan(ctx, fqdn+"/ServerAdministratorsClient.List") defer func() { sc := -1 if result.Response.Response != nil { @@ -307,29 +306,29 @@ func (client ServerAdministratorsClient) ListByServer(ctx context.Context, resou tracing.EndSpan(ctx, sc, err) }() } - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) + req, err := client.ListPreparer(ctx, resourceGroupName, serverName) if err != nil { - err = autorest.NewErrorWithError(err, "postgresql.ServerAdministratorsClient", "ListByServer", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "postgresql.ServerAdministratorsClient", "List", nil, "Failure preparing request") return } - resp, err := client.ListByServerSender(req) + resp, err := client.ListSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "postgresql.ServerAdministratorsClient", "ListByServer", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "postgresql.ServerAdministratorsClient", "List", resp, "Failure sending request") return } - result, err = client.ListByServerResponder(resp) + result, err = client.ListResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "postgresql.ServerAdministratorsClient", "ListByServer", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "postgresql.ServerAdministratorsClient", "List", resp, "Failure responding to request") } return } -// ListByServerPreparer prepares the ListByServer request. -func (client ServerAdministratorsClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { +// ListPreparer prepares the List request. +func (client ServerAdministratorsClient) ListPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serverName": autorest.Encode("path", serverName), @@ -349,15 +348,15 @@ func (client ServerAdministratorsClient) ListByServerPreparer(ctx context.Contex return preparer.Prepare((&http.Request{}).WithContext(ctx)) } -// ListByServerSender sends the ListByServer request. The method will close the +// ListSender sends the List request. The method will close the // http.Response Body if it receives an error. -func (client ServerAdministratorsClient) ListByServerSender(req *http.Request) (*http.Response, error) { +func (client ServerAdministratorsClient) ListSender(req *http.Request) (*http.Response, error) { return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } -// ListByServerResponder handles the response to the ListByServer request. The method always +// ListResponder handles the response to the List request. The method always // closes the http.Response Body. -func (client ServerAdministratorsClient) ListByServerResponder(resp *http.Response) (result ServerAdministratorResourceListResult, err error) { +func (client ServerAdministratorsClient) ListResponder(resp *http.Response) (result ServerAdministratorResourceListResult, err error) { err = autorest.Respond( resp, client.ByInspecting(),