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 reservations/resource-manager] Reservations 2018-06-01 specs #204

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
@@ -0,0 +1,70 @@
/**
* 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.reservations;

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

/**
* The AppliedReservationList model.
*/
public class AppliedReservationList {
/**
* The value property.
*/
@JsonProperty(value = "value")
private List<String> value;

/**
* Url to get the next page of reservations.
*/
@JsonProperty(value = "nextLink")
private String nextLink;

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

/**
* Set the value value.
*
* @param value the value value to set
* @return the AppliedReservationList object itself.
*/
public AppliedReservationList withValue(List<String> value) {
this.value = value;
return this;
}

/**
* Get url to get the next page of reservations.
*
* @return the nextLink value
*/
public String nextLink() {
return this.nextLink;
}

/**
* Set url to get the next page of reservations.
*
* @param nextLink the nextLink value to set
* @return the AppliedReservationList object itself.
*/
public AppliedReservationList withNextLink(String nextLink) {
this.nextLink = nextLink;
return this;
}

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

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The Error model.
*/
public class Error {
/**
* The error property.
*/
@JsonProperty(value = "error")
private ExtendedErrorInfo error;

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

/**
* Set the error value.
*
* @param error the error value to set
* @return the Error object itself.
*/
public Error withError(ExtendedErrorInfo error) {
this.error = error;
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.reservations;

import com.microsoft.rest.RestException;
import okhttp3.ResponseBody;
import retrofit2.Response;

/**
* Exception thrown for an invalid response with Error information.
*/
public class ErrorException extends RestException {
/**
* Initializes a new instance of the ErrorException class.
*
* @param message the exception message or the response content if a message is not available
* @param response the HTTP response
*/
public ErrorException(final String message, final Response<ResponseBody> response) {
super(message, response);
}

/**
* Initializes a new instance of the ErrorException class.
*
* @param message the exception message or the response content if a message is not available
* @param response the HTTP response
* @param body the deserialized response body
*/
public ErrorException(final String message, final Response<ResponseBody> response, final Error body) {
super(message, response, body);
}

@Override
public Error body() {
return (Error) super.body();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
/**
* 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.reservations;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The ExtendedErrorInfo model.
*/
public class ExtendedErrorInfo {
/**
* Possible values include: 'NotSpecified', 'InternalServerError',
* 'ServerTimeout', 'AuthorizationFailed', 'BadRequest',
* 'ClientCertificateThumbprintNotSet', 'InvalidRequestContent',
* 'OperationFailed', 'HttpMethodNotSupported', 'InvalidRequestUri',
* 'MissingTenantId', 'InvalidTenantId', 'InvalidReservationOrderId',
* 'InvalidReservationId', 'ReservationIdNotInReservationOrder',
* 'ReservationOrderNotFound', 'InvalidSubscriptionId',
* 'InvalidAccessToken', 'InvalidLocationId',
* 'UnauthenticatedRequestsThrottled', 'InvalidHealthCheckType',
* 'Forbidden', 'BillingScopeIdCannotBeChanged',
* 'AppliedScopesNotAssociatedWithCommerceAccount',
* 'PatchValuesSameAsExisting', 'RoleAssignmentCreationFailed',
* 'ReservationOrderCreationFailed', 'ReservationOrderNotEnabled',
* 'CapacityUpdateScopesFailed', 'UnsupportedReservationTerm',
* 'ReservationOrderIdAlreadyExists', 'RiskCheckFailed',
* 'CreateQuoteFailed', 'ActivateQuoteFailed', 'NonsupportedAccountId',
* 'PaymentInstrumentNotFound', 'MissingAppliedScopesForSingle',
* 'NoValidReservationsToReRate', 'ReRateOnlyAllowedForEA',
* 'OperationCannotBePerformedInCurrentState',
* 'InvalidSingleAppliedScopesCount',
* 'InvalidFulfillmentRequestParameters', 'NotSupportedCountry',
* 'InvalidRefundQuantity', 'PurchaseError', 'BillingCustomerInputError',
* 'BillingPaymentInstrumentSoftError',
* 'BillingPaymentInstrumentHardError', 'BillingTransientError',
* 'BillingError', 'FulfillmentConfigurationError',
* 'FulfillmentOutOfStockError', 'FulfillmentTransientError',
* 'FulfillmentError', 'CalculatePriceFailed'.
*/
@JsonProperty(value = "code")
private String code;

/**
* The message property.
*/
@JsonProperty(value = "message")
private String message;

/**
* Get possible values include: 'NotSpecified', 'InternalServerError', 'ServerTimeout', 'AuthorizationFailed', 'BadRequest', 'ClientCertificateThumbprintNotSet', 'InvalidRequestContent', 'OperationFailed', 'HttpMethodNotSupported', 'InvalidRequestUri', 'MissingTenantId', 'InvalidTenantId', 'InvalidReservationOrderId', 'InvalidReservationId', 'ReservationIdNotInReservationOrder', 'ReservationOrderNotFound', 'InvalidSubscriptionId', 'InvalidAccessToken', 'InvalidLocationId', 'UnauthenticatedRequestsThrottled', 'InvalidHealthCheckType', 'Forbidden', 'BillingScopeIdCannotBeChanged', 'AppliedScopesNotAssociatedWithCommerceAccount', 'PatchValuesSameAsExisting', 'RoleAssignmentCreationFailed', 'ReservationOrderCreationFailed', 'ReservationOrderNotEnabled', 'CapacityUpdateScopesFailed', 'UnsupportedReservationTerm', 'ReservationOrderIdAlreadyExists', 'RiskCheckFailed', 'CreateQuoteFailed', 'ActivateQuoteFailed', 'NonsupportedAccountId', 'PaymentInstrumentNotFound', 'MissingAppliedScopesForSingle', 'NoValidReservationsToReRate', 'ReRateOnlyAllowedForEA', 'OperationCannotBePerformedInCurrentState', 'InvalidSingleAppliedScopesCount', 'InvalidFulfillmentRequestParameters', 'NotSupportedCountry', 'InvalidRefundQuantity', 'PurchaseError', 'BillingCustomerInputError', 'BillingPaymentInstrumentSoftError', 'BillingPaymentInstrumentHardError', 'BillingTransientError', 'BillingError', 'FulfillmentConfigurationError', 'FulfillmentOutOfStockError', 'FulfillmentTransientError', 'FulfillmentError', 'CalculatePriceFailed'.
*
* @return the code value
*/
public String code() {
return this.code;
}

/**
* Set possible values include: 'NotSpecified', 'InternalServerError', 'ServerTimeout', 'AuthorizationFailed', 'BadRequest', 'ClientCertificateThumbprintNotSet', 'InvalidRequestContent', 'OperationFailed', 'HttpMethodNotSupported', 'InvalidRequestUri', 'MissingTenantId', 'InvalidTenantId', 'InvalidReservationOrderId', 'InvalidReservationId', 'ReservationIdNotInReservationOrder', 'ReservationOrderNotFound', 'InvalidSubscriptionId', 'InvalidAccessToken', 'InvalidLocationId', 'UnauthenticatedRequestsThrottled', 'InvalidHealthCheckType', 'Forbidden', 'BillingScopeIdCannotBeChanged', 'AppliedScopesNotAssociatedWithCommerceAccount', 'PatchValuesSameAsExisting', 'RoleAssignmentCreationFailed', 'ReservationOrderCreationFailed', 'ReservationOrderNotEnabled', 'CapacityUpdateScopesFailed', 'UnsupportedReservationTerm', 'ReservationOrderIdAlreadyExists', 'RiskCheckFailed', 'CreateQuoteFailed', 'ActivateQuoteFailed', 'NonsupportedAccountId', 'PaymentInstrumentNotFound', 'MissingAppliedScopesForSingle', 'NoValidReservationsToReRate', 'ReRateOnlyAllowedForEA', 'OperationCannotBePerformedInCurrentState', 'InvalidSingleAppliedScopesCount', 'InvalidFulfillmentRequestParameters', 'NotSupportedCountry', 'InvalidRefundQuantity', 'PurchaseError', 'BillingCustomerInputError', 'BillingPaymentInstrumentSoftError', 'BillingPaymentInstrumentHardError', 'BillingTransientError', 'BillingError', 'FulfillmentConfigurationError', 'FulfillmentOutOfStockError', 'FulfillmentTransientError', 'FulfillmentError', 'CalculatePriceFailed'.
*
* @param code the code value to set
* @return the ExtendedErrorInfo object itself.
*/
public ExtendedErrorInfo withCode(String code) {
this.code = code;
return this;
}

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

/**
* Set the message value.
*
* @param message the message value to set
* @return the ExtendedErrorInfo object itself.
*/
public ExtendedErrorInfo withMessage(String message) {
this.message = message;
return this;
}

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

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The ExtendedStatusInfo model.
*/
public class ExtendedStatusInfo {
/**
* Possible values include: 'None', 'Pending', 'Active', 'PurchaseError',
* 'PaymentInstrumentError', 'Split', 'Merged', 'Expired', 'Succeeded'.
*/
@JsonProperty(value = "statusCode")
private String statusCode;

/**
* The message giving detailed information about the status code.
*/
@JsonProperty(value = "message")
private String message;

/**
* Get possible values include: 'None', 'Pending', 'Active', 'PurchaseError', 'PaymentInstrumentError', 'Split', 'Merged', 'Expired', 'Succeeded'.
*
* @return the statusCode value
*/
public String statusCode() {
return this.statusCode;
}

/**
* Set possible values include: 'None', 'Pending', 'Active', 'PurchaseError', 'PaymentInstrumentError', 'Split', 'Merged', 'Expired', 'Succeeded'.
*
* @param statusCode the statusCode value to set
* @return the ExtendedStatusInfo object itself.
*/
public ExtendedStatusInfo withStatusCode(String statusCode) {
this.statusCode = statusCode;
return this;
}

/**
* Get the message giving detailed information about the status code.
*
* @return the message value
*/
public String message() {
return this.message;
}

/**
* Set the message giving detailed information about the status code.
*
* @param message the message value to set
* @return the ExtendedStatusInfo object itself.
*/
public ExtendedStatusInfo withMessage(String message) {
this.message = message;
return this;
}

}
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.reservations;

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

/**
* The MergeRequest model.
*/
@JsonFlatten
public class MergeRequest {
/**
* Format of the resource id should be
* /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}.
*/
@JsonProperty(value = "properties.sources")
private List<String> sources;

/**
* Get format of the resource id should be /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}.
*
* @return the sources value
*/
public List<String> sources() {
return this.sources;
}

/**
* Set format of the resource id should be /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}.
*
* @param sources the sources value to set
* @return the MergeRequest object itself.
*/
public MergeRequest withSources(List<String> sources) {
this.sources = sources;
return this;
}

}
Loading