Skip to content

Commit

Permalink
Mgmt generate (#13798)
Browse files Browse the repository at this point in the history
* generate cdn

* update pom
  • Loading branch information
ChenTanyi authored Aug 5, 2020
1 parent fc67d34 commit d8d14b8
Show file tree
Hide file tree
Showing 16 changed files with 184 additions and 174 deletions.
2 changes: 1 addition & 1 deletion sdk/cdn/mgmt-v2020_04_15/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<relativePath>../../parents/azure-arm-parent/pom.xml</relativePath>
</parent>
<artifactId>azure-mgmt-cdn</artifactId>
<version>1.0.0-beta</version>
<version>1.0.0-beta-1</version>
<packaging>jar</packaging>
<name>Microsoft Azure SDK for Cdn Management</name>
<description>This package contains Microsoft Cdn Management SDK.</description>
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 @@ -19,6 +19,7 @@
@JsonTypeName("DeliveryRuleAction")
@JsonSubTypes({
@JsonSubTypes.Type(name = "UrlRedirect", value = UrlRedirectAction.class),
@JsonSubTypes.Type(name = "UrlSigning", value = UrlSigningAction.class),
@JsonSubTypes.Type(name = "UrlRewrite", value = UrlRewriteAction.class),
@JsonSubTypes.Type(name = "ModifyRequestHeader", value = DeliveryRuleRequestHeaderAction.class),
@JsonSubTypes.Type(name = "ModifyResponseHeader", value = DeliveryRuleResponseHeaderAction.class),
Expand Down
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
@@ -0,0 +1,47 @@
/**
* 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 com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;

/**
* Defines the url signing action for the delivery rule.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "name", defaultImpl = UrlSigningAction.class)
@JsonTypeName("UrlSigning")
public class UrlSigningAction extends DeliveryRuleAction {
/**
* Defines the parameters for the action.
*/
@JsonProperty(value = "parameters", required = true)
private UrlSigningActionParameters parameters;

/**
* Get defines the parameters for the action.
*
* @return the parameters value
*/
public UrlSigningActionParameters parameters() {
return this.parameters;
}

/**
* Set defines the parameters for the action.
*
* @param parameters the parameters value to set
* @return the UrlSigningAction object itself.
*/
public UrlSigningAction withParameters(UrlSigningActionParameters parameters) {
this.parameters = parameters;
return this;
}

}
Loading

0 comments on commit d8d14b8

Please sign in to comment.