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/resources/mgmt-v2019_05_01] Add missing properties for Application and ApplicationDefinition #177

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/resources/mgmt-v2019_05_01/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
<parent>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-arm-parent</artifactId>
<version>1.2.0</version>
<version>1.1.0</version>
<relativePath>../../../pom.management.xml</relativePath>
</parent>
<artifactId>azure-mgmt-resources</artifactId>
<version>1.0.0-beta-1</version>
<version>1.0.0-beta</version>
<packaging>jar</packaging>
<name>Microsoft Azure SDK for Resources Management</name>
<description>This package contains Microsoft Resources Management SDK.</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public interface DeploymentExtended extends HasInner<DeploymentExtendedInner>, I
/**
* The entirety of the DeploymentExtended definition.
*/
interface Definition extends DefinitionStages.Blank, DefinitionStages.WithMicrosoftResource, DefinitionStages.WithProperties, DefinitionStages.WithCreate {
interface Definition extends DefinitionStages.Blank, DefinitionStages.WithMicrosoft.Resource, DefinitionStages.WithProperties, DefinitionStages.WithCreate {
}

/**
Expand All @@ -59,19 +59,19 @@ interface DefinitionStages {
/**
* The first stage of a DeploymentExtended definition.
*/
interface Blank extends WithMicrosoftResource {
interface Blank extends WithMicrosoft.Resource {
}

/**
* The stage of the deploymentextended definition allowing to specify Microsoft.Resource.
*/
interface WithMicrosoftResource {
interface WithMicrosoft.Resource {
/**
* Specifies groupId.
* @param groupId The management group ID
* @return the next definition stage
*/
WithProperties withExistingMicrosoftResource(String groupId);
WithProperties withExistingMicrosoft.Resource(String groupId);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,21 @@

package com.microsoft.azure.management.resources.v2019_05_01;

import com.microsoft.azure.arm.collection.SupportsCreating;
import rx.Completable;
import rx.Observable;
import com.microsoft.azure.management.resources.v2019_05_01.implementation.DeploymentInner;
import com.microsoft.azure.management.resources.v2019_05_01.implementation.DeploymentsInner;
import com.microsoft.azure.arm.model.HasInner;

/**
* Type representing Deployments.
*/
public interface Deployments extends SupportsCreating<DeploymentExtended.DefinitionStages.Blank>, HasInner<DeploymentsInner> {
public interface Deployments {
/**
* Begins definition for a new Deployment resource.
* @param name resource name.
* @return the first stage of the new Deployment definition.
*/
DeploymentExtended.DefinitionStages.Blank defineDeployment(String name);

/**
* Deletes a deployment from the deployment history.
* A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.
Expand Down Expand Up @@ -251,4 +255,13 @@ public interface Deployments extends SupportsCreating<DeploymentExtended.Definit
*/
Observable<DeploymentExtended> listByResourceGroupAsync(final String resourceGroupName);

/**
* Calculate the hash of the given template.
*
* @param template The template provided to calculate hash.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<TemplateHashResult> calculateTemplateHashAsync(Object template);

}
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.resources.v2019_05_01;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The resource management error additional info.
*/
public class ErrorAdditionalInfo {
/**
* The additional info type.
*/
@JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
private String type;

/**
* The additional info.
*/
@JsonProperty(value = "info", access = JsonProperty.Access.WRITE_ONLY)
private Object info;

/**
* Get the additional info type.
*
* @return the type value
*/
public String type() {
return this.type;
}

/**
* Get the additional info.
*
* @return the info value
*/
public Object info() {
return this.info;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
/**
* 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.resources.v2019_05_01;

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

/**
* The resource management error response.
*/
public class ErrorResponse {
/**
* The error code.
*/
@JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY)
private String code;

/**
* The error message.
*/
@JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY)
private String message;

/**
* The error target.
*/
@JsonProperty(value = "target", access = JsonProperty.Access.WRITE_ONLY)
private String target;

/**
* The error details.
*/
@JsonProperty(value = "details", access = JsonProperty.Access.WRITE_ONLY)
private List<ErrorResponse> details;

/**
* The error additional info.
*/
@JsonProperty(value = "additionalInfo", access = JsonProperty.Access.WRITE_ONLY)
private List<ErrorAdditionalInfo> additionalInfo;

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

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

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

/**
* Get the error details.
*
* @return the details value
*/
public List<ErrorResponse> details() {
return this.details;
}

/**
* Get the error additional info.
*
* @return the additionalInfo value
*/
public List<ErrorAdditionalInfo> additionalInfo() {
return this.additionalInfo;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/**
* 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.resources.v2019_05_01;

import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.arm.resources.models.HasManager;
import com.microsoft.azure.management.resources.v2019_05_01.implementation.ResourcesManager;
import com.microsoft.azure.management.resources.v2019_05_01.implementation.TemplateHashResultInner;

/**
* Type representing TemplateHashResult.
*/
public interface TemplateHashResult extends HasInner<TemplateHashResultInner>, HasManager<ResourcesManager> {
/**
* @return the minifiedTemplate value.
*/
String minifiedTemplate();

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

}
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public String type() {
}

@Override
public DeploymentExtendedImpl withExistingMicrosoftResource(String groupId) {
public DeploymentExtendedImpl withExistingMicrosoft.Resource(String groupId) {
this.groupId = groupId;
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*
* abc
*/

package com.microsoft.azure.management.resources.v2019_05_01.implementation;
Expand All @@ -18,6 +18,7 @@
import com.microsoft.azure.management.resources.v2019_05_01.DeploymentExtended;
import com.microsoft.azure.management.resources.v2019_05_01.DeploymentValidateResult;
import com.microsoft.azure.management.resources.v2019_05_01.DeploymentExportResult;
import com.microsoft.azure.management.resources.v2019_05_01.TemplateHashResult;

class DeploymentsImpl extends WrapperImpl<DeploymentsInner> implements Deployments {
private final ResourcesManager manager;
Expand All @@ -32,16 +33,16 @@ public ResourcesManager manager() {
}

@Override
public DeploymentExtendedImpl define(String name) {
return wrapModel(name);
public DeploymentExtendedImpl defineDeployment(String name) {
return wrapDeploymentModel(name);
}

private DeploymentExtendedImpl wrapModel(DeploymentExtendedInner inner) {
return new DeploymentExtendedImpl(inner, manager());
private DeploymentExtendedImpl wrapDeploymentModel(String name) {
return new DeploymentExtendedImpl(name, this.manager());
}

private DeploymentExtendedImpl wrapModel(String name) {
return new DeploymentExtendedImpl(name, this.manager());
private DeploymentExtendedImpl wrapDeploymentExtendedModel(DeploymentExtendedInner inner) {
return new DeploymentExtendedImpl(inner, manager());
}

@Override
Expand Down Expand Up @@ -284,4 +285,16 @@ public DeploymentExtended call(DeploymentExtendedInner inner) {
});
}

@Override
public Observable<TemplateHashResult> calculateTemplateHashAsync(Object template) {
DeploymentsInner client = this.inner();
return client.calculateTemplateHashAsync(template)
.map(new Func1<TemplateHashResultInner, TemplateHashResult>() {
@Override
public TemplateHashResult call(TemplateHashResultInner inner) {
return new TemplateHashResultImpl(inner, manager());
}
});
}

}
Loading