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

[ReleasePR sdk/storagecache/mgmt-v2020_03_01] Add async operation's api to storage cache RP #11504

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/storagecache/mgmt-v2020_03_01/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.0</version>
<relativePath>../../parents/azure-arm-parent</relativePath>
<version>1.1.0</version>
<relativePath>../../../pom.management.xml</relativePath>
</parent>
<artifactId>azure-mgmt-storagecache</artifactId>
<version>1.0.0-beta</version>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/**
* 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.storagecache.v2020_03_01;

import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.management.storagecache.v2020_03_01.implementation.AscOperationInner;
import com.microsoft.azure.arm.model.Indexable;
import com.microsoft.azure.arm.model.Refreshable;
import com.microsoft.azure.arm.resources.models.HasManager;
import com.microsoft.azure.management.storagecache.v2020_03_01.implementation.StorageCacheManager;

/**
* Type representing AscOperation.
*/
public interface AscOperation extends HasInner<AscOperationInner>, Indexable, Refreshable<AscOperation>, HasManager<StorageCacheManager> {
/**
* @return the endTime value.
*/
String endTime();

/**
* @return the error value.
*/
ErrorResponse error();

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

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

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

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

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

import rx.Observable;
import com.microsoft.azure.management.storagecache.v2020_03_01.implementation.AscOperationsInner;
import com.microsoft.azure.arm.model.HasInner;

/**
* Type representing AscOperations.
*/
public interface AscOperations extends HasInner<AscOperationsInner> {
/**
* Gets the status of an asynchronous operation for the Azure HPC cache.
*
* @param location The region name which the operation will lookup into.
* @param operationId The operation id which uniquely identifies the asynchronous operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<AscOperation> getAsync(String location, String operationId);

}
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.storagecache.v2020_03_01;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Describes the format of Error response.
*/
public class ErrorResponse {
/**
* Error code.
*/
@JsonProperty(value = "code")
private String code;

/**
* Error message indicating why the operation failed.
*/
@JsonProperty(value = "message")
private String message;

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

/**
* Set error code.
*
* @param code the code value to set
* @return the ErrorResponse object itself.
*/
public ErrorResponse withCode(String code) {
this.code = code;
return this;
}

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

/**
* Set error message indicating why the operation failed.
*
* @param message the message value to set
* @return the ErrorResponse object itself.
*/
public ErrorResponse withMessage(String message) {
this.message = message;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/**
* 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.storagecache.v2020_03_01.implementation;

import com.microsoft.azure.management.storagecache.v2020_03_01.AscOperation;
import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl;
import rx.Observable;
import com.microsoft.azure.management.storagecache.v2020_03_01.ErrorResponse;

class AscOperationImpl extends IndexableRefreshableWrapperImpl<AscOperation, AscOperationInner> implements AscOperation {
private final StorageCacheManager manager;
private String location;
private String operationId;

AscOperationImpl(AscOperationInner inner, StorageCacheManager manager) {
super(null, inner);
this.manager = manager;
// set resource ancestor and positional variables
this.location = IdParsingUtils.getValueFromIdByName(inner.id(), "locations");
this.operationId = IdParsingUtils.getValueFromIdByName(inner.id(), "ascOperations");
}

@Override
public StorageCacheManager manager() {
return this.manager;
}

@Override
protected Observable<AscOperationInner> getInnerAsync() {
AscOperationsInner client = this.manager().inner().ascOperations();
return client.getAsync(this.location, this.operationId);
}



@Override
public String endTime() {
return this.inner().endTime();
}

@Override
public ErrorResponse error() {
return this.inner().error();
}

@Override
public String id() {
return this.inner().id();
}

@Override
public String name() {
return this.inner().name();
}

@Override
public String startTime() {
return this.inner().startTime();
}

@Override
public String status() {
return this.inner().status();
}

}
Loading