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/cdn/mgmt-v2020_04_15] Make origin a ProxyResource instead of TrackedResource #3458

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
4 changes: 2 additions & 2 deletions sdk/cdn/mgmt-v2020_04_15/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.3.2</version>
<relativePath>../../parents/azure-arm-parent/pom.xml</relativePath>
<version>1.1.0</version>
<relativePath>../../../pom.management.xml</relativePath>
</parent>
<artifactId>azure-mgmt-cdn</artifactId>
<version>1.0.0-beta</version>
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.cdn.v2020_04_15;

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

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

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

/**
* @return known Algorithm values
*/
public static Collection<Algorithm> values() {
return values(Algorithm.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public interface Endpoint extends HasInner<EndpointInner>, Indexable, Refreshabl
/**
* @return the urlSigningKeys value.
*/
UrlSigningKey urlSigningKeys();
List<UrlSigningKey> urlSigningKeys();

/**
* @return the webApplicationFirewallPolicyLink value.
Expand Down Expand Up @@ -374,7 +374,7 @@ interface WithUrlSigningKeys {
* @param urlSigningKeys List of keys used to validate the signed URL hashes
* @return the next definition stage
*/
WithCreate withUrlSigningKeys(UrlSigningKey urlSigningKeys);
WithCreate withUrlSigningKeys(List<UrlSigningKey> urlSigningKeys);
}

/**
Expand Down Expand Up @@ -572,7 +572,7 @@ interface WithUrlSigningKeys {
* @param urlSigningKeys List of keys used to validate the signed URL hashes
* @return the next update stage
*/
Update withUrlSigningKeys(UrlSigningKey urlSigningKeys);
Update withUrlSigningKeys(List<UrlSigningKey> urlSigningKeys);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public class EndpointUpdateParameters {
* List of keys used to validate the signed URL hashes.
*/
@JsonProperty(value = "properties.urlSigningKeys")
private UrlSigningKey urlSigningKeys;
private List<UrlSigningKey> urlSigningKeys;

/**
* A policy that specifies the delivery rules to be used for an endpoint.
Expand Down Expand Up @@ -381,7 +381,7 @@ public EndpointUpdateParameters withDefaultOriginGroup(ResourceReference default
*
* @return the urlSigningKeys value
*/
public UrlSigningKey urlSigningKeys() {
public List<UrlSigningKey> urlSigningKeys() {
return this.urlSigningKeys;
}

Expand All @@ -391,7 +391,7 @@ public UrlSigningKey urlSigningKeys() {
* @param urlSigningKeys the urlSigningKeys value to set
* @return the EndpointUpdateParameters object itself.
*/
public EndpointUpdateParameters withUrlSigningKeys(UrlSigningKey urlSigningKeys) {
public EndpointUpdateParameters withUrlSigningKeys(List<UrlSigningKey> urlSigningKeys) {
this.urlSigningKeys = urlSigningKeys;
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import com.microsoft.azure.arm.model.Creatable;
import com.microsoft.azure.arm.resources.models.HasManager;
import com.microsoft.azure.management.cdn.v2020_04_15.implementation.CdnManager;
import java.util.Map;

/**
* Type representing Origin.
Expand Down Expand Up @@ -48,11 +47,6 @@ public interface Origin extends HasInner<OriginInner>, Indexable, Refreshable<Or
*/
String id();

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

/**
* @return the name value.
*/
Expand Down Expand Up @@ -103,11 +97,6 @@ public interface Origin extends HasInner<OriginInner>, Indexable, Refreshable<Or
*/
OriginResourceState resourceState();

/**
* @return the tags value.
*/
Map<String, String> tags();

/**
* @return the type value.
*/
Expand All @@ -121,7 +110,7 @@ public interface Origin extends HasInner<OriginInner>, Indexable, Refreshable<Or
/**
* The entirety of the Origin definition.
*/
interface Definition extends DefinitionStages.Blank, DefinitionStages.WithEndpoint, DefinitionStages.WithLocation, DefinitionStages.WithCreate {
interface Definition extends DefinitionStages.Blank, DefinitionStages.WithEndpoint, DefinitionStages.WithCreate {
}

/**
Expand All @@ -145,19 +134,7 @@ interface WithEndpoint {
* @param endpointName Name of the endpoint under the profile which is unique globally
* @return the next definition stage
*/
WithLocation withExistingEndpoint(String resourceGroupName, String profileName, String endpointName);
}

/**
* The stage of the origin definition allowing to specify Location.
*/
interface WithLocation {
/**
* Specifies location.
* @param location Resource location
* @return the next definition stage
*/
WithCreate withLocation(String location);
WithCreate withExistingEndpoint(String resourceGroupName, String profileName, String endpointName);
}

/**
Expand Down Expand Up @@ -280,18 +257,6 @@ interface WithPrivateLinkResourceId {
WithCreate withPrivateLinkResourceId(String privateLinkResourceId);
}

/**
* The stage of the origin definition allowing to specify Tags.
*/
interface WithTags {
/**
* Specifies tags.
* @param tags Resource tags
* @return the next definition stage
*/
WithCreate withTags(Map<String, String> tags);
}

/**
* The stage of the origin definition allowing to specify Weight.
*/
Expand All @@ -309,13 +274,13 @@ interface WithWeight {
* the resource to be created (via {@link WithCreate#create()}), but also allows
* for any other optional settings to be specified.
*/
interface WithCreate extends Creatable<Origin>, DefinitionStages.WithEnabled, DefinitionStages.WithHostName, DefinitionStages.WithHttpPort, DefinitionStages.WithHttpsPort, DefinitionStages.WithOriginHostHeader, DefinitionStages.WithPriority, DefinitionStages.WithPrivateLinkAlias, DefinitionStages.WithPrivateLinkApprovalMessage, DefinitionStages.WithPrivateLinkLocation, DefinitionStages.WithPrivateLinkResourceId, DefinitionStages.WithTags, DefinitionStages.WithWeight {
interface WithCreate extends Creatable<Origin>, DefinitionStages.WithEnabled, DefinitionStages.WithHostName, DefinitionStages.WithHttpPort, DefinitionStages.WithHttpsPort, DefinitionStages.WithOriginHostHeader, DefinitionStages.WithPriority, DefinitionStages.WithPrivateLinkAlias, DefinitionStages.WithPrivateLinkApprovalMessage, DefinitionStages.WithPrivateLinkLocation, DefinitionStages.WithPrivateLinkResourceId, DefinitionStages.WithWeight {
}
}
/**
* The template for a Origin update operation, containing all the settings that can be modified.
*/
interface Update extends Appliable<Origin>, UpdateStages.WithEnabled, UpdateStages.WithHostName, UpdateStages.WithHttpPort, UpdateStages.WithHttpsPort, UpdateStages.WithOriginHostHeader, UpdateStages.WithPriority, UpdateStages.WithPrivateLinkAlias, UpdateStages.WithPrivateLinkApprovalMessage, UpdateStages.WithPrivateLinkLocation, UpdateStages.WithPrivateLinkResourceId, UpdateStages.WithTags, UpdateStages.WithWeight {
interface Update extends Appliable<Origin>, UpdateStages.WithEnabled, UpdateStages.WithHostName, UpdateStages.WithHttpPort, UpdateStages.WithHttpsPort, UpdateStages.WithOriginHostHeader, UpdateStages.WithPriority, UpdateStages.WithPrivateLinkAlias, UpdateStages.WithPrivateLinkApprovalMessage, UpdateStages.WithPrivateLinkLocation, UpdateStages.WithPrivateLinkResourceId, UpdateStages.WithWeight {
}

/**
Expand Down Expand Up @@ -442,18 +407,6 @@ interface WithPrivateLinkResourceId {
Update withPrivateLinkResourceId(String privateLinkResourceId);
}

/**
* The stage of the origin update allowing to specify Tags.
*/
interface WithTags {
/**
* Specifies tags.
* @param tags Origin tags
* @return the next update stage
*/
Update withTags(Map<String, String> tags);
}

/**
* The stage of the origin update allowing to specify Weight.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

package com.microsoft.azure.management.cdn.v2020_04_15;

import java.util.Map;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.microsoft.rest.serializer.JsonFlatten;

Expand All @@ -17,12 +16,6 @@
*/
@JsonFlatten
public class OriginUpdateParameters {
/**
* Origin tags.
*/
@JsonProperty(value = "tags")
private Map<String, String> tags;

/**
* The address of the origin. Domain names, IPv4 addresses, and IPv6
* addresses are supported.This should be unique across all origins in an
Expand Down Expand Up @@ -102,26 +95,6 @@ public class OriginUpdateParameters {
@JsonProperty(value = "properties.privateLinkApprovalMessage")
private String privateLinkApprovalMessage;

/**
* Get origin tags.
*
* @return the tags value
*/
public Map<String, String> tags() {
return this.tags;
}

/**
* Set origin tags.
*
* @param tags the tags value to set
* @return the OriginUpdateParameters object itself.
*/
public OriginUpdateParameters withTags(Map<String, String> tags) {
this.tags = tags;
return this;
}

/**
* Get the address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint.
*
Expand Down
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.cdn.v2020_04_15;

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

/**
* Defines values for ParamIndicator.
*/
public final class ParamIndicator extends ExpandableStringEnum<ParamIndicator> {
/** Static value expires for ParamIndicator. */
public static final ParamIndicator EXPIRES = fromString("expires");

/** Static value keyId for ParamIndicator. */
public static final ParamIndicator KEY_ID = fromString("keyId");

/** Static value signature for ParamIndicator. */
public static final ParamIndicator SIGNATURE = fromString("signature");

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

/**
* @return known ParamIndicator values
*/
public static Collection<ParamIndicator> values() {
return values(ParamIndicator.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
* Defines the parameters for the Url Signing action.
*/
public class UrlSigningActionParameters {
/**
* Possible values include:
* '#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlSigningActionParameters'.
*/
@JsonProperty(value = "@odata\\.type")
private String odatatype;

/**
* Id reference of the key to be used to verify the hash and should be
* defined in UrlSigningKeys.
Expand All @@ -26,7 +33,7 @@ public class UrlSigningActionParameters {
* Algorithm to use for URL signing. Possible values include: 'SHA256'.
*/
@JsonProperty(value = "algorithm")
private String algorithm;
private Algorithm algorithm;

/**
* Defines which query string parameters in the url to be considered for
Expand All @@ -42,6 +49,26 @@ public class UrlSigningActionParameters {
@JsonProperty(value = "ipSubnets")
private List<String> ipSubnets;

/**
* Get possible values include: '#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlSigningActionParameters'.
*
* @return the odatatype value
*/
public String odatatype() {
return this.odatatype;
}

/**
* Set possible values include: '#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlSigningActionParameters'.
*
* @param odatatype the odatatype value to set
* @return the UrlSigningActionParameters object itself.
*/
public UrlSigningActionParameters withOdatatype(String odatatype) {
this.odatatype = odatatype;
return this;
}

/**
* Get id reference of the key to be used to verify the hash and should be defined in UrlSigningKeys.
*
Expand All @@ -67,7 +94,7 @@ public UrlSigningActionParameters withKeyId(String keyId) {
*
* @return the algorithm value
*/
public String algorithm() {
public Algorithm algorithm() {
return this.algorithm;
}

Expand All @@ -77,7 +104,7 @@ public String algorithm() {
* @param algorithm the algorithm value to set
* @return the UrlSigningActionParameters object itself.
*/
public UrlSigningActionParameters withAlgorithm(String algorithm) {
public UrlSigningActionParameters withAlgorithm(Algorithm algorithm) {
this.algorithm = algorithm;
return this;
}
Expand Down
Loading