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] [DO NOT MERGE] Managed instance updates plus examples #3425

Merged
merged 2 commits into from
Apr 23, 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 @@ -18,6 +18,7 @@
import com.microsoft.azure.arm.model.Creatable;
import com.microsoft.azure.arm.resources.models.HasManager;
import com.microsoft.azure.management.sql.v2015_05_01_preview.implementation.SqlManager;
import org.joda.time.DateTime;
import com.microsoft.azure.management.sql.v2015_05_01_preview.implementation.ManagedInstanceInner;

/**
Expand Down Expand Up @@ -59,26 +60,46 @@ public interface ManagedInstance extends HasInner<ManagedInstanceInner>, Resourc
*/
ResourceIdentity identity();

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

/**
* @return the licenseType value.
*/
String licenseType();
ManagedInstanceLicenseType licenseType();

/**
* @return the managedInstanceCreateMode value.
*/
ManagedServerCreateMode managedInstanceCreateMode();

/**
* @return the proxyOverride value.
*/
ManagedInstanceProxyOverride proxyOverride();
String proxyOverride();

/**
* @return the publicDataEndpointEnabled value.
*/
Boolean publicDataEndpointEnabled();

/**
* @return the restorePointInTime value.
*/
DateTime restorePointInTime();

/**
* @return the sku value.
*/
Sku sku();

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

/**
* @return the state value.
*/
Expand Down Expand Up @@ -176,14 +197,34 @@ interface WithIdentity {
WithCreate withIdentity(ResourceIdentity identity);
}

/**
* The stage of the managedinstance update allowing to specify InstancePoolId.
*/
interface WithInstancePoolId {
/**
* Specifies instancePoolId.
*/
WithCreate withInstancePoolId(String instancePoolId);
}

/**
* The stage of the managedinstance update allowing to specify LicenseType.
*/
interface WithLicenseType {
/**
* Specifies licenseType.
*/
WithCreate withLicenseType(String licenseType);
WithCreate withLicenseType(ManagedInstanceLicenseType licenseType);
}

/**
* The stage of the managedinstance update allowing to specify ManagedInstanceCreateMode.
*/
interface WithManagedInstanceCreateMode {
/**
* Specifies managedInstanceCreateMode.
*/
WithCreate withManagedInstanceCreateMode(ManagedServerCreateMode managedInstanceCreateMode);
}

/**
Expand All @@ -193,7 +234,7 @@ interface WithProxyOverride {
/**
* Specifies proxyOverride.
*/
WithCreate withProxyOverride(ManagedInstanceProxyOverride proxyOverride);
WithCreate withProxyOverride(String proxyOverride);
}

/**
Expand All @@ -206,6 +247,16 @@ interface WithPublicDataEndpointEnabled {
WithCreate withPublicDataEndpointEnabled(Boolean publicDataEndpointEnabled);
}

/**
* The stage of the managedinstance update allowing to specify RestorePointInTime.
*/
interface WithRestorePointInTime {
/**
* Specifies restorePointInTime.
*/
WithCreate withRestorePointInTime(DateTime restorePointInTime);
}

/**
* The stage of the managedinstance update allowing to specify Sku.
*/
Expand All @@ -216,6 +267,16 @@ interface WithSku {
WithCreate withSku(Sku sku);
}

/**
* The stage of the managedinstance update allowing to specify SourceManagedInstanceId.
*/
interface WithSourceManagedInstanceId {
/**
* Specifies sourceManagedInstanceId.
*/
WithCreate withSourceManagedInstanceId(String sourceManagedInstanceId);
}

