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 sdk/containerregistry/mgmt-v2018_02_01_preview] [ACR] New API version 2020-11-01-preview: AZ and On-Prem support #5384

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
6 changes: 4 additions & 2 deletions sdk/containerregistry/mgmt-v2018_02_01_preview/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<parent>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-arm-parent</artifactId>
<version>1.2.0</version>
<relativePath>../../parents/azure-arm-parent</relativePath>
<version>1.1.0</version>
<relativePath>../../../pom.management.xml</relativePath>
</parent>
<artifactId>azure-mgmt-containerregistry</artifactId>
<version>1.0.0-beta</version>
Expand Down Expand Up @@ -71,6 +71,8 @@
<artifactId>azure-arm-client-runtime</artifactId>
<type>test-jar</type>
<scope>test</scope>
<!--Below version for test jar needs to be removed, this will be done as part of v1-runtime 1.6.7-->
<version>1.6.5</version>
</dependency>
</dependencies>
<build>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/**
* 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.v2018_02_01_preview;

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

/**
* Defines values for Action.
*/
public final class Action extends ExpandableStringEnum<Action> {
/** Static value Allow for Action. */
public static final Action ALLOW = fromString("Allow");

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

/**
* @return known Action values
*/
public static Collection<Action> values() {
return values(Action.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* Base properties for any build step.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = BuildStepProperties.class)
@JsonTypeName("BuildStepProperties")
@JsonSubTypes({
@JsonSubTypes.Type(name = "Docker", value = DockerBuildStep.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/**
* The properties for updating a build step.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = BuildStepPropertiesUpdateParameters.class)
@JsonTypeName("BuildStepPropertiesUpdateParameters")
@JsonSubTypes({
@JsonSubTypes.Type(name = "Docker", value = DockerBuildStepUpdateParameters.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/**
* The queue build parameters based on a build task.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = BuildTaskBuildRequest.class)
@JsonTypeName("BuildTask")
public class BuildTaskBuildRequest extends QueueBuildRequest {
/**
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.containerregistry.v2018_02_01_preview;

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

/**
* Defines values for DefaultAction.
*/
public final class DefaultAction extends ExpandableStringEnum<DefaultAction> {
/** Static value Allow for DefaultAction. */
public static final DefaultAction ALLOW = fromString("Allow");

/** Static value Deny for DefaultAction. */
public static final DefaultAction DENY = fromString("Deny");

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

/**
* @return known DefaultAction values
*/
public static Collection<DefaultAction> values() {
return values(DefaultAction.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/**
* The Docker build step.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = DockerBuildStep.class)
@JsonTypeName("Docker")
public class DockerBuildStep extends BuildStepProperties {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/**
* The properties for updating a docker build step.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = DockerBuildStepUpdateParameters.class)
@JsonTypeName("Docker")
public class DockerBuildStepUpdateParameters extends BuildStepPropertiesUpdateParameters {
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/**
* 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.v2018_02_01_preview;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* IP rule with specific IP or IP range in CIDR format.
*/
public class IPRule {
/**
* The action of IP ACL rule. Possible values include: 'Allow'.
*/
@JsonProperty(value = "action")
private Action action;

/**
* Specifies the IP or IP range in CIDR format. Only IPV4 address is
* allowed.
*/
@JsonProperty(value = "value", required = true)
private String iPAddressOrRange;

/**
* Get the action of IP ACL rule. Possible values include: 'Allow'.
*
* @return the action value
*/
public Action action() {
return this.action;
}

/**
* Set the action of IP ACL rule. Possible values include: 'Allow'.
*
* @param action the action value to set
* @return the IPRule object itself.
*/
public IPRule withAction(Action action) {
this.action = action;
return this;
}

/**
* Get specifies the IP or IP range in CIDR format. Only IPV4 address is allowed.
*
* @return the iPAddressOrRange value
*/
public String iPAddressOrRange() {
return this.iPAddressOrRange;
}

/**
* Set specifies the IP or IP range in CIDR format. Only IPV4 address is allowed.
*
* @param iPAddressOrRange the iPAddressOrRange value to set
* @return the IPRule object itself.
*/
public IPRule withIPAddressOrRange(String iPAddressOrRange) {
this.iPAddressOrRange = iPAddressOrRange;
return this;
}

}
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.v2018_02_01_preview;

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;
}

}
Loading