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] add option to import images from public registries #2316

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 @@ -15,11 +15,17 @@
*/
public class ImportSource {
/**
* The resource identifier of the target Azure Container Registry.
* The resource identifier of the source Azure Container Registry.
*/
@JsonProperty(value = "resourceId", required = true)
@JsonProperty(value = "resourceId")
private String resourceId;

/**
* The address of the source registry.
*/
@JsonProperty(value = "registryUri")
private String registryUri;

/**
* Repository name of the source image.
* Specify an image by repository ('hello-world'). This will use the
Expand All @@ -32,7 +38,7 @@ public class ImportSource {
private String sourceImage;

/**
* Get the resource identifier of the target Azure Container Registry.
* Get the resource identifier of the source Azure Container Registry.
*
* @return the resourceId value
*/
Expand All @@ -41,7 +47,7 @@ public String resourceId() {
}

/**
* Set the resource identifier of the target Azure Container Registry.
* Set the resource identifier of the source Azure Container Registry.
*
* @param resourceId the resourceId value to set
* @return the ImportSource object itself.
Expand All @@ -51,6 +57,26 @@ public ImportSource withResourceId(String resourceId) {
return this;
}

/**
* Get the address of the source registry.
*
* @return the registryUri value
*/
public String registryUri() {
return this.registryUri;
}

/**
* Set the address of the source registry.
*
* @param registryUri the registryUri value to set
* @return the ImportSource object itself.
*/
public ImportSource withRegistryUri(String registryUri) {
this.registryUri = registryUri;
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
Expand Up @@ -27,4 +27,14 @@ public interface OperationDefinition extends HasInner<OperationDefinitionInner>,
*/
String name();

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

/**
* @return the serviceSpecification value.
*/
OperationServiceSpecificationDefinition serviceSpecification();

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
/**
* 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 definition of Azure Monitoring metric.
*/
public class OperationMetricSpecificationDefinition {
/**
* Metric name.
*/
@JsonProperty(value = "name")
private String name;

/**
* Metric display name.
*/
@JsonProperty(value = "displayName")
private String displayName;

/**
* Metric description.
*/
@JsonProperty(value = "displayDescription")
private String displayDescription;

/**
* Metric unit.
*/
@JsonProperty(value = "unit")
private String unit;

/**
* Metric aggregation type.
*/
@JsonProperty(value = "aggregationType")
private String aggregationType;

/**
* Internal metric name.
*/
@JsonProperty(value = "internalMetricName")
private String internalMetricName;

/**
* Get metric name.
*
* @return the name value
*/
public String name() {
return this.name;
}

/**
* Set metric name.
*
* @param name the name value to set
* @return the OperationMetricSpecificationDefinition object itself.
*/
public OperationMetricSpecificationDefinition withName(String name) {
this.name = name;
return this;
}

/**
* Get metric display name.
*
* @return the displayName value
*/
public String displayName() {
return this.displayName;
}

/**
* Set metric display name.
*
* @param displayName the displayName value to set
* @return the OperationMetricSpecificationDefinition object itself.
*/
public OperationMetricSpecificationDefinition withDisplayName(String displayName) {
this.displayName = displayName;
return this;
}

/**
* Get metric description.
*
* @return the displayDescription value
*/
public String displayDescription() {
return this.displayDescription;
}

/**
* Set metric description.
*
* @param displayDescription the displayDescription value to set
* @return the OperationMetricSpecificationDefinition object itself.
*/
public OperationMetricSpecificationDefinition withDisplayDescription(String displayDescription) {
this.displayDescription = displayDescription;
return this;
}

/**
* Get metric unit.
*
* @return the unit value
*/
public String unit() {
return this.unit;
}

/**
* Set metric unit.
*
* @param unit the unit value to set
* @return the OperationMetricSpecificationDefinition object itself.
*/
public OperationMetricSpecificationDefinition withUnit(String unit) {
this.unit = unit;
return this;
}

/**
* Get metric aggregation type.
*
* @return the aggregationType value
*/
public String aggregationType() {
return this.aggregationType;
}

/**
* Set metric aggregation type.
*
* @param aggregationType the aggregationType value to set
* @return the OperationMetricSpecificationDefinition object itself.
*/
public OperationMetricSpecificationDefinition withAggregationType(String aggregationType) {
this.aggregationType = aggregationType;
return this;
}

/**
* Get internal metric name.
*
* @return the internalMetricName value
*/
public String internalMetricName() {
return this.internalMetricName;
}

/**
* Set internal metric name.
*
* @param internalMetricName the internalMetricName value to set
* @return the OperationMetricSpecificationDefinition object itself.
*/
public OperationMetricSpecificationDefinition withInternalMetricName(String internalMetricName) {
this.internalMetricName = internalMetricName;
return this;
}

}
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.containerregistry.v2017_10_01;

import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The definition of Azure Monitoring metrics list.
*/
public class OperationServiceSpecificationDefinition {
/**
* A list of Azure Monitoring metrics definition.
*/
@JsonProperty(value = "metricSpecifications")
private List<OperationMetricSpecificationDefinition> metricSpecifications;

/**
* Get a list of Azure Monitoring metrics definition.
*
* @return the metricSpecifications value
*/
public List<OperationMetricSpecificationDefinition> metricSpecifications() {
return this.metricSpecifications;
}

/**
* Set a list of Azure Monitoring metrics definition.
*
* @param metricSpecifications the metricSpecifications value to set
* @return the OperationServiceSpecificationDefinition object itself.
*/
public OperationServiceSpecificationDefinition withMetricSpecifications(List<OperationMetricSpecificationDefinition> metricSpecifications) {
this.metricSpecifications = metricSpecifications;
return this;
}

}
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 PolicyStatus.
*/
public final class PolicyStatus extends ExpandableStringEnum<PolicyStatus> {
/** Static value enabled for PolicyStatus. */
public static final PolicyStatus ENABLED = fromString("enabled");

/** Static value disabled for PolicyStatus. */
public static final PolicyStatus DISABLED = fromString("disabled");

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

/**
* @return known PolicyStatus values
*/
public static Collection<PolicyStatus> values() {
return values(PolicyStatus.class);
}
}
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.containerregistry.v2017_10_01;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* An object that represents quarantine policy for a container registry.
*/
public class QuarantinePolicy {
/**
* The value that indicates whether the policy is enabled or not. Possible
* values include: 'enabled', 'disabled'.
*/
@JsonProperty(value = "status")
private PolicyStatus status;

/**
* Get the value that indicates whether the policy is enabled or not. Possible values include: 'enabled', 'disabled'.
*
* @return the status value
*/
public PolicyStatus status() {
return this.status;
}

/**
* Set the value that indicates whether the policy is enabled or not. Possible values include: 'enabled', 'disabled'.
*
* @param status the status value to set
* @return the QuarantinePolicy object itself.
*/
public QuarantinePolicy withStatus(PolicyStatus status) {
this.status = status;
return this;
}

}
Loading