Skip to content
Closed
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 @@ -28,7 +28,7 @@ public class Target {

/**
* The digest of the content, as defined by the Registry V2 HTTP API
* Specificiation.
* Specification.
*/
@JsonProperty(value = "digest")
private String digest;
Expand Down Expand Up @@ -98,7 +98,7 @@ public Target withSize(Long size) {
}

/**
* Get the digest of the content, as defined by the Registry V2 HTTP API Specificiation.
* Get the digest of the content, as defined by the Registry V2 HTTP API Specification.
*
* @return the digest value
*/
Expand All @@ -107,7 +107,7 @@ public String digest() {
}

/**
* Set the digest of the content, as defined by the Registry V2 HTTP API Specificiation.
* Set the digest of the content, as defined by the Registry V2 HTTP API Specification.
*
* @param digest the digest value to set
* @return the Target object itself.
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.v2017_10_01;

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 @@ -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
@@ -0,0 +1,71 @@
/**
* 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 java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The network rule set for a container registry.
*/
public class NetworkRuleSet {
/**
* The default action of allow or deny when no other rules match. Possible
* values include: 'Allow', 'Deny'.
*/
@JsonProperty(value = "defaultAction", required = true)
private DefaultAction defaultAction;

/**
* The virtual network rules.
*/
@JsonProperty(value = "virtualNetworkRules")
private List<VirtualNetworkRule> virtualNetworkRules;

/**
* Get the default action of allow or deny when no other rules match. Possible values include: 'Allow', 'Deny'.
*
* @return the defaultAction value
*/
public DefaultAction defaultAction() {
return this.defaultAction;
}

/**
* Set the default action of allow or deny when no other rules match. Possible values include: 'Allow', 'Deny'.
*
* @param defaultAction the defaultAction value to set
* @return the NetworkRuleSet object itself.
*/
public NetworkRuleSet withDefaultAction(DefaultAction defaultAction) {
this.defaultAction = defaultAction;
return this;
}

/**
* Get the virtual network rules.
*
* @return the virtualNetworkRules value
*/
public List<VirtualNetworkRule> virtualNetworkRules() {
return this.virtualNetworkRules;
}

/**
* Set the virtual network rules.
*
* @param virtualNetworkRules the virtualNetworkRules value to set
* @return the NetworkRuleSet object itself.
*/
public NetworkRuleSet withVirtualNetworkRules(List<VirtualNetworkRule> virtualNetworkRules) {
this.virtualNetworkRules = virtualNetworkRules;
return this;
}

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

/**
* @return the networkRuleSet value.
*/
NetworkRuleSet networkRuleSet();

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

/**
* The stage of the registry definition allowing to specify NetworkRuleSet.
*/
interface WithNetworkRuleSet {
/**
* Specifies networkRuleSet.
* @param networkRuleSet The network rule set for a container registry
* @return the next definition stage
*/
WithCreate withNetworkRuleSet(NetworkRuleSet networkRuleSet);
}

/**
* 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.WithNetworkRuleSet, 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.WithNetworkRuleSet, 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 NetworkRuleSet.
*/
interface WithNetworkRuleSet {
/**
* Specifies networkRuleSet.
* @param networkRuleSet The network rule set for a container registry
* @return the next update stage
*/
Update withNetworkRuleSet(NetworkRuleSet networkRuleSet);
}

/**
* The stage of the registry update allowing to specify Sku.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ public class RegistryUpdateParameters {
@JsonProperty(value = "properties.storageAccount")
private StorageAccountProperties storageAccount;

/**
* The network rule set for a container registry.
*/
@JsonProperty(value = "properties.networkRuleSet")
private NetworkRuleSet networkRuleSet;

/**
* Get the tags for the container registry.
*
Expand Down Expand Up @@ -123,4 +129,24 @@ public RegistryUpdateParameters withStorageAccount(StorageAccountProperties stor
return this;
}

/**
* Get the network rule set for a container registry.
*
* @return the networkRuleSet value
*/
public NetworkRuleSet networkRuleSet() {
return this.networkRuleSet;
}

/**
* Set the network rule set for a container registry.
*
* @param networkRuleSet the networkRuleSet value to set
* @return the RegistryUpdateParameters object itself.
*/
public RegistryUpdateParameters withNetworkRuleSet(NetworkRuleSet networkRuleSet) {
this.networkRuleSet = networkRuleSet;
return this;
}

}
Loading