Skip to content
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,64 @@
/**
* 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.billing.v2018_11_01_preview;

import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.management.billing.v2018_11_01_preview.implementation.AgreementInner;
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.billing.v2018_11_01_preview.implementation.BillingManager;
import org.joda.time.DateTime;
import java.util.List;

/**
* Type representing Agreement.
*/
public interface Agreement extends HasInner<AgreementInner>, Indexable, Refreshable<Agreement>, HasManager<BillingManager> {
/**
* @return the agreementLink value.
*/
String agreementLink();

/**
* @return the effectiveDate value.
*/
DateTime effectiveDate();

/**
* @return the expirationDate value.
*/
DateTime expirationDate();

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

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

/**
* @return the participants value.
*/
List<Participants> participants();

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

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

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

import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.arm.resources.models.HasManager;
import com.microsoft.azure.management.billing.v2018_11_01_preview.implementation.BillingManager;
import com.microsoft.azure.management.billing.v2018_11_01_preview.implementation.AgreementListResultInner;
import com.microsoft.azure.management.billing.v2018_11_01_preview.implementation.AgreementInner;
import java.util.List;

/**
* Type representing AgreementListResult.
*/
public interface AgreementListResult extends HasInner<AgreementListResultInner>, HasManager<BillingManager> {
/**
* @return the nextLink value.
*/
String nextLink();

/**
* @return the value value.
*/
List<AgreementInner> value();

}
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.billing.v2018_11_01_preview;

import rx.Observable;
import com.microsoft.azure.management.billing.v2018_11_01_preview.implementation.AgreementsInner;
import com.microsoft.azure.arm.model.HasInner;

/**
* Type representing Agreements.
*/
public interface Agreements extends HasInner<AgreementsInner> {
/**
* Lists all agreements for a billing account.
*
* @param billingAccountName billing Account Id.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<AgreementListResult> listByBillingAccountNameAsync(String billingAccountName);

/**
* Get the agreement by name.
*
* @param billingAccountName billing Account Id.
* @param agreementName Agreement Id.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<Agreement> getAsync(String billingAccountName, String agreementName);

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

import org.joda.time.DateTime;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Details about the participant or signer.
*/
public class Participants {
/**
* The signing status.
*/
@JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
private String status;

/**
* The date when status got changed.
*/
@JsonProperty(value = "statusDate", access = JsonProperty.Access.WRITE_ONLY)
private DateTime statusDate;

/**
* The email address of the participant or signer.
*/
@JsonProperty(value = "email", access = JsonProperty.Access.WRITE_ONLY)
private String email;

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

/**
* Get the date when status got changed.
*
* @return the statusDate value
*/
public DateTime statusDate() {
return this.statusDate;
}

/**
* Get the email address of the participant or signer.
*
* @return the email value
*/
public String email() {
return this.email;
}

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

import com.microsoft.azure.management.billing.v2018_11_01_preview.Agreement;
import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl;
import rx.Observable;
import org.joda.time.DateTime;
import java.util.List;
import com.microsoft.azure.management.billing.v2018_11_01_preview.Participants;

class AgreementImpl extends IndexableRefreshableWrapperImpl<Agreement, AgreementInner> implements Agreement {
private final BillingManager manager;
private String billingAccountName;
private String agreementName;

AgreementImpl(AgreementInner inner, BillingManager manager) {
super(null, inner);
this.manager = manager;
// set resource ancestor and positional variables
this.billingAccountName = IdParsingUtils.getValueFromIdByName(inner.id(), "billingAccounts");
this.agreementName = IdParsingUtils.getValueFromIdByName(inner.id(), "agreements");
}

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

@Override
protected Observable<AgreementInner> getInnerAsync() {
AgreementsInner client = this.manager().inner().agreements();
return client.getAsync(this.billingAccountName, this.agreementName);
}



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

@Override
public DateTime effectiveDate() {
return this.inner().effectiveDate();
}

@Override
public DateTime expirationDate() {
return this.inner().expirationDate();
}

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

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

@Override
public List<Participants> participants() {
return this.inner().participants();
}

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

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

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

import org.joda.time.DateTime;
import java.util.List;
import com.microsoft.azure.management.billing.v2018_11_01_preview.Participants;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.microsoft.rest.serializer.JsonFlatten;
import com.microsoft.azure.ProxyResource;

/**
* An agreement resource.
*/
@JsonFlatten
public class AgreementInner extends ProxyResource {
/**
* The link to the agreement.
*/
@JsonProperty(value = "properties.agreementLink", access = JsonProperty.Access.WRITE_ONLY)
private String agreementLink;

/**
* Effective date.
*/
@JsonProperty(value = "properties.effectiveDate", access = JsonProperty.Access.WRITE_ONLY)
private DateTime effectiveDate;

/**
* Expiration date.
*/
@JsonProperty(value = "properties.expirationDate", access = JsonProperty.Access.WRITE_ONLY)
private DateTime expirationDate;

/**
* Participants or signer of the agreement.
*/
@JsonProperty(value = "properties.participants")
private List<Participants> participants;

/**
* The agreement status.
*/
@JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY)
private String status;

/**
* Get the link to the agreement.
*
* @return the agreementLink value
*/
public String agreementLink() {
return this.agreementLink;
}

/**
* Get effective date.
*
* @return the effectiveDate value
*/
public DateTime effectiveDate() {
return this.effectiveDate;
}

/**
* Get expiration date.
*
* @return the expirationDate value
*/
public DateTime expirationDate() {
return this.expirationDate;
}

/**
* Get participants or signer of the agreement.
*
* @return the participants value
*/
public List<Participants> participants() {
return this.participants;
}

/**
* Set participants or signer of the agreement.
*
* @param participants the participants value to set
* @return the AgreementInner object itself.
*/
public AgreementInner withParticipants(List<Participants> participants) {
this.participants = participants;
return this;
}

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

}
Loading