Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR sql/resource-manager] Adding Swagger and examples for VirtualClusters operation group #2988

Merged
merged 1 commit into from
Feb 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public interface ManagedInstance extends HasInner<ManagedInstanceInner>, Resourc
/**
* @return the proxyOverride value.
*/
String proxyOverride();
ManagedInstanceProxyOverride proxyOverride();

/**
* @return the publicDataEndpointEnabled value.
Expand All @@ -94,6 +94,11 @@ public interface ManagedInstance extends HasInner<ManagedInstanceInner>, Resourc
*/
String subnetId();

/**
* @return the timezoneId value.
*/
String timezoneId();

/**
* @return the vCores value.
*/
Expand Down Expand Up @@ -188,7 +193,7 @@ interface WithProxyOverride {
/**
* Specifies proxyOverride.
*/
WithCreate withProxyOverride(String proxyOverride);
WithCreate withProxyOverride(ManagedInstanceProxyOverride proxyOverride);
}

/**
Expand Down Expand Up @@ -231,6 +236,16 @@ interface WithSubnetId {
WithCreate withSubnetId(String subnetId);
}

/**
* The stage of the managedinstance update allowing to specify TimezoneId.
*/
interface WithTimezoneId {
/**
* Specifies timezoneId.
*/
WithCreate withTimezoneId(String timezoneId);
}