/**
* The stage of the managedinstance update allowing to specify StorageSizeInGB.
*/
Expand Down Expand Up @@ -261,13 +322,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.WithTimezoneId, DefinitionStages.WithVCores {
interface WithCreate extends Creatable<ManagedInstance>, Resource.DefinitionWithTags<WithCreate>, DefinitionStages.WithAdministratorLogin, DefinitionStages.WithAdministratorLoginPassword, DefinitionStages.WithCollation, DefinitionStages.WithDnsZonePartner, DefinitionStages.WithIdentity, DefinitionStages.WithInstancePoolId, DefinitionStages.WithLicenseType, DefinitionStages.WithManagedInstanceCreateMode, DefinitionStages.WithProxyOverride, DefinitionStages.WithPublicDataEndpointEnabled, DefinitionStages.WithRestorePointInTime, DefinitionStages.WithSku, DefinitionStages.WithSourceManagedInstanceId, 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.WithTimezoneId, UpdateStages.WithVCores {
interface Update extends Appliable<ManagedInstance>, Resource.UpdateWithTags<Update>, UpdateStages.WithAdministratorLogin, UpdateStages.WithAdministratorLoginPassword, UpdateStages.WithCollation, UpdateStages.WithDnsZonePartner, UpdateStages.WithInstancePoolId, UpdateStages.WithLicenseType, UpdateStages.WithManagedInstanceCreateMode, UpdateStages.WithProxyOverride, UpdateStages.WithPublicDataEndpointEnabled, UpdateStages.WithRestorePointInTime, UpdateStages.WithSku, UpdateStages.WithSourceManagedInstanceId, UpdateStages.WithStorageSizeInGB, UpdateStages.WithSubnetId, UpdateStages.WithTimezoneId, UpdateStages.WithVCores {
}

/**
Expand Down Expand Up @@ -314,14 +375,34 @@ interface WithDnsZonePartner {
Update withDnsZonePartner(String dnsZonePartner);
}

/**
* The stage of the managedinstance {0} allowing to specify InstancePoolId.
*/
interface WithInstancePoolId {
/**
* Specifies instancePoolId.
*/
Update withInstancePoolId(String instancePoolId);
}

/**
* The stage of the managedinstance {0} allowing to specify LicenseType.
*/
interface WithLicenseType {
/**
* Specifies licenseType.
*/
Update withLicenseType(String licenseType);
Update withLicenseType(ManagedInstanceLicenseType licenseType);
}

/**
* The stage of the managedinstance {0} allowing to specify ManagedInstanceCreateMode.
*/
interface WithManagedInstanceCreateMode {
/**
* Specifies managedInstanceCreateMode.
*/
Update withManagedInstanceCreateMode(ManagedServerCreateMode managedInstanceCreateMode);
}

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

/**
Expand All @@ -344,6 +425,16 @@ interface WithPublicDataEndpointEnabled {
Update withPublicDataEndpointEnabled(Boolean publicDataEndpointEnabled);
}

/**
* The stage of the managedinstance {0} allowing to specify RestorePointInTime.
*/
interface WithRestorePointInTime {
/**
* Specifies restorePointInTime.
*/
Update withRestorePointInTime(DateTime restorePointInTime);
}

/**
* The stage of the managedinstance {0} allowing to specify Sku.
*/
Expand All @@ -354,6 +445,16 @@ interface WithSku {
Update withSku(Sku sku);
}

/**
* The stage of the managedinstance {0} allowing to specify SourceManagedInstanceId.
*/
interface WithSourceManagedInstanceId {
/**
* Specifies sourceManagedInstanceId.
*/
Update withSourceManagedInstanceId(String sourceManagedInstanceId);
}

/**
* The stage of the managedinstance {0} allowing to specify StorageSizeInGB.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/**
* 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 ManagedInstanceLicenseType.
*/
public final class ManagedInstanceLicenseType extends ExpandableStringEnum<ManagedInstanceLicenseType> {
/** Static value LicenseIncluded for ManagedInstanceLicenseType. */
public static final ManagedInstanceLicenseType LICENSE_INCLUDED = fromString("LicenseIncluded");

/** Static value BasePrice for ManagedInstanceLicenseType. */
public static final ManagedInstanceLicenseType BASE_PRICE = fromString("BasePrice");

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

/**
* @return known ManagedInstanceLicenseType values
*/
public static Collection<ManagedInstanceLicenseType> values() {
return values(ManagedInstanceLicenseType.class);
}
}
Loading