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 containerregistry/resource-manager] [ACR] Auto Build Swagger: Added identity to registry properties #2463

Merged
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 @@ -11,7 +11,7 @@
<parent>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-arm-parent</artifactId>
<version>0.0.3-beta</version>
<version>0.0.2-beta</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<artifactId>azure-mgmt-containerregistry</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion containerregistry/resource-manager/v2017_03_01/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-arm-parent</artifactId>
<version>0.0.3-beta</version>
<version>0.0.2-beta</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<artifactId>azure-mgmt-containerregistry</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-arm-parent</artifactId>
<version>0.0.3-beta</version>
<version>0.0.2-beta</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<artifactId>azure-mgmt-containerregistry</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion containerregistry/resource-manager/v2017_10_01/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-arm-parent</artifactId>
<version>0.0.3-beta</version>
<version>0.0.2-beta</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<artifactId>azure-mgmt-containerregistry</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,17 @@ public class ImportSource {
private String resourceId;

/**
* The address of the source registry.
* The address of the source registry (e.g. 'mcr.microsoft.com').
*/
@JsonProperty(value = "registryUri")
private String registryUri;

/**
* Credentials used when importing from a registry uri.
*/
@JsonProperty(value = "credentials")
private ImportSourceCredentials credentials;

/**
* Repository name of the source image.
* Specify an image by repository ('hello-world'). This will use the
Expand Down Expand Up @@ -58,7 +64,7 @@ public ImportSource withResourceId(String resourceId) {
}

/**
* Get the address of the source registry.
* Get the address of the source registry (e.g. 'mcr.microsoft.com').
*
* @return the registryUri value
*/
Expand All @@ -67,7 +73,7 @@ public String registryUri() {
}

/**
* Set the address of the source registry.
* Set the address of the source registry (e.g. 'mcr.microsoft.com').
*
* @param registryUri the registryUri value to set
* @return the ImportSource object itself.
Expand All @@ -77,6 +83,26 @@ public ImportSource withRegistryUri(String registryUri) {
return this;
}

/**
* Get credentials used when importing from a registry uri.
*
* @return the credentials value
*/
public ImportSourceCredentials credentials() {
return this.credentials;
}

/**
* Set credentials used when importing from a registry uri.
*
* @param credentials the credentials value to set
* @return the ImportSource object itself.
*/
public ImportSource withCredentials(ImportSourceCredentials credentials) {
this.credentials = credentials;
return this;
}

/**
* Get repository name of the source image.
Specify an image by repository ('hello-world'). This will use the 'latest' tag.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/**
* 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.containerregistry.v2017_10_01;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The ImportSourceCredentials model.
*/
public class ImportSourceCredentials {
/**
* The username to authenticate with the source registry.
*/
@JsonProperty(value = "username")
private String username;

/**
* The password used to authenticate with the source registry.
*/
@JsonProperty(value = "password", required = true)
private String password;

/**
* Get the username to authenticate with the source registry.
*
* @return the username value
*/
public String username() {
return this.username;
}

/**
* Set the username to authenticate with the source registry.
*
* @param username the username value to set
* @return the ImportSourceCredentials object itself.
*/
public ImportSourceCredentials withUsername(String username) {
this.username = username;
return this;
}

/**
* Get the password used to authenticate with the source registry.
*
* @return the password value
*/
public String password() {
return this.password;
}

/**
* Set the password used to authenticate with the source registry.
*
* @param password the password value to set
* @return the ImportSourceCredentials object itself.
*/
public ImportSourceCredentials withPassword(String password) {
this.password = password;
return this;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ public interface Registry extends HasInner<RegistryInner>, Resource, GroupableRe
*/
DateTime creationDate();

/**
* @return the identity value.
*/
RegistryIdentity identity();

/**
* @return the loginServer value.
*/
Expand Down Expand Up @@ -106,6 +111,18 @@ interface WithAdminUserEnabled {
WithCreate withAdminUserEnabled(Boolean adminUserEnabled);
}

/**
* The stage of the registry definition allowing to specify Identity.
*/
interface WithIdentity {
/**
* Specifies identity.
* @param identity The identity of the container registry
* @return the next definition stage
*/
WithCreate withIdentity(RegistryIdentity identity);
}

/**
* The stage of the registry definition allowing to specify StorageAccount.
*/
Expand All @@ -123,13 +140,13 @@ interface WithStorageAccount {
* the resource to be created (via {@link WithCreate#create()}), but also allows
* for any other optional settings to be specified.
*/
interface WithCreate extends Creatable<Registry>, Resource.DefinitionWithTags<WithCreate>, DefinitionStages.WithAdminUserEnabled, DefinitionStages.WithStorageAccount {
interface WithCreate extends Creatable<Registry>, Resource.DefinitionWithTags<WithCreate>, DefinitionStages.WithAdminUserEnabled, DefinitionStages.WithIdentity, DefinitionStages.WithStorageAccount {
}
}
/**
* The template for a Registry update operation, containing all the settings that can be modified.
*/
interface Update extends Appliable<Registry>, Resource.UpdateWithTags<Update>, UpdateStages.WithAdminUserEnabled, UpdateStages.WithSku, UpdateStages.WithStorageAccount {
interface Update extends Appliable<Registry>, Resource.UpdateWithTags<Update>, UpdateStages.WithAdminUserEnabled, UpdateStages.WithIdentity, UpdateStages.WithSku, UpdateStages.WithStorageAccount {
}

/**
Expand All @@ -148,6 +165,18 @@ interface WithAdminUserEnabled {
Update withAdminUserEnabled(Boolean adminUserEnabled);
}

/**
* The stage of the registry update allowing to specify Identity.
*/
interface WithIdentity {
/**
* Specifies identity.
* @param identity The identity of the container registry
* @return the next update stage
*/
Update withIdentity(RegistryIdentity identity);
}

/**
* The stage of the registry update allowing to specify Sku.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
/**
* 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.containerregistry.v2017_10_01;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The identity of the container registry.
*/
public class RegistryIdentity {
/**
* The type of identity used for the registry.
*/
@JsonProperty(value = "type")
private String type;

/**
* The principal ID of registry identity.
*/
@JsonProperty(value = "principalId")
private String principalId;

/**
* The tenant ID associated with the registry.
*/
@JsonProperty(value = "tenantId")
private String tenantId;

/**
* Get the type of identity used for the registry.
*
* @return the type value
*/
public String type() {
return this.type;
}

/**
* Set the type of identity used for the registry.
*
* @param type the type value to set
* @return the RegistryIdentity object itself.
*/
public RegistryIdentity withType(String type) {
this.type = type;
return this;
}

/**
* Get the principal ID of registry identity.
*
* @return the principalId value
*/
public String principalId() {
return this.principalId;
}

/**
* Set the principal ID of registry identity.
*
* @param principalId the principalId value to set
* @return the RegistryIdentity object itself.
*/
public RegistryIdentity withPrincipalId(String principalId) {
this.principalId = principalId;
return this;
}

/**
* Get the tenant ID associated with the registry.
*
* @return the tenantId value
*/
public String tenantId() {
return this.tenantId;
}

/**
* Set the tenant ID associated with the registry.
*
* @param tenantId the tenantId value to set
* @return the RegistryIdentity object itself.
*/
public RegistryIdentity withTenantId(String tenantId) {
this.tenantId = tenantId;
return this;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ public class RegistryUpdateParameters {
@JsonProperty(value = "sku")
private Sku sku;

/**
* The identity of the container registry.
*/
@JsonProperty(value = "identity")
private RegistryIdentity identity;

/**
* The value that indicates whether the admin user is enabled.
*/
Expand Down Expand Up @@ -83,6 +89,26 @@ public RegistryUpdateParameters withSku(Sku sku) {
return this;
}

/**
* Get the identity of the container registry.
*
* @return the identity value
*/
public RegistryIdentity identity() {
return this.identity;
}

/**
* Set the identity of the container registry.
*
* @param identity the identity value to set
* @return the RegistryUpdateParameters object itself.
*/
public RegistryUpdateParameters withIdentity(RegistryIdentity identity) {
this.identity = identity;
return this;
}

/**
* Get the value that indicates whether the admin user is enabled.
*
Expand Down
Loading