/**
* The stage of the managedinstance update allowing to specify VCores.
*/
Expand All @@ -246,13 +261,13 @@ interface WithVCores {
* the resource to be created (via {@link WithCreate#create()}), but also allows
* for any other optional settings to be specified.
*/
interface WithCreate extends Creatable<ManagedInstance>, Resource.DefinitionWithTags<WithCreate>, DefinitionStages.WithAdministratorLogin, DefinitionStages.WithAdministratorLoginPassword, DefinitionStages.WithCollation, DefinitionStages.WithDnsZonePartner, DefinitionStages.WithIdentity, DefinitionStages.WithLicenseType, DefinitionStages.WithProxyOverride, DefinitionStages.WithPublicDataEndpointEnabled, DefinitionStages.WithSku, DefinitionStages.WithStorageSizeInGB, DefinitionStages.WithSubnetId, DefinitionStages.WithVCores {
interface WithCreate extends Creatable<ManagedInstance>, Resource.DefinitionWithTags<WithCreate>, DefinitionStages.WithAdministratorLogin, DefinitionStages.WithAdministratorLoginPassword, DefinitionStages.WithCollation, DefinitionStages.WithDnsZonePartner, DefinitionStages.WithIdentity, DefinitionStages.WithLicenseType, DefinitionStages.WithProxyOverride, DefinitionStages.WithPublicDataEndpointEnabled, DefinitionStages.WithSku, DefinitionStages.WithStorageSizeInGB, DefinitionStages.WithSubnetId, DefinitionStages.WithTimezoneId, DefinitionStages.WithVCores {
}
}
/**
* The template for a ManagedInstance update operation, containing all the settings that can be modified.
*/
interface Update extends Appliable<ManagedInstance>, Resource.UpdateWithTags<Update>, UpdateStages.WithAdministratorLogin, UpdateStages.WithAdministratorLoginPassword, UpdateStages.WithCollation, UpdateStages.WithDnsZonePartner, UpdateStages.WithLicenseType, UpdateStages.WithProxyOverride, UpdateStages.WithPublicDataEndpointEnabled, UpdateStages.WithSku, UpdateStages.WithStorageSizeInGB, UpdateStages.WithSubnetId, UpdateStages.WithVCores {
interface Update extends Appliable<ManagedInstance>, Resource.UpdateWithTags<Update>, UpdateStages.WithAdministratorLogin, UpdateStages.WithAdministratorLoginPassword, UpdateStages.WithCollation, UpdateStages.WithDnsZonePartner, UpdateStages.WithLicenseType, UpdateStages.WithProxyOverride, UpdateStages.WithPublicDataEndpointEnabled, UpdateStages.WithSku, UpdateStages.WithStorageSizeInGB, UpdateStages.WithSubnetId, UpdateStages.WithTimezoneId, UpdateStages.WithVCores {
}

/**
Expand Down Expand Up @@ -316,7 +331,7 @@ interface WithProxyOverride {
/**
* Specifies proxyOverride.
*/
Update withProxyOverride(String proxyOverride);
Update withProxyOverride(ManagedInstanceProxyOverride proxyOverride);
}

/**
Expand Down Expand Up @@ -359,6 +374,16 @@ interface WithSubnetId {
Update withSubnetId(String subnetId);
}

/**
* The stage of the managedinstance {0} allowing to specify TimezoneId.
*/
interface WithTimezoneId {
/**
* Specifies timezoneId.
*/
Update withTimezoneId(String timezoneId);
}

/**
* The stage of the managedinstance {0} allowing to specify VCores.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.sql.v2015_05_01_preview;

import java.util.Collection;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.microsoft.rest.ExpandableStringEnum;

/**
* Defines values for ManagedInstanceProxyOverride.
*/
public final class ManagedInstanceProxyOverride extends ExpandableStringEnum<ManagedInstanceProxyOverride> {
/** Static value Proxy for ManagedInstanceProxyOverride. */
public static final ManagedInstanceProxyOverride PROXY = fromString("Proxy");

/** Static value Redirect for ManagedInstanceProxyOverride. */
public static final ManagedInstanceProxyOverride REDIRECT = fromString("Redirect");

/** Static value Default for ManagedInstanceProxyOverride. */
public static final ManagedInstanceProxyOverride DEFAULT = fromString("Default");

/**
* Creates or finds a ManagedInstanceProxyOverride from its string representation.
* @param name a name to look for
* @return the corresponding ManagedInstanceProxyOverride
*/
@JsonCreator
public static ManagedInstanceProxyOverride fromString(String name) {
return fromString(name, ManagedInstanceProxyOverride.class);
}

/**
* @return known ManagedInstanceProxyOverride values
*/
public static Collection<ManagedInstanceProxyOverride> values() {
return values(ManagedInstanceProxyOverride.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,27 @@ public class ManagedInstanceUpdate {
private Boolean publicDataEndpointEnabled;

/**
* Proxy override of the managed instance.
* Connection type used for connecting to the instance. Possible values
* include: 'Proxy', 'Redirect', 'Default'.
*/
@JsonProperty(value = "properties.proxyOverride")
private String proxyOverride;
private ManagedInstanceProxyOverride proxyOverride;

/**
* Id of the timezone. Allowed values are timezones supported by Windows.
* Winodws keeps details on supported timezones, including the id, in
* registry under
* KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time
* Zones.
* You can get those registry values via SQL Server by querying SELECT name
* AS timezone_id FROM sys.time_zone_info.
* List of Ids can also be obtained by executing
* [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell.
* An example of valid timezone id is "Pacific Standard Time" or "W. Europe
* Standard Time".
*/
@JsonProperty(value = "properties.timezoneId")
private String timezoneId;

/**
* Resource tags.
Expand Down Expand Up @@ -339,25 +356,55 @@ public ManagedInstanceUpdate withPublicDataEndpointEnabled(Boolean publicDataEnd
}

/**
* Get proxy override of the managed instance.
* Get connection type used for connecting to the instance. Possible values include: 'Proxy', 'Redirect', 'Default'.
*
* @return the proxyOverride value
*/
public String proxyOverride() {
public ManagedInstanceProxyOverride proxyOverride() {
return this.proxyOverride;
}

/**
* Set proxy override of the managed instance.
* Set connection type used for connecting to the instance. Possible values include: 'Proxy', 'Redirect', 'Default'.
*
* @param proxyOverride the proxyOverride value to set
* @return the ManagedInstanceUpdate object itself.
*/
public ManagedInstanceUpdate withProxyOverride(String proxyOverride) {
public ManagedInstanceUpdate withProxyOverride(ManagedInstanceProxyOverride proxyOverride) {
this.proxyOverride = proxyOverride;
return this;
}

/**
* Get id of the timezone. Allowed values are timezones supported by Windows.
Winodws keeps details on supported timezones, including the id, in registry under
KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones.
You can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM sys.time_zone_info.
List of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell.
An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time".
*
* @return the timezoneId value
*/
public String timezoneId() {
return this.timezoneId;
}

/**
* Set id of the timezone. Allowed values are timezones supported by Windows.
Winodws keeps details on supported timezones, including the id, in registry under
KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones.
You can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM sys.time_zone_info.
List of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell.
An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time".
*
* @param timezoneId the timezoneId value to set
* @return the ManagedInstanceUpdate object itself.
*/
public ManagedInstanceUpdate withTimezoneId(String timezoneId) {
this.timezoneId = timezoneId;
return this;
}

/**
* Get resource tags.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.sql.v2015_05_01_preview;

import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.arm.resources.models.Resource;
import com.microsoft.azure.arm.resources.models.GroupableResourceCore;
import com.microsoft.azure.arm.resources.models.HasResourceGroup;
import com.microsoft.azure.arm.model.Refreshable;
import com.microsoft.azure.arm.model.Updatable;
import com.microsoft.azure.arm.model.Appliable;
import com.microsoft.azure.arm.resources.models.HasManager;
import com.microsoft.azure.management.sql.v2015_05_01_preview.implementation.SqlManager;
import java.util.List;
import com.microsoft.azure.management.sql.v2015_05_01_preview.implementation.VirtualClusterInner;

/**
* Type representing VirtualCluster.
*/
public interface VirtualCluster extends HasInner<VirtualClusterInner>, Resource, GroupableResourceCore<SqlManager, VirtualClusterInner>, HasResourceGroup, Refreshable<VirtualCluster>, Updatable<VirtualCluster.Update>, HasManager<SqlManager> {
/**
* @return the childResources value.
*/
List<String> childResources();

/**
* @return the family value.
*/
String family();

/**
* @return the subnetId value.
*/
String subnetId();

/**
* The template for a VirtualCluster update operation, containing all the settings that can be modified.
*/
interface Update extends Appliable<VirtualCluster>, Resource.UpdateWithTags<Update>, UpdateStages.WithFamily {
}

/**
* Grouping of VirtualCluster update stages.
*/
interface UpdateStages {
/**
* The stage of the virtualcluster {0} allowing to specify Family.
*/
interface WithFamily {
/**
* Specifies family.
*/
Update withFamily(String family);
}

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.sql.v2015_05_01_preview;

import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.microsoft.rest.serializer.JsonFlatten;

/**
* An update request for an Azure SQL Database virtual cluster.
*/
@JsonFlatten
public class VirtualClusterUpdate {
/**
* Subnet resource ID for the virtual cluster.
*/
@JsonProperty(value = "properties.subnetId", access = JsonProperty.Access.WRITE_ONLY)
private String subnetId;

/**
* If the service has different generations of hardware, for the same SKU,
* then that can be captured here.
*/
@JsonProperty(value = "properties.family")
private String family;

/**
* List of resources in this virtual cluster.
*/
@JsonProperty(value = "properties.childResources", access = JsonProperty.Access.WRITE_ONLY)
private List<String> childResources;

/**
* Resource tags.
*/
@JsonProperty(value = "tags")
private Map<String, String> tags;

/**
* Get subnet resource ID for the virtual cluster.
*
* @return the subnetId value
*/
public String subnetId() {
return this.subnetId;
}

/**
* Get if the service has different generations of hardware, for the same SKU, then that can be captured here.
*
* @return the family value
*/
public String family() {
return this.family;
}

/**
* Set if the service has different generations of hardware, for the same SKU, then that can be captured here.
*
* @param family the family value to set
* @return the VirtualClusterUpdate object itself.
*/
public VirtualClusterUpdate withFamily(String family) {
this.family = family;
return this;
}

/**
* Get list of resources in this virtual cluster.
*
* @return the childResources value
*/
public List<String> childResources() {
return this.childResources;
}

/**
* Get resource tags.
*
* @return the tags value
*/
public Map<String, String> tags() {
return this.tags;
}

/**
* Set resource tags.
*
* @param tags the tags value to set
* @return the VirtualClusterUpdate object itself.
*/
public VirtualClusterUpdate withTags(Map<String, String> tags) {
this.tags = tags;
return this;
}

}
Loading