yandex.cloud.api.billing.v1.BudgetOuterClass Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: yandex/cloud/billing/v1/budget.proto
package yandex.cloud.api.billing.v1;
public final class BudgetOuterClass {
private BudgetOuterClass() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
/**
* Protobuf enum {@code yandex.cloud.billing.v1.BudgetStatus}
*/
public enum BudgetStatus
implements com.google.protobuf.ProtocolMessageEnum {
/**
* BUDGET_STATUS_UNSPECIFIED = 0;
*/
BUDGET_STATUS_UNSPECIFIED(0),
/**
*
* The budget is being created.
*
*
* CREATING = 1;
*/
CREATING(1),
/**
*
* The budget is active.
*
*
* ACTIVE = 2;
*/
ACTIVE(2),
/**
*
* The budget is finished.
*
*
* FINISHED = 3;
*/
FINISHED(3),
UNRECOGNIZED(-1),
;
/**
* BUDGET_STATUS_UNSPECIFIED = 0;
*/
public static final int BUDGET_STATUS_UNSPECIFIED_VALUE = 0;
/**
*
* The budget is being created.
*
*
* CREATING = 1;
*/
public static final int CREATING_VALUE = 1;
/**
*
* The budget is active.
*
*
* ACTIVE = 2;
*/
public static final int ACTIVE_VALUE = 2;
/**
*
* The budget is finished.
*
*
* FINISHED = 3;
*/
public static final int FINISHED_VALUE = 3;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static BudgetStatus valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static BudgetStatus forNumber(int value) {
switch (value) {
case 0: return BUDGET_STATUS_UNSPECIFIED;
case 1: return CREATING;
case 2: return ACTIVE;
case 3: return FINISHED;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
BudgetStatus> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public BudgetStatus findValueByNumber(int number) {
return BudgetStatus.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.getDescriptor().getEnumTypes().get(0);
}
private static final BudgetStatus[] VALUES = values();
public static BudgetStatus valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private BudgetStatus(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:yandex.cloud.billing.v1.BudgetStatus)
}
/**
* Protobuf enum {@code yandex.cloud.billing.v1.ResetPeriodType}
*/
public enum ResetPeriodType
implements com.google.protobuf.ProtocolMessageEnum {
/**
* RESET_PERIOD_TYPE_UNSPECIFIED = 0;
*/
RESET_PERIOD_TYPE_UNSPECIFIED(0),
/**
*
* Reset budget every month.
*
*
* MONTHLY = 1;
*/
MONTHLY(1),
/**
*
* Reset budget every quarter.
*
*
* QUARTER = 2;
*/
QUARTER(2),
/**
*
* Reset budget every year.
*
*
* ANNUALLY = 3;
*/
ANNUALLY(3),
UNRECOGNIZED(-1),
;
/**
* RESET_PERIOD_TYPE_UNSPECIFIED = 0;
*/
public static final int RESET_PERIOD_TYPE_UNSPECIFIED_VALUE = 0;
/**
*
* Reset budget every month.
*
*
* MONTHLY = 1;
*/
public static final int MONTHLY_VALUE = 1;
/**
*
* Reset budget every quarter.
*
*
* QUARTER = 2;
*/
public static final int QUARTER_VALUE = 2;
/**
*
* Reset budget every year.
*
*
* ANNUALLY = 3;
*/
public static final int ANNUALLY_VALUE = 3;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ResetPeriodType valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static ResetPeriodType forNumber(int value) {
switch (value) {
case 0: return RESET_PERIOD_TYPE_UNSPECIFIED;
case 1: return MONTHLY;
case 2: return QUARTER;
case 3: return ANNUALLY;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
ResetPeriodType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public ResetPeriodType findValueByNumber(int number) {
return ResetPeriodType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.getDescriptor().getEnumTypes().get(1);
}
private static final ResetPeriodType[] VALUES = values();
public static ResetPeriodType valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private ResetPeriodType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:yandex.cloud.billing.v1.ResetPeriodType)
}
/**
*
* Define the unit of the [ThesholdRule.amount].
*
*
* Protobuf enum {@code yandex.cloud.billing.v1.ThresholdType}
*/
public enum ThresholdType
implements com.google.protobuf.ProtocolMessageEnum {
/**
* THRESHOLD_TYPE_UNSPECIFIED = 0;
*/
THRESHOLD_TYPE_UNSPECIFIED(0),
/**
*
* Percent.
*
*
* PERCENT = 1;
*/
PERCENT(1),
/**
*
* The same as budget amount.
*
*
* AMOUNT = 2;
*/
AMOUNT(2),
UNRECOGNIZED(-1),
;
/**
* THRESHOLD_TYPE_UNSPECIFIED = 0;
*/
public static final int THRESHOLD_TYPE_UNSPECIFIED_VALUE = 0;
/**
*
* Percent.
*
*
* PERCENT = 1;
*/
public static final int PERCENT_VALUE = 1;
/**
*
* The same as budget amount.
*
*
* AMOUNT = 2;
*/
public static final int AMOUNT_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ThresholdType valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static ThresholdType forNumber(int value) {
switch (value) {
case 0: return THRESHOLD_TYPE_UNSPECIFIED;
case 1: return PERCENT;
case 2: return AMOUNT;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
ThresholdType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public ThresholdType findValueByNumber(int number) {
return ThresholdType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.getDescriptor().getEnumTypes().get(2);
}
private static final ThresholdType[] VALUES = values();
public static ThresholdType valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private ThresholdType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:yandex.cloud.billing.v1.ThresholdType)
}
public interface BudgetOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.billing.v1.Budget)
com.google.protobuf.MessageOrBuilder {
/**
*
* ID of the budget.
*
*
* string id = 1;
* @return The id.
*/
java.lang.String getId();
/**
*
* ID of the budget.
*
*
* string id = 1;
* @return The bytes for id.
*/
com.google.protobuf.ByteString
getIdBytes();
/**
*
* Name of the budget.
*
*
* string name = 2;
* @return The name.
*/
java.lang.String getName();
/**
*
* Name of the budget.
*
*
* string name = 2;
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
/**
*
* Creation timestamp.
*
*
* .google.protobuf.Timestamp created_at = 3;
* @return Whether the createdAt field is set.
*/
boolean hasCreatedAt();
/**
*
* Creation timestamp.
*
*
* .google.protobuf.Timestamp created_at = 3;
* @return The createdAt.
*/
com.google.protobuf.Timestamp getCreatedAt();
/**
*
* Creation timestamp.
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder();
/**
*
* ID of the billing account that the budget belongs to.
*
*
* string billing_account_id = 4;
* @return The billingAccountId.
*/
java.lang.String getBillingAccountId();
/**
*
* ID of the billing account that the budget belongs to.
*
*
* string billing_account_id = 4;
* @return The bytes for billingAccountId.
*/
com.google.protobuf.ByteString
getBillingAccountIdBytes();
/**
*
* Status of the budget.
*
*
* .yandex.cloud.billing.v1.BudgetStatus status = 5;
* @return The enum numeric value on the wire for status.
*/
int getStatusValue();
/**
*
* Status of the budget.
*
*
* .yandex.cloud.billing.v1.BudgetStatus status = 5;
* @return The status.
*/
yandex.cloud.api.billing.v1.BudgetOuterClass.BudgetStatus getStatus();
/**
*
* Cost budget specification.
*
*
* .yandex.cloud.billing.v1.CostBudgetSpec cost_budget = 6;
* @return Whether the costBudget field is set.
*/
boolean hasCostBudget();
/**
*
* Cost budget specification.
*
*
* .yandex.cloud.billing.v1.CostBudgetSpec cost_budget = 6;
* @return The costBudget.
*/
yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec getCostBudget();
/**
*
* Cost budget specification.
*
*
* .yandex.cloud.billing.v1.CostBudgetSpec cost_budget = 6;
*/
yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpecOrBuilder getCostBudgetOrBuilder();
/**
*
* Expense budget specification.
*
*
* .yandex.cloud.billing.v1.ExpenseBudgetSpec expense_budget = 7;
* @return Whether the expenseBudget field is set.
*/
boolean hasExpenseBudget();
/**
*
* Expense budget specification.
*
*
* .yandex.cloud.billing.v1.ExpenseBudgetSpec expense_budget = 7;
* @return The expenseBudget.
*/
yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec getExpenseBudget();
/**
*
* Expense budget specification.
*
*
* .yandex.cloud.billing.v1.ExpenseBudgetSpec expense_budget = 7;
*/
yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpecOrBuilder getExpenseBudgetOrBuilder();
/**
*
* Balance budget specification.
*
*
* .yandex.cloud.billing.v1.BalanceBudgetSpec balance_budget = 8;
* @return Whether the balanceBudget field is set.
*/
boolean hasBalanceBudget();
/**
*
* Balance budget specification.
*
*
* .yandex.cloud.billing.v1.BalanceBudgetSpec balance_budget = 8;
* @return The balanceBudget.
*/
yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec getBalanceBudget();
/**
*
* Balance budget specification.
*
*
* .yandex.cloud.billing.v1.BalanceBudgetSpec balance_budget = 8;
*/
yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpecOrBuilder getBalanceBudgetOrBuilder();
public yandex.cloud.api.billing.v1.BudgetOuterClass.Budget.BudgetSpecCase getBudgetSpecCase();
}
/**
*
* A Budget resource. For more information, see [/docs/billing/concepts/budget].
*
*
* Protobuf type {@code yandex.cloud.billing.v1.Budget}
*/
public static final class Budget extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.billing.v1.Budget)
BudgetOrBuilder {
private static final long serialVersionUID = 0L;
// Use Budget.newBuilder() to construct.
private Budget(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Budget() {
id_ = "";
name_ = "";
billingAccountId_ = "";
status_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Budget();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Budget(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
id_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 26: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (createdAt_ != null) {
subBuilder = createdAt_.toBuilder();
}
createdAt_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(createdAt_);
createdAt_ = subBuilder.buildPartial();
}
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
billingAccountId_ = s;
break;
}
case 40: {
int rawValue = input.readEnum();
status_ = rawValue;
break;
}
case 50: {
yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec.Builder subBuilder = null;
if (budgetSpecCase_ == 6) {
subBuilder = ((yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec) budgetSpec_).toBuilder();
}
budgetSpec_ =
input.readMessage(yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec) budgetSpec_);
budgetSpec_ = subBuilder.buildPartial();
}
budgetSpecCase_ = 6;
break;
}
case 58: {
yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec.Builder subBuilder = null;
if (budgetSpecCase_ == 7) {
subBuilder = ((yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec) budgetSpec_).toBuilder();
}
budgetSpec_ =
input.readMessage(yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec) budgetSpec_);
budgetSpec_ = subBuilder.buildPartial();
}
budgetSpecCase_ = 7;
break;
}
case 66: {
yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec.Builder subBuilder = null;
if (budgetSpecCase_ == 8) {
subBuilder = ((yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec) budgetSpec_).toBuilder();
}
budgetSpec_ =
input.readMessage(yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec) budgetSpec_);
budgetSpec_ = subBuilder.buildPartial();
}
budgetSpecCase_ = 8;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.internal_static_yandex_cloud_billing_v1_Budget_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.internal_static_yandex_cloud_billing_v1_Budget_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.billing.v1.BudgetOuterClass.Budget.class, yandex.cloud.api.billing.v1.BudgetOuterClass.Budget.Builder.class);
}
private int budgetSpecCase_ = 0;
private java.lang.Object budgetSpec_;
public enum BudgetSpecCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
COST_BUDGET(6),
EXPENSE_BUDGET(7),
BALANCE_BUDGET(8),
BUDGETSPEC_NOT_SET(0);
private final int value;
private BudgetSpecCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static BudgetSpecCase valueOf(int value) {
return forNumber(value);
}
public static BudgetSpecCase forNumber(int value) {
switch (value) {
case 6: return COST_BUDGET;
case 7: return EXPENSE_BUDGET;
case 8: return BALANCE_BUDGET;
case 0: return BUDGETSPEC_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public BudgetSpecCase
getBudgetSpecCase() {
return BudgetSpecCase.forNumber(
budgetSpecCase_);
}
public static final int ID_FIELD_NUMBER = 1;
private volatile java.lang.Object id_;
/**
*
* ID of the budget.
*
*
* string id = 1;
* @return The id.
*/
@java.lang.Override
public java.lang.String getId() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
}
}
/**
*
* ID of the budget.
*
*
* string id = 1;
* @return The bytes for id.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int NAME_FIELD_NUMBER = 2;
private volatile java.lang.Object name_;
/**
*
* Name of the budget.
*
*
* string name = 2;
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
*
* Name of the budget.
*
*
* string name = 2;
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CREATED_AT_FIELD_NUMBER = 3;
private com.google.protobuf.Timestamp createdAt_;
/**
*
* Creation timestamp.
*
*
* .google.protobuf.Timestamp created_at = 3;
* @return Whether the createdAt field is set.
*/
@java.lang.Override
public boolean hasCreatedAt() {
return createdAt_ != null;
}
/**
*
* Creation timestamp.
*
*
* .google.protobuf.Timestamp created_at = 3;
* @return The createdAt.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getCreatedAt() {
return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_;
}
/**
*
* Creation timestamp.
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder() {
return getCreatedAt();
}
public static final int BILLING_ACCOUNT_ID_FIELD_NUMBER = 4;
private volatile java.lang.Object billingAccountId_;
/**
*
* ID of the billing account that the budget belongs to.
*
*
* string billing_account_id = 4;
* @return The billingAccountId.
*/
@java.lang.Override
public java.lang.String getBillingAccountId() {
java.lang.Object ref = billingAccountId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
billingAccountId_ = s;
return s;
}
}
/**
*
* ID of the billing account that the budget belongs to.
*
*
* string billing_account_id = 4;
* @return The bytes for billingAccountId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getBillingAccountIdBytes() {
java.lang.Object ref = billingAccountId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
billingAccountId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int STATUS_FIELD_NUMBER = 5;
private int status_;
/**
*
* Status of the budget.
*
*
* .yandex.cloud.billing.v1.BudgetStatus status = 5;
* @return The enum numeric value on the wire for status.
*/
@java.lang.Override public int getStatusValue() {
return status_;
}
/**
*
* Status of the budget.
*
*
* .yandex.cloud.billing.v1.BudgetStatus status = 5;
* @return The status.
*/
@java.lang.Override public yandex.cloud.api.billing.v1.BudgetOuterClass.BudgetStatus getStatus() {
@SuppressWarnings("deprecation")
yandex.cloud.api.billing.v1.BudgetOuterClass.BudgetStatus result = yandex.cloud.api.billing.v1.BudgetOuterClass.BudgetStatus.valueOf(status_);
return result == null ? yandex.cloud.api.billing.v1.BudgetOuterClass.BudgetStatus.UNRECOGNIZED : result;
}
public static final int COST_BUDGET_FIELD_NUMBER = 6;
/**
*
* Cost budget specification.
*
*
* .yandex.cloud.billing.v1.CostBudgetSpec cost_budget = 6;
* @return Whether the costBudget field is set.
*/
@java.lang.Override
public boolean hasCostBudget() {
return budgetSpecCase_ == 6;
}
/**
*
* Cost budget specification.
*
*
* .yandex.cloud.billing.v1.CostBudgetSpec cost_budget = 6;
* @return The costBudget.
*/
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec getCostBudget() {
if (budgetSpecCase_ == 6) {
return (yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec) budgetSpec_;
}
return yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec.getDefaultInstance();
}
/**
*
* Cost budget specification.
*
*
* .yandex.cloud.billing.v1.CostBudgetSpec cost_budget = 6;
*/
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpecOrBuilder getCostBudgetOrBuilder() {
if (budgetSpecCase_ == 6) {
return (yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec) budgetSpec_;
}
return yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec.getDefaultInstance();
}
public static final int EXPENSE_BUDGET_FIELD_NUMBER = 7;
/**
*
* Expense budget specification.
*
*
* .yandex.cloud.billing.v1.ExpenseBudgetSpec expense_budget = 7;
* @return Whether the expenseBudget field is set.
*/
@java.lang.Override
public boolean hasExpenseBudget() {
return budgetSpecCase_ == 7;
}
/**
*
* Expense budget specification.
*
*
* .yandex.cloud.billing.v1.ExpenseBudgetSpec expense_budget = 7;
* @return The expenseBudget.
*/
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec getExpenseBudget() {
if (budgetSpecCase_ == 7) {
return (yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec) budgetSpec_;
}
return yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec.getDefaultInstance();
}
/**
*
* Expense budget specification.
*
*
* .yandex.cloud.billing.v1.ExpenseBudgetSpec expense_budget = 7;
*/
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpecOrBuilder getExpenseBudgetOrBuilder() {
if (budgetSpecCase_ == 7) {
return (yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec) budgetSpec_;
}
return yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec.getDefaultInstance();
}
public static final int BALANCE_BUDGET_FIELD_NUMBER = 8;
/**
*
* Balance budget specification.
*
*
* .yandex.cloud.billing.v1.BalanceBudgetSpec balance_budget = 8;
* @return Whether the balanceBudget field is set.
*/
@java.lang.Override
public boolean hasBalanceBudget() {
return budgetSpecCase_ == 8;
}
/**
*
* Balance budget specification.
*
*
* .yandex.cloud.billing.v1.BalanceBudgetSpec balance_budget = 8;
* @return The balanceBudget.
*/
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec getBalanceBudget() {
if (budgetSpecCase_ == 8) {
return (yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec) budgetSpec_;
}
return yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec.getDefaultInstance();
}
/**
*
* Balance budget specification.
*
*
* .yandex.cloud.billing.v1.BalanceBudgetSpec balance_budget = 8;
*/
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpecOrBuilder getBalanceBudgetOrBuilder() {
if (budgetSpecCase_ == 8) {
return (yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec) budgetSpec_;
}
return yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_);
}
if (createdAt_ != null) {
output.writeMessage(3, getCreatedAt());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(billingAccountId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, billingAccountId_);
}
if (status_ != yandex.cloud.api.billing.v1.BudgetOuterClass.BudgetStatus.BUDGET_STATUS_UNSPECIFIED.getNumber()) {
output.writeEnum(5, status_);
}
if (budgetSpecCase_ == 6) {
output.writeMessage(6, (yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec) budgetSpec_);
}
if (budgetSpecCase_ == 7) {
output.writeMessage(7, (yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec) budgetSpec_);
}
if (budgetSpecCase_ == 8) {
output.writeMessage(8, (yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec) budgetSpec_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_);
}
if (createdAt_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getCreatedAt());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(billingAccountId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, billingAccountId_);
}
if (status_ != yandex.cloud.api.billing.v1.BudgetOuterClass.BudgetStatus.BUDGET_STATUS_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(5, status_);
}
if (budgetSpecCase_ == 6) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, (yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec) budgetSpec_);
}
if (budgetSpecCase_ == 7) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, (yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec) budgetSpec_);
}
if (budgetSpecCase_ == 8) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, (yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec) budgetSpec_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.billing.v1.BudgetOuterClass.Budget)) {
return super.equals(obj);
}
yandex.cloud.api.billing.v1.BudgetOuterClass.Budget other = (yandex.cloud.api.billing.v1.BudgetOuterClass.Budget) obj;
if (!getId()
.equals(other.getId())) return false;
if (!getName()
.equals(other.getName())) return false;
if (hasCreatedAt() != other.hasCreatedAt()) return false;
if (hasCreatedAt()) {
if (!getCreatedAt()
.equals(other.getCreatedAt())) return false;
}
if (!getBillingAccountId()
.equals(other.getBillingAccountId())) return false;
if (status_ != other.status_) return false;
if (!getBudgetSpecCase().equals(other.getBudgetSpecCase())) return false;
switch (budgetSpecCase_) {
case 6:
if (!getCostBudget()
.equals(other.getCostBudget())) return false;
break;
case 7:
if (!getExpenseBudget()
.equals(other.getExpenseBudget())) return false;
break;
case 8:
if (!getBalanceBudget()
.equals(other.getBalanceBudget())) return false;
break;
case 0:
default:
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
if (hasCreatedAt()) {
hash = (37 * hash) + CREATED_AT_FIELD_NUMBER;
hash = (53 * hash) + getCreatedAt().hashCode();
}
hash = (37 * hash) + BILLING_ACCOUNT_ID_FIELD_NUMBER;
hash = (53 * hash) + getBillingAccountId().hashCode();
hash = (37 * hash) + STATUS_FIELD_NUMBER;
hash = (53 * hash) + status_;
switch (budgetSpecCase_) {
case 6:
hash = (37 * hash) + COST_BUDGET_FIELD_NUMBER;
hash = (53 * hash) + getCostBudget().hashCode();
break;
case 7:
hash = (37 * hash) + EXPENSE_BUDGET_FIELD_NUMBER;
hash = (53 * hash) + getExpenseBudget().hashCode();
break;
case 8:
hash = (37 * hash) + BALANCE_BUDGET_FIELD_NUMBER;
hash = (53 * hash) + getBalanceBudget().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.Budget parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.Budget parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.Budget parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.Budget parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.Budget parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.Budget parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.Budget parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.Budget parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.Budget parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.Budget parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.Budget parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.Budget parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(yandex.cloud.api.billing.v1.BudgetOuterClass.Budget prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* A Budget resource. For more information, see [/docs/billing/concepts/budget].
*
*
* Protobuf type {@code yandex.cloud.billing.v1.Budget}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.billing.v1.Budget)
yandex.cloud.api.billing.v1.BudgetOuterClass.BudgetOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.internal_static_yandex_cloud_billing_v1_Budget_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.internal_static_yandex_cloud_billing_v1_Budget_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.billing.v1.BudgetOuterClass.Budget.class, yandex.cloud.api.billing.v1.BudgetOuterClass.Budget.Builder.class);
}
// Construct using yandex.cloud.api.billing.v1.BudgetOuterClass.Budget.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
id_ = "";
name_ = "";
if (createdAtBuilder_ == null) {
createdAt_ = null;
} else {
createdAt_ = null;
createdAtBuilder_ = null;
}
billingAccountId_ = "";
status_ = 0;
budgetSpecCase_ = 0;
budgetSpec_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.internal_static_yandex_cloud_billing_v1_Budget_descriptor;
}
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.Budget getDefaultInstanceForType() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.Budget.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.Budget build() {
yandex.cloud.api.billing.v1.BudgetOuterClass.Budget result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.Budget buildPartial() {
yandex.cloud.api.billing.v1.BudgetOuterClass.Budget result = new yandex.cloud.api.billing.v1.BudgetOuterClass.Budget(this);
result.id_ = id_;
result.name_ = name_;
if (createdAtBuilder_ == null) {
result.createdAt_ = createdAt_;
} else {
result.createdAt_ = createdAtBuilder_.build();
}
result.billingAccountId_ = billingAccountId_;
result.status_ = status_;
if (budgetSpecCase_ == 6) {
if (costBudgetBuilder_ == null) {
result.budgetSpec_ = budgetSpec_;
} else {
result.budgetSpec_ = costBudgetBuilder_.build();
}
}
if (budgetSpecCase_ == 7) {
if (expenseBudgetBuilder_ == null) {
result.budgetSpec_ = budgetSpec_;
} else {
result.budgetSpec_ = expenseBudgetBuilder_.build();
}
}
if (budgetSpecCase_ == 8) {
if (balanceBudgetBuilder_ == null) {
result.budgetSpec_ = budgetSpec_;
} else {
result.budgetSpec_ = balanceBudgetBuilder_.build();
}
}
result.budgetSpecCase_ = budgetSpecCase_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof yandex.cloud.api.billing.v1.BudgetOuterClass.Budget) {
return mergeFrom((yandex.cloud.api.billing.v1.BudgetOuterClass.Budget)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.billing.v1.BudgetOuterClass.Budget other) {
if (other == yandex.cloud.api.billing.v1.BudgetOuterClass.Budget.getDefaultInstance()) return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
onChanged();
}
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (other.hasCreatedAt()) {
mergeCreatedAt(other.getCreatedAt());
}
if (!other.getBillingAccountId().isEmpty()) {
billingAccountId_ = other.billingAccountId_;
onChanged();
}
if (other.status_ != 0) {
setStatusValue(other.getStatusValue());
}
switch (other.getBudgetSpecCase()) {
case COST_BUDGET: {
mergeCostBudget(other.getCostBudget());
break;
}
case EXPENSE_BUDGET: {
mergeExpenseBudget(other.getExpenseBudget());
break;
}
case BALANCE_BUDGET: {
mergeBalanceBudget(other.getBalanceBudget());
break;
}
case BUDGETSPEC_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.billing.v1.BudgetOuterClass.Budget parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.billing.v1.BudgetOuterClass.Budget) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int budgetSpecCase_ = 0;
private java.lang.Object budgetSpec_;
public BudgetSpecCase
getBudgetSpecCase() {
return BudgetSpecCase.forNumber(
budgetSpecCase_);
}
public Builder clearBudgetSpec() {
budgetSpecCase_ = 0;
budgetSpec_ = null;
onChanged();
return this;
}
private java.lang.Object id_ = "";
/**
*
* ID of the budget.
*
*
* string id = 1;
* @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* ID of the budget.
*
*
* string id = 1;
* @return The bytes for id.
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* ID of the budget.
*
*
* string id = 1;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
id_ = value;
onChanged();
return this;
}
/**
*
* ID of the budget.
*
*
* string id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
*
* ID of the budget.
*
*
* string id = 1;
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
id_ = value;
onChanged();
return this;
}
private java.lang.Object name_ = "";
/**
*
* Name of the budget.
*
*
* string name = 2;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Name of the budget.
*
*
* string name = 2;
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Name of the budget.
*
*
* string name = 2;
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
* Name of the budget.
*
*
* string name = 2;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* Name of the budget.
*
*
* string name = 2;
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private com.google.protobuf.Timestamp createdAt_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createdAtBuilder_;
/**
*
* Creation timestamp.
*
*
* .google.protobuf.Timestamp created_at = 3;
* @return Whether the createdAt field is set.
*/
public boolean hasCreatedAt() {
return createdAtBuilder_ != null || createdAt_ != null;
}
/**
*
* Creation timestamp.
*
*
* .google.protobuf.Timestamp created_at = 3;
* @return The createdAt.
*/
public com.google.protobuf.Timestamp getCreatedAt() {
if (createdAtBuilder_ == null) {
return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_;
} else {
return createdAtBuilder_.getMessage();
}
}
/**
*
* Creation timestamp.
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
public Builder setCreatedAt(com.google.protobuf.Timestamp value) {
if (createdAtBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
createdAt_ = value;
onChanged();
} else {
createdAtBuilder_.setMessage(value);
}
return this;
}
/**
*
* Creation timestamp.
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
public Builder setCreatedAt(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (createdAtBuilder_ == null) {
createdAt_ = builderForValue.build();
onChanged();
} else {
createdAtBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Creation timestamp.
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
public Builder mergeCreatedAt(com.google.protobuf.Timestamp value) {
if (createdAtBuilder_ == null) {
if (createdAt_ != null) {
createdAt_ =
com.google.protobuf.Timestamp.newBuilder(createdAt_).mergeFrom(value).buildPartial();
} else {
createdAt_ = value;
}
onChanged();
} else {
createdAtBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Creation timestamp.
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
public Builder clearCreatedAt() {
if (createdAtBuilder_ == null) {
createdAt_ = null;
onChanged();
} else {
createdAt_ = null;
createdAtBuilder_ = null;
}
return this;
}
/**
*
* Creation timestamp.
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
public com.google.protobuf.Timestamp.Builder getCreatedAtBuilder() {
onChanged();
return getCreatedAtFieldBuilder().getBuilder();
}
/**
*
* Creation timestamp.
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
public com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder() {
if (createdAtBuilder_ != null) {
return createdAtBuilder_.getMessageOrBuilder();
} else {
return createdAt_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_;
}
}
/**
*
* Creation timestamp.
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getCreatedAtFieldBuilder() {
if (createdAtBuilder_ == null) {
createdAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getCreatedAt(),
getParentForChildren(),
isClean());
createdAt_ = null;
}
return createdAtBuilder_;
}
private java.lang.Object billingAccountId_ = "";
/**
*
* ID of the billing account that the budget belongs to.
*
*
* string billing_account_id = 4;
* @return The billingAccountId.
*/
public java.lang.String getBillingAccountId() {
java.lang.Object ref = billingAccountId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
billingAccountId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* ID of the billing account that the budget belongs to.
*
*
* string billing_account_id = 4;
* @return The bytes for billingAccountId.
*/
public com.google.protobuf.ByteString
getBillingAccountIdBytes() {
java.lang.Object ref = billingAccountId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
billingAccountId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* ID of the billing account that the budget belongs to.
*
*
* string billing_account_id = 4;
* @param value The billingAccountId to set.
* @return This builder for chaining.
*/
public Builder setBillingAccountId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
billingAccountId_ = value;
onChanged();
return this;
}
/**
*
* ID of the billing account that the budget belongs to.
*
*
* string billing_account_id = 4;
* @return This builder for chaining.
*/
public Builder clearBillingAccountId() {
billingAccountId_ = getDefaultInstance().getBillingAccountId();
onChanged();
return this;
}
/**
*
* ID of the billing account that the budget belongs to.
*
*
* string billing_account_id = 4;
* @param value The bytes for billingAccountId to set.
* @return This builder for chaining.
*/
public Builder setBillingAccountIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
billingAccountId_ = value;
onChanged();
return this;
}
private int status_ = 0;
/**
*
* Status of the budget.
*
*
* .yandex.cloud.billing.v1.BudgetStatus status = 5;
* @return The enum numeric value on the wire for status.
*/
@java.lang.Override public int getStatusValue() {
return status_;
}
/**
*
* Status of the budget.
*
*
* .yandex.cloud.billing.v1.BudgetStatus status = 5;
* @param value The enum numeric value on the wire for status to set.
* @return This builder for chaining.
*/
public Builder setStatusValue(int value) {
status_ = value;
onChanged();
return this;
}
/**
*
* Status of the budget.
*
*
* .yandex.cloud.billing.v1.BudgetStatus status = 5;
* @return The status.
*/
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.BudgetStatus getStatus() {
@SuppressWarnings("deprecation")
yandex.cloud.api.billing.v1.BudgetOuterClass.BudgetStatus result = yandex.cloud.api.billing.v1.BudgetOuterClass.BudgetStatus.valueOf(status_);
return result == null ? yandex.cloud.api.billing.v1.BudgetOuterClass.BudgetStatus.UNRECOGNIZED : result;
}
/**
*
* Status of the budget.
*
*
* .yandex.cloud.billing.v1.BudgetStatus status = 5;
* @param value The status to set.
* @return This builder for chaining.
*/
public Builder setStatus(yandex.cloud.api.billing.v1.BudgetOuterClass.BudgetStatus value) {
if (value == null) {
throw new NullPointerException();
}
status_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Status of the budget.
*
*
* .yandex.cloud.billing.v1.BudgetStatus status = 5;
* @return This builder for chaining.
*/
public Builder clearStatus() {
status_ = 0;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec, yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec.Builder, yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpecOrBuilder> costBudgetBuilder_;
/**
*
* Cost budget specification.
*
*
* .yandex.cloud.billing.v1.CostBudgetSpec cost_budget = 6;
* @return Whether the costBudget field is set.
*/
@java.lang.Override
public boolean hasCostBudget() {
return budgetSpecCase_ == 6;
}
/**
*
* Cost budget specification.
*
*
* .yandex.cloud.billing.v1.CostBudgetSpec cost_budget = 6;
* @return The costBudget.
*/
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec getCostBudget() {
if (costBudgetBuilder_ == null) {
if (budgetSpecCase_ == 6) {
return (yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec) budgetSpec_;
}
return yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec.getDefaultInstance();
} else {
if (budgetSpecCase_ == 6) {
return costBudgetBuilder_.getMessage();
}
return yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec.getDefaultInstance();
}
}
/**
*
* Cost budget specification.
*
*
* .yandex.cloud.billing.v1.CostBudgetSpec cost_budget = 6;
*/
public Builder setCostBudget(yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec value) {
if (costBudgetBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
budgetSpec_ = value;
onChanged();
} else {
costBudgetBuilder_.setMessage(value);
}
budgetSpecCase_ = 6;
return this;
}
/**
*
* Cost budget specification.
*
*
* .yandex.cloud.billing.v1.CostBudgetSpec cost_budget = 6;
*/
public Builder setCostBudget(
yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec.Builder builderForValue) {
if (costBudgetBuilder_ == null) {
budgetSpec_ = builderForValue.build();
onChanged();
} else {
costBudgetBuilder_.setMessage(builderForValue.build());
}
budgetSpecCase_ = 6;
return this;
}
/**
*
* Cost budget specification.
*
*
* .yandex.cloud.billing.v1.CostBudgetSpec cost_budget = 6;
*/
public Builder mergeCostBudget(yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec value) {
if (costBudgetBuilder_ == null) {
if (budgetSpecCase_ == 6 &&
budgetSpec_ != yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec.getDefaultInstance()) {
budgetSpec_ = yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec.newBuilder((yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec) budgetSpec_)
.mergeFrom(value).buildPartial();
} else {
budgetSpec_ = value;
}
onChanged();
} else {
if (budgetSpecCase_ == 6) {
costBudgetBuilder_.mergeFrom(value);
}
costBudgetBuilder_.setMessage(value);
}
budgetSpecCase_ = 6;
return this;
}
/**
*
* Cost budget specification.
*
*
* .yandex.cloud.billing.v1.CostBudgetSpec cost_budget = 6;
*/
public Builder clearCostBudget() {
if (costBudgetBuilder_ == null) {
if (budgetSpecCase_ == 6) {
budgetSpecCase_ = 0;
budgetSpec_ = null;
onChanged();
}
} else {
if (budgetSpecCase_ == 6) {
budgetSpecCase_ = 0;
budgetSpec_ = null;
}
costBudgetBuilder_.clear();
}
return this;
}
/**
*
* Cost budget specification.
*
*
* .yandex.cloud.billing.v1.CostBudgetSpec cost_budget = 6;
*/
public yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec.Builder getCostBudgetBuilder() {
return getCostBudgetFieldBuilder().getBuilder();
}
/**
*
* Cost budget specification.
*
*
* .yandex.cloud.billing.v1.CostBudgetSpec cost_budget = 6;
*/
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpecOrBuilder getCostBudgetOrBuilder() {
if ((budgetSpecCase_ == 6) && (costBudgetBuilder_ != null)) {
return costBudgetBuilder_.getMessageOrBuilder();
} else {
if (budgetSpecCase_ == 6) {
return (yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec) budgetSpec_;
}
return yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec.getDefaultInstance();
}
}
/**
*
* Cost budget specification.
*
*
* .yandex.cloud.billing.v1.CostBudgetSpec cost_budget = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec, yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec.Builder, yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpecOrBuilder>
getCostBudgetFieldBuilder() {
if (costBudgetBuilder_ == null) {
if (!(budgetSpecCase_ == 6)) {
budgetSpec_ = yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec.getDefaultInstance();
}
costBudgetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec, yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec.Builder, yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpecOrBuilder>(
(yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec) budgetSpec_,
getParentForChildren(),
isClean());
budgetSpec_ = null;
}
budgetSpecCase_ = 6;
onChanged();;
return costBudgetBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec, yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec.Builder, yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpecOrBuilder> expenseBudgetBuilder_;
/**
*
* Expense budget specification.
*
*
* .yandex.cloud.billing.v1.ExpenseBudgetSpec expense_budget = 7;
* @return Whether the expenseBudget field is set.
*/
@java.lang.Override
public boolean hasExpenseBudget() {
return budgetSpecCase_ == 7;
}
/**
*
* Expense budget specification.
*
*
* .yandex.cloud.billing.v1.ExpenseBudgetSpec expense_budget = 7;
* @return The expenseBudget.
*/
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec getExpenseBudget() {
if (expenseBudgetBuilder_ == null) {
if (budgetSpecCase_ == 7) {
return (yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec) budgetSpec_;
}
return yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec.getDefaultInstance();
} else {
if (budgetSpecCase_ == 7) {
return expenseBudgetBuilder_.getMessage();
}
return yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec.getDefaultInstance();
}
}
/**
*
* Expense budget specification.
*
*
* .yandex.cloud.billing.v1.ExpenseBudgetSpec expense_budget = 7;
*/
public Builder setExpenseBudget(yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec value) {
if (expenseBudgetBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
budgetSpec_ = value;
onChanged();
} else {
expenseBudgetBuilder_.setMessage(value);
}
budgetSpecCase_ = 7;
return this;
}
/**
*
* Expense budget specification.
*
*
* .yandex.cloud.billing.v1.ExpenseBudgetSpec expense_budget = 7;
*/
public Builder setExpenseBudget(
yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec.Builder builderForValue) {
if (expenseBudgetBuilder_ == null) {
budgetSpec_ = builderForValue.build();
onChanged();
} else {
expenseBudgetBuilder_.setMessage(builderForValue.build());
}
budgetSpecCase_ = 7;
return this;
}
/**
*
* Expense budget specification.
*
*
* .yandex.cloud.billing.v1.ExpenseBudgetSpec expense_budget = 7;
*/
public Builder mergeExpenseBudget(yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec value) {
if (expenseBudgetBuilder_ == null) {
if (budgetSpecCase_ == 7 &&
budgetSpec_ != yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec.getDefaultInstance()) {
budgetSpec_ = yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec.newBuilder((yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec) budgetSpec_)
.mergeFrom(value).buildPartial();
} else {
budgetSpec_ = value;
}
onChanged();
} else {
if (budgetSpecCase_ == 7) {
expenseBudgetBuilder_.mergeFrom(value);
}
expenseBudgetBuilder_.setMessage(value);
}
budgetSpecCase_ = 7;
return this;
}
/**
*
* Expense budget specification.
*
*
* .yandex.cloud.billing.v1.ExpenseBudgetSpec expense_budget = 7;
*/
public Builder clearExpenseBudget() {
if (expenseBudgetBuilder_ == null) {
if (budgetSpecCase_ == 7) {
budgetSpecCase_ = 0;
budgetSpec_ = null;
onChanged();
}
} else {
if (budgetSpecCase_ == 7) {
budgetSpecCase_ = 0;
budgetSpec_ = null;
}
expenseBudgetBuilder_.clear();
}
return this;
}
/**
*
* Expense budget specification.
*
*
* .yandex.cloud.billing.v1.ExpenseBudgetSpec expense_budget = 7;
*/
public yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec.Builder getExpenseBudgetBuilder() {
return getExpenseBudgetFieldBuilder().getBuilder();
}
/**
*
* Expense budget specification.
*
*
* .yandex.cloud.billing.v1.ExpenseBudgetSpec expense_budget = 7;
*/
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpecOrBuilder getExpenseBudgetOrBuilder() {
if ((budgetSpecCase_ == 7) && (expenseBudgetBuilder_ != null)) {
return expenseBudgetBuilder_.getMessageOrBuilder();
} else {
if (budgetSpecCase_ == 7) {
return (yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec) budgetSpec_;
}
return yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec.getDefaultInstance();
}
}
/**
*
* Expense budget specification.
*
*
* .yandex.cloud.billing.v1.ExpenseBudgetSpec expense_budget = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec, yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec.Builder, yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpecOrBuilder>
getExpenseBudgetFieldBuilder() {
if (expenseBudgetBuilder_ == null) {
if (!(budgetSpecCase_ == 7)) {
budgetSpec_ = yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec.getDefaultInstance();
}
expenseBudgetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec, yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec.Builder, yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpecOrBuilder>(
(yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec) budgetSpec_,
getParentForChildren(),
isClean());
budgetSpec_ = null;
}
budgetSpecCase_ = 7;
onChanged();;
return expenseBudgetBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec, yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec.Builder, yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpecOrBuilder> balanceBudgetBuilder_;
/**
*
* Balance budget specification.
*
*
* .yandex.cloud.billing.v1.BalanceBudgetSpec balance_budget = 8;
* @return Whether the balanceBudget field is set.
*/
@java.lang.Override
public boolean hasBalanceBudget() {
return budgetSpecCase_ == 8;
}
/**
*
* Balance budget specification.
*
*
* .yandex.cloud.billing.v1.BalanceBudgetSpec balance_budget = 8;
* @return The balanceBudget.
*/
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec getBalanceBudget() {
if (balanceBudgetBuilder_ == null) {
if (budgetSpecCase_ == 8) {
return (yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec) budgetSpec_;
}
return yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec.getDefaultInstance();
} else {
if (budgetSpecCase_ == 8) {
return balanceBudgetBuilder_.getMessage();
}
return yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec.getDefaultInstance();
}
}
/**
*
* Balance budget specification.
*
*
* .yandex.cloud.billing.v1.BalanceBudgetSpec balance_budget = 8;
*/
public Builder setBalanceBudget(yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec value) {
if (balanceBudgetBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
budgetSpec_ = value;
onChanged();
} else {
balanceBudgetBuilder_.setMessage(value);
}
budgetSpecCase_ = 8;
return this;
}
/**
*
* Balance budget specification.
*
*
* .yandex.cloud.billing.v1.BalanceBudgetSpec balance_budget = 8;
*/
public Builder setBalanceBudget(
yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec.Builder builderForValue) {
if (balanceBudgetBuilder_ == null) {
budgetSpec_ = builderForValue.build();
onChanged();
} else {
balanceBudgetBuilder_.setMessage(builderForValue.build());
}
budgetSpecCase_ = 8;
return this;
}
/**
*
* Balance budget specification.
*
*
* .yandex.cloud.billing.v1.BalanceBudgetSpec balance_budget = 8;
*/
public Builder mergeBalanceBudget(yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec value) {
if (balanceBudgetBuilder_ == null) {
if (budgetSpecCase_ == 8 &&
budgetSpec_ != yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec.getDefaultInstance()) {
budgetSpec_ = yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec.newBuilder((yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec) budgetSpec_)
.mergeFrom(value).buildPartial();
} else {
budgetSpec_ = value;
}
onChanged();
} else {
if (budgetSpecCase_ == 8) {
balanceBudgetBuilder_.mergeFrom(value);
}
balanceBudgetBuilder_.setMessage(value);
}
budgetSpecCase_ = 8;
return this;
}
/**
*
* Balance budget specification.
*
*
* .yandex.cloud.billing.v1.BalanceBudgetSpec balance_budget = 8;
*/
public Builder clearBalanceBudget() {
if (balanceBudgetBuilder_ == null) {
if (budgetSpecCase_ == 8) {
budgetSpecCase_ = 0;
budgetSpec_ = null;
onChanged();
}
} else {
if (budgetSpecCase_ == 8) {
budgetSpecCase_ = 0;
budgetSpec_ = null;
}
balanceBudgetBuilder_.clear();
}
return this;
}
/**
*
* Balance budget specification.
*
*
* .yandex.cloud.billing.v1.BalanceBudgetSpec balance_budget = 8;
*/
public yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec.Builder getBalanceBudgetBuilder() {
return getBalanceBudgetFieldBuilder().getBuilder();
}
/**
*
* Balance budget specification.
*
*
* .yandex.cloud.billing.v1.BalanceBudgetSpec balance_budget = 8;
*/
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpecOrBuilder getBalanceBudgetOrBuilder() {
if ((budgetSpecCase_ == 8) && (balanceBudgetBuilder_ != null)) {
return balanceBudgetBuilder_.getMessageOrBuilder();
} else {
if (budgetSpecCase_ == 8) {
return (yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec) budgetSpec_;
}
return yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec.getDefaultInstance();
}
}
/**
*
* Balance budget specification.
*
*
* .yandex.cloud.billing.v1.BalanceBudgetSpec balance_budget = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec, yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec.Builder, yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpecOrBuilder>
getBalanceBudgetFieldBuilder() {
if (balanceBudgetBuilder_ == null) {
if (!(budgetSpecCase_ == 8)) {
budgetSpec_ = yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec.getDefaultInstance();
}
balanceBudgetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec, yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec.Builder, yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpecOrBuilder>(
(yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec) budgetSpec_,
getParentForChildren(),
isClean());
budgetSpec_ = null;
}
budgetSpecCase_ = 8;
onChanged();;
return balanceBudgetBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:yandex.cloud.billing.v1.Budget)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.billing.v1.Budget)
private static final yandex.cloud.api.billing.v1.BudgetOuterClass.Budget DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.billing.v1.BudgetOuterClass.Budget();
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.Budget getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Budget parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Budget(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.Budget getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CostBudgetSpecOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.billing.v1.CostBudgetSpec)
com.google.protobuf.MessageOrBuilder {
/**
*
* Max cost threshold of the budget. Amount currency is the same as corresponding [yandex.cloud.billing.v1.BillingAccount.currency].
*
*
* string amount = 1 [(.yandex.cloud.required) = true];
* @return The amount.
*/
java.lang.String getAmount();
/**
*
* Max cost threshold of the budget. Amount currency is the same as corresponding [yandex.cloud.billing.v1.BillingAccount.currency].
*
*
* string amount = 1 [(.yandex.cloud.required) = true];
* @return The bytes for amount.
*/
com.google.protobuf.ByteString
getAmountBytes();
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @return A list containing the notificationUserAccountIds.
*/
java.util.List
getNotificationUserAccountIdsList();
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @return The count of notificationUserAccountIds.
*/
int getNotificationUserAccountIdsCount();
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @param index The index of the element to return.
* @return The notificationUserAccountIds at the given index.
*/
java.lang.String getNotificationUserAccountIds(int index);
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @param index The index of the value to return.
* @return The bytes of the notificationUserAccountIds at the given index.
*/
com.google.protobuf.ByteString
getNotificationUserAccountIdsBytes(int index);
/**
*
* List of the [ThresholdRule].
* Rules define intermediate cost thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
java.util.List
getThresholdRulesList();
/**
*
* List of the [ThresholdRule].
* Rules define intermediate cost thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule getThresholdRules(int index);
/**
*
* List of the [ThresholdRule].
* Rules define intermediate cost thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
int getThresholdRulesCount();
/**
*
* List of the [ThresholdRule].
* Rules define intermediate cost thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
java.util.List extends yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRuleOrBuilder>
getThresholdRulesOrBuilderList();
/**
*
* List of the [ThresholdRule].
* Rules define intermediate cost thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRuleOrBuilder getThresholdRulesOrBuilder(
int index);
/**
*
* Filter that can be used for specific resources selection. Only consumption cost of selected resources are used for the budget calculation.
*
*
* .yandex.cloud.billing.v1.ConsumptionFilter filter = 4;
* @return Whether the filter field is set.
*/
boolean hasFilter();
/**
*
* Filter that can be used for specific resources selection. Only consumption cost of selected resources are used for the budget calculation.
*
*
* .yandex.cloud.billing.v1.ConsumptionFilter filter = 4;
* @return The filter.
*/
yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter getFilter();
/**
*
* Filter that can be used for specific resources selection. Only consumption cost of selected resources are used for the budget calculation.
*
*
* .yandex.cloud.billing.v1.ConsumptionFilter filter = 4;
*/
yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilterOrBuilder getFilterOrBuilder();
/**
*
* Periodic start type that resets budget after specified period is finished.
* First time budget is calculated in the current period, i.e. current month, quarter or year.
*
*
* .yandex.cloud.billing.v1.ResetPeriodType reset_period = 5;
* @return Whether the resetPeriod field is set.
*/
boolean hasResetPeriod();
/**
*
* Periodic start type that resets budget after specified period is finished.
* First time budget is calculated in the current period, i.e. current month, quarter or year.
*
*
* .yandex.cloud.billing.v1.ResetPeriodType reset_period = 5;
* @return The enum numeric value on the wire for resetPeriod.
*/
int getResetPeriodValue();
/**
*
* Periodic start type that resets budget after specified period is finished.
* First time budget is calculated in the current period, i.e. current month, quarter or year.
*
*
* .yandex.cloud.billing.v1.ResetPeriodType reset_period = 5;
* @return The resetPeriod.
*/
yandex.cloud.api.billing.v1.BudgetOuterClass.ResetPeriodType getResetPeriod();
/**
*
* Custom start date of the budget.
* Must be the first day of a month and must be formatted like YYYY-MM-DD.
*
*
* string start_date = 6;
* @return Whether the startDate field is set.
*/
boolean hasStartDate();
/**
*
* Custom start date of the budget.
* Must be the first day of a month and must be formatted like YYYY-MM-DD.
*
*
* string start_date = 6;
* @return The startDate.
*/
java.lang.String getStartDate();
/**
*
* Custom start date of the budget.
* Must be the first day of a month and must be formatted like YYYY-MM-DD.
*
*
* string start_date = 6;
* @return The bytes for startDate.
*/
com.google.protobuf.ByteString
getStartDateBytes();
/**
*
* End date of the budget.
* Must be the last day of a month and must be formatted like YYYY-MM-DD.
*
*
* string end_date = 7 [(.yandex.cloud.required) = true];
* @return The endDate.
*/
java.lang.String getEndDate();
/**
*
* End date of the budget.
* Must be the last day of a month and must be formatted like YYYY-MM-DD.
*
*
* string end_date = 7 [(.yandex.cloud.required) = true];
* @return The bytes for endDate.
*/
com.google.protobuf.ByteString
getEndDateBytes();
public yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec.StartTypeCase getStartTypeCase();
}
/**
*
* Cost budget specification describes budget that can be used to control cost of cloud resources usage.
*
*
* Protobuf type {@code yandex.cloud.billing.v1.CostBudgetSpec}
*/
public static final class CostBudgetSpec extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.billing.v1.CostBudgetSpec)
CostBudgetSpecOrBuilder {
private static final long serialVersionUID = 0L;
// Use CostBudgetSpec.newBuilder() to construct.
private CostBudgetSpec(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CostBudgetSpec() {
amount_ = "";
notificationUserAccountIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
thresholdRules_ = java.util.Collections.emptyList();
endDate_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CostBudgetSpec();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private CostBudgetSpec(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
amount_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
notificationUserAccountIds_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000001;
}
notificationUserAccountIds_.add(s);
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
thresholdRules_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
thresholdRules_.add(
input.readMessage(yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.parser(), extensionRegistry));
break;
}
case 34: {
yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter.Builder subBuilder = null;
if (filter_ != null) {
subBuilder = filter_.toBuilder();
}
filter_ = input.readMessage(yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(filter_);
filter_ = subBuilder.buildPartial();
}
break;
}
case 40: {
int rawValue = input.readEnum();
startTypeCase_ = 5;
startType_ = rawValue;
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
startTypeCase_ = 6;
startType_ = s;
break;
}
case 58: {
java.lang.String s = input.readStringRequireUtf8();
endDate_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
notificationUserAccountIds_ = notificationUserAccountIds_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
thresholdRules_ = java.util.Collections.unmodifiableList(thresholdRules_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.internal_static_yandex_cloud_billing_v1_CostBudgetSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.internal_static_yandex_cloud_billing_v1_CostBudgetSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec.class, yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec.Builder.class);
}
private int startTypeCase_ = 0;
private java.lang.Object startType_;
public enum StartTypeCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
RESET_PERIOD(5),
START_DATE(6),
STARTTYPE_NOT_SET(0);
private final int value;
private StartTypeCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static StartTypeCase valueOf(int value) {
return forNumber(value);
}
public static StartTypeCase forNumber(int value) {
switch (value) {
case 5: return RESET_PERIOD;
case 6: return START_DATE;
case 0: return STARTTYPE_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public StartTypeCase
getStartTypeCase() {
return StartTypeCase.forNumber(
startTypeCase_);
}
public static final int AMOUNT_FIELD_NUMBER = 1;
private volatile java.lang.Object amount_;
/**
*
* Max cost threshold of the budget. Amount currency is the same as corresponding [yandex.cloud.billing.v1.BillingAccount.currency].
*
*
* string amount = 1 [(.yandex.cloud.required) = true];
* @return The amount.
*/
@java.lang.Override
public java.lang.String getAmount() {
java.lang.Object ref = amount_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
amount_ = s;
return s;
}
}
/**
*
* Max cost threshold of the budget. Amount currency is the same as corresponding [yandex.cloud.billing.v1.BillingAccount.currency].
*
*
* string amount = 1 [(.yandex.cloud.required) = true];
* @return The bytes for amount.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getAmountBytes() {
java.lang.Object ref = amount_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
amount_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int NOTIFICATION_USER_ACCOUNT_IDS_FIELD_NUMBER = 2;
private com.google.protobuf.LazyStringList notificationUserAccountIds_;
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @return A list containing the notificationUserAccountIds.
*/
public com.google.protobuf.ProtocolStringList
getNotificationUserAccountIdsList() {
return notificationUserAccountIds_;
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @return The count of notificationUserAccountIds.
*/
public int getNotificationUserAccountIdsCount() {
return notificationUserAccountIds_.size();
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @param index The index of the element to return.
* @return The notificationUserAccountIds at the given index.
*/
public java.lang.String getNotificationUserAccountIds(int index) {
return notificationUserAccountIds_.get(index);
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @param index The index of the value to return.
* @return The bytes of the notificationUserAccountIds at the given index.
*/
public com.google.protobuf.ByteString
getNotificationUserAccountIdsBytes(int index) {
return notificationUserAccountIds_.getByteString(index);
}
public static final int THRESHOLD_RULES_FIELD_NUMBER = 3;
private java.util.List thresholdRules_;
/**
*
* List of the [ThresholdRule].
* Rules define intermediate cost thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
@java.lang.Override
public java.util.List getThresholdRulesList() {
return thresholdRules_;
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate cost thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
@java.lang.Override
public java.util.List extends yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRuleOrBuilder>
getThresholdRulesOrBuilderList() {
return thresholdRules_;
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate cost thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
@java.lang.Override
public int getThresholdRulesCount() {
return thresholdRules_.size();
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate cost thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule getThresholdRules(int index) {
return thresholdRules_.get(index);
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate cost thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRuleOrBuilder getThresholdRulesOrBuilder(
int index) {
return thresholdRules_.get(index);
}
public static final int FILTER_FIELD_NUMBER = 4;
private yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter filter_;
/**
*
* Filter that can be used for specific resources selection. Only consumption cost of selected resources are used for the budget calculation.
*
*
* .yandex.cloud.billing.v1.ConsumptionFilter filter = 4;
* @return Whether the filter field is set.
*/
@java.lang.Override
public boolean hasFilter() {
return filter_ != null;
}
/**
*
* Filter that can be used for specific resources selection. Only consumption cost of selected resources are used for the budget calculation.
*
*
* .yandex.cloud.billing.v1.ConsumptionFilter filter = 4;
* @return The filter.
*/
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter getFilter() {
return filter_ == null ? yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter.getDefaultInstance() : filter_;
}
/**
*
* Filter that can be used for specific resources selection. Only consumption cost of selected resources are used for the budget calculation.
*
*
* .yandex.cloud.billing.v1.ConsumptionFilter filter = 4;
*/
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilterOrBuilder getFilterOrBuilder() {
return getFilter();
}
public static final int RESET_PERIOD_FIELD_NUMBER = 5;
/**
*
* Periodic start type that resets budget after specified period is finished.
* First time budget is calculated in the current period, i.e. current month, quarter or year.
*
*
* .yandex.cloud.billing.v1.ResetPeriodType reset_period = 5;
* @return Whether the resetPeriod field is set.
*/
public boolean hasResetPeriod() {
return startTypeCase_ == 5;
}
/**
*
* Periodic start type that resets budget after specified period is finished.
* First time budget is calculated in the current period, i.e. current month, quarter or year.
*
*
* .yandex.cloud.billing.v1.ResetPeriodType reset_period = 5;
* @return The enum numeric value on the wire for resetPeriod.
*/
public int getResetPeriodValue() {
if (startTypeCase_ == 5) {
return (java.lang.Integer) startType_;
}
return 0;
}
/**
*
* Periodic start type that resets budget after specified period is finished.
* First time budget is calculated in the current period, i.e. current month, quarter or year.
*
*
* .yandex.cloud.billing.v1.ResetPeriodType reset_period = 5;
* @return The resetPeriod.
*/
public yandex.cloud.api.billing.v1.BudgetOuterClass.ResetPeriodType getResetPeriod() {
if (startTypeCase_ == 5) {
@SuppressWarnings("deprecation")
yandex.cloud.api.billing.v1.BudgetOuterClass.ResetPeriodType result = yandex.cloud.api.billing.v1.BudgetOuterClass.ResetPeriodType.valueOf(
(java.lang.Integer) startType_);
return result == null ? yandex.cloud.api.billing.v1.BudgetOuterClass.ResetPeriodType.UNRECOGNIZED : result;
}
return yandex.cloud.api.billing.v1.BudgetOuterClass.ResetPeriodType.RESET_PERIOD_TYPE_UNSPECIFIED;
}
public static final int START_DATE_FIELD_NUMBER = 6;
/**
*
* Custom start date of the budget.
* Must be the first day of a month and must be formatted like YYYY-MM-DD.
*
*
* string start_date = 6;
* @return Whether the startDate field is set.
*/
public boolean hasStartDate() {
return startTypeCase_ == 6;
}
/**
*
* Custom start date of the budget.
* Must be the first day of a month and must be formatted like YYYY-MM-DD.
*
*
* string start_date = 6;
* @return The startDate.
*/
public java.lang.String getStartDate() {
java.lang.Object ref = "";
if (startTypeCase_ == 6) {
ref = startType_;
}
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (startTypeCase_ == 6) {
startType_ = s;
}
return s;
}
}
/**
*
* Custom start date of the budget.
* Must be the first day of a month and must be formatted like YYYY-MM-DD.
*
*
* string start_date = 6;
* @return The bytes for startDate.
*/
public com.google.protobuf.ByteString
getStartDateBytes() {
java.lang.Object ref = "";
if (startTypeCase_ == 6) {
ref = startType_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (startTypeCase_ == 6) {
startType_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int END_DATE_FIELD_NUMBER = 7;
private volatile java.lang.Object endDate_;
/**
*
* End date of the budget.
* Must be the last day of a month and must be formatted like YYYY-MM-DD.
*
*
* string end_date = 7 [(.yandex.cloud.required) = true];
* @return The endDate.
*/
@java.lang.Override
public java.lang.String getEndDate() {
java.lang.Object ref = endDate_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
endDate_ = s;
return s;
}
}
/**
*
* End date of the budget.
* Must be the last day of a month and must be formatted like YYYY-MM-DD.
*
*
* string end_date = 7 [(.yandex.cloud.required) = true];
* @return The bytes for endDate.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getEndDateBytes() {
java.lang.Object ref = endDate_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
endDate_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(amount_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, amount_);
}
for (int i = 0; i < notificationUserAccountIds_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, notificationUserAccountIds_.getRaw(i));
}
for (int i = 0; i < thresholdRules_.size(); i++) {
output.writeMessage(3, thresholdRules_.get(i));
}
if (filter_ != null) {
output.writeMessage(4, getFilter());
}
if (startTypeCase_ == 5) {
output.writeEnum(5, ((java.lang.Integer) startType_));
}
if (startTypeCase_ == 6) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, startType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endDate_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, endDate_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(amount_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, amount_);
}
{
int dataSize = 0;
for (int i = 0; i < notificationUserAccountIds_.size(); i++) {
dataSize += computeStringSizeNoTag(notificationUserAccountIds_.getRaw(i));
}
size += dataSize;
size += 1 * getNotificationUserAccountIdsList().size();
}
for (int i = 0; i < thresholdRules_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, thresholdRules_.get(i));
}
if (filter_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getFilter());
}
if (startTypeCase_ == 5) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(5, ((java.lang.Integer) startType_));
}
if (startTypeCase_ == 6) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, startType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endDate_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, endDate_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec)) {
return super.equals(obj);
}
yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec other = (yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec) obj;
if (!getAmount()
.equals(other.getAmount())) return false;
if (!getNotificationUserAccountIdsList()
.equals(other.getNotificationUserAccountIdsList())) return false;
if (!getThresholdRulesList()
.equals(other.getThresholdRulesList())) return false;
if (hasFilter() != other.hasFilter()) return false;
if (hasFilter()) {
if (!getFilter()
.equals(other.getFilter())) return false;
}
if (!getEndDate()
.equals(other.getEndDate())) return false;
if (!getStartTypeCase().equals(other.getStartTypeCase())) return false;
switch (startTypeCase_) {
case 5:
if (getResetPeriodValue()
!= other.getResetPeriodValue()) return false;
break;
case 6:
if (!getStartDate()
.equals(other.getStartDate())) return false;
break;
case 0:
default:
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + AMOUNT_FIELD_NUMBER;
hash = (53 * hash) + getAmount().hashCode();
if (getNotificationUserAccountIdsCount() > 0) {
hash = (37 * hash) + NOTIFICATION_USER_ACCOUNT_IDS_FIELD_NUMBER;
hash = (53 * hash) + getNotificationUserAccountIdsList().hashCode();
}
if (getThresholdRulesCount() > 0) {
hash = (37 * hash) + THRESHOLD_RULES_FIELD_NUMBER;
hash = (53 * hash) + getThresholdRulesList().hashCode();
}
if (hasFilter()) {
hash = (37 * hash) + FILTER_FIELD_NUMBER;
hash = (53 * hash) + getFilter().hashCode();
}
hash = (37 * hash) + END_DATE_FIELD_NUMBER;
hash = (53 * hash) + getEndDate().hashCode();
switch (startTypeCase_) {
case 5:
hash = (37 * hash) + RESET_PERIOD_FIELD_NUMBER;
hash = (53 * hash) + getResetPeriodValue();
break;
case 6:
hash = (37 * hash) + START_DATE_FIELD_NUMBER;
hash = (53 * hash) + getStartDate().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Cost budget specification describes budget that can be used to control cost of cloud resources usage.
*
*
* Protobuf type {@code yandex.cloud.billing.v1.CostBudgetSpec}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.billing.v1.CostBudgetSpec)
yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpecOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.internal_static_yandex_cloud_billing_v1_CostBudgetSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.internal_static_yandex_cloud_billing_v1_CostBudgetSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec.class, yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec.Builder.class);
}
// Construct using yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getThresholdRulesFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
amount_ = "";
notificationUserAccountIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
if (thresholdRulesBuilder_ == null) {
thresholdRules_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
thresholdRulesBuilder_.clear();
}
if (filterBuilder_ == null) {
filter_ = null;
} else {
filter_ = null;
filterBuilder_ = null;
}
endDate_ = "";
startTypeCase_ = 0;
startType_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.internal_static_yandex_cloud_billing_v1_CostBudgetSpec_descriptor;
}
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec getDefaultInstanceForType() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec build() {
yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec buildPartial() {
yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec result = new yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec(this);
int from_bitField0_ = bitField0_;
result.amount_ = amount_;
if (((bitField0_ & 0x00000001) != 0)) {
notificationUserAccountIds_ = notificationUserAccountIds_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.notificationUserAccountIds_ = notificationUserAccountIds_;
if (thresholdRulesBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
thresholdRules_ = java.util.Collections.unmodifiableList(thresholdRules_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.thresholdRules_ = thresholdRules_;
} else {
result.thresholdRules_ = thresholdRulesBuilder_.build();
}
if (filterBuilder_ == null) {
result.filter_ = filter_;
} else {
result.filter_ = filterBuilder_.build();
}
if (startTypeCase_ == 5) {
result.startType_ = startType_;
}
if (startTypeCase_ == 6) {
result.startType_ = startType_;
}
result.endDate_ = endDate_;
result.startTypeCase_ = startTypeCase_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec) {
return mergeFrom((yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec other) {
if (other == yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec.getDefaultInstance()) return this;
if (!other.getAmount().isEmpty()) {
amount_ = other.amount_;
onChanged();
}
if (!other.notificationUserAccountIds_.isEmpty()) {
if (notificationUserAccountIds_.isEmpty()) {
notificationUserAccountIds_ = other.notificationUserAccountIds_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureNotificationUserAccountIdsIsMutable();
notificationUserAccountIds_.addAll(other.notificationUserAccountIds_);
}
onChanged();
}
if (thresholdRulesBuilder_ == null) {
if (!other.thresholdRules_.isEmpty()) {
if (thresholdRules_.isEmpty()) {
thresholdRules_ = other.thresholdRules_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureThresholdRulesIsMutable();
thresholdRules_.addAll(other.thresholdRules_);
}
onChanged();
}
} else {
if (!other.thresholdRules_.isEmpty()) {
if (thresholdRulesBuilder_.isEmpty()) {
thresholdRulesBuilder_.dispose();
thresholdRulesBuilder_ = null;
thresholdRules_ = other.thresholdRules_;
bitField0_ = (bitField0_ & ~0x00000002);
thresholdRulesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getThresholdRulesFieldBuilder() : null;
} else {
thresholdRulesBuilder_.addAllMessages(other.thresholdRules_);
}
}
}
if (other.hasFilter()) {
mergeFilter(other.getFilter());
}
if (!other.getEndDate().isEmpty()) {
endDate_ = other.endDate_;
onChanged();
}
switch (other.getStartTypeCase()) {
case RESET_PERIOD: {
setResetPeriodValue(other.getResetPeriodValue());
break;
}
case START_DATE: {
startTypeCase_ = 6;
startType_ = other.startType_;
onChanged();
break;
}
case STARTTYPE_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int startTypeCase_ = 0;
private java.lang.Object startType_;
public StartTypeCase
getStartTypeCase() {
return StartTypeCase.forNumber(
startTypeCase_);
}
public Builder clearStartType() {
startTypeCase_ = 0;
startType_ = null;
onChanged();
return this;
}
private int bitField0_;
private java.lang.Object amount_ = "";
/**
*
* Max cost threshold of the budget. Amount currency is the same as corresponding [yandex.cloud.billing.v1.BillingAccount.currency].
*
*
* string amount = 1 [(.yandex.cloud.required) = true];
* @return The amount.
*/
public java.lang.String getAmount() {
java.lang.Object ref = amount_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
amount_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Max cost threshold of the budget. Amount currency is the same as corresponding [yandex.cloud.billing.v1.BillingAccount.currency].
*
*
* string amount = 1 [(.yandex.cloud.required) = true];
* @return The bytes for amount.
*/
public com.google.protobuf.ByteString
getAmountBytes() {
java.lang.Object ref = amount_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
amount_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Max cost threshold of the budget. Amount currency is the same as corresponding [yandex.cloud.billing.v1.BillingAccount.currency].
*
*
* string amount = 1 [(.yandex.cloud.required) = true];
* @param value The amount to set.
* @return This builder for chaining.
*/
public Builder setAmount(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
amount_ = value;
onChanged();
return this;
}
/**
*
* Max cost threshold of the budget. Amount currency is the same as corresponding [yandex.cloud.billing.v1.BillingAccount.currency].
*
*
* string amount = 1 [(.yandex.cloud.required) = true];
* @return This builder for chaining.
*/
public Builder clearAmount() {
amount_ = getDefaultInstance().getAmount();
onChanged();
return this;
}
/**
*
* Max cost threshold of the budget. Amount currency is the same as corresponding [yandex.cloud.billing.v1.BillingAccount.currency].
*
*
* string amount = 1 [(.yandex.cloud.required) = true];
* @param value The bytes for amount to set.
* @return This builder for chaining.
*/
public Builder setAmountBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
amount_ = value;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList notificationUserAccountIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureNotificationUserAccountIdsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
notificationUserAccountIds_ = new com.google.protobuf.LazyStringArrayList(notificationUserAccountIds_);
bitField0_ |= 0x00000001;
}
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @return A list containing the notificationUserAccountIds.
*/
public com.google.protobuf.ProtocolStringList
getNotificationUserAccountIdsList() {
return notificationUserAccountIds_.getUnmodifiableView();
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @return The count of notificationUserAccountIds.
*/
public int getNotificationUserAccountIdsCount() {
return notificationUserAccountIds_.size();
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @param index The index of the element to return.
* @return The notificationUserAccountIds at the given index.
*/
public java.lang.String getNotificationUserAccountIds(int index) {
return notificationUserAccountIds_.get(index);
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @param index The index of the value to return.
* @return The bytes of the notificationUserAccountIds at the given index.
*/
public com.google.protobuf.ByteString
getNotificationUserAccountIdsBytes(int index) {
return notificationUserAccountIds_.getByteString(index);
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @param index The index to set the value at.
* @param value The notificationUserAccountIds to set.
* @return This builder for chaining.
*/
public Builder setNotificationUserAccountIds(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureNotificationUserAccountIdsIsMutable();
notificationUserAccountIds_.set(index, value);
onChanged();
return this;
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @param value The notificationUserAccountIds to add.
* @return This builder for chaining.
*/
public Builder addNotificationUserAccountIds(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureNotificationUserAccountIdsIsMutable();
notificationUserAccountIds_.add(value);
onChanged();
return this;
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @param values The notificationUserAccountIds to add.
* @return This builder for chaining.
*/
public Builder addAllNotificationUserAccountIds(
java.lang.Iterable values) {
ensureNotificationUserAccountIdsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, notificationUserAccountIds_);
onChanged();
return this;
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @return This builder for chaining.
*/
public Builder clearNotificationUserAccountIds() {
notificationUserAccountIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @param value The bytes of the notificationUserAccountIds to add.
* @return This builder for chaining.
*/
public Builder addNotificationUserAccountIdsBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureNotificationUserAccountIdsIsMutable();
notificationUserAccountIds_.add(value);
onChanged();
return this;
}
private java.util.List thresholdRules_ =
java.util.Collections.emptyList();
private void ensureThresholdRulesIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
thresholdRules_ = new java.util.ArrayList(thresholdRules_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule, yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.Builder, yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRuleOrBuilder> thresholdRulesBuilder_;
/**
*
* List of the [ThresholdRule].
* Rules define intermediate cost thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public java.util.List getThresholdRulesList() {
if (thresholdRulesBuilder_ == null) {
return java.util.Collections.unmodifiableList(thresholdRules_);
} else {
return thresholdRulesBuilder_.getMessageList();
}
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate cost thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public int getThresholdRulesCount() {
if (thresholdRulesBuilder_ == null) {
return thresholdRules_.size();
} else {
return thresholdRulesBuilder_.getCount();
}
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate cost thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule getThresholdRules(int index) {
if (thresholdRulesBuilder_ == null) {
return thresholdRules_.get(index);
} else {
return thresholdRulesBuilder_.getMessage(index);
}
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate cost thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public Builder setThresholdRules(
int index, yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule value) {
if (thresholdRulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureThresholdRulesIsMutable();
thresholdRules_.set(index, value);
onChanged();
} else {
thresholdRulesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate cost thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public Builder setThresholdRules(
int index, yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.Builder builderForValue) {
if (thresholdRulesBuilder_ == null) {
ensureThresholdRulesIsMutable();
thresholdRules_.set(index, builderForValue.build());
onChanged();
} else {
thresholdRulesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate cost thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public Builder addThresholdRules(yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule value) {
if (thresholdRulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureThresholdRulesIsMutable();
thresholdRules_.add(value);
onChanged();
} else {
thresholdRulesBuilder_.addMessage(value);
}
return this;
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate cost thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public Builder addThresholdRules(
int index, yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule value) {
if (thresholdRulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureThresholdRulesIsMutable();
thresholdRules_.add(index, value);
onChanged();
} else {
thresholdRulesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate cost thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public Builder addThresholdRules(
yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.Builder builderForValue) {
if (thresholdRulesBuilder_ == null) {
ensureThresholdRulesIsMutable();
thresholdRules_.add(builderForValue.build());
onChanged();
} else {
thresholdRulesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate cost thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public Builder addThresholdRules(
int index, yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.Builder builderForValue) {
if (thresholdRulesBuilder_ == null) {
ensureThresholdRulesIsMutable();
thresholdRules_.add(index, builderForValue.build());
onChanged();
} else {
thresholdRulesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate cost thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public Builder addAllThresholdRules(
java.lang.Iterable extends yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule> values) {
if (thresholdRulesBuilder_ == null) {
ensureThresholdRulesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, thresholdRules_);
onChanged();
} else {
thresholdRulesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate cost thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public Builder clearThresholdRules() {
if (thresholdRulesBuilder_ == null) {
thresholdRules_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
thresholdRulesBuilder_.clear();
}
return this;
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate cost thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public Builder removeThresholdRules(int index) {
if (thresholdRulesBuilder_ == null) {
ensureThresholdRulesIsMutable();
thresholdRules_.remove(index);
onChanged();
} else {
thresholdRulesBuilder_.remove(index);
}
return this;
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate cost thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.Builder getThresholdRulesBuilder(
int index) {
return getThresholdRulesFieldBuilder().getBuilder(index);
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate cost thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRuleOrBuilder getThresholdRulesOrBuilder(
int index) {
if (thresholdRulesBuilder_ == null) {
return thresholdRules_.get(index); } else {
return thresholdRulesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate cost thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public java.util.List extends yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRuleOrBuilder>
getThresholdRulesOrBuilderList() {
if (thresholdRulesBuilder_ != null) {
return thresholdRulesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(thresholdRules_);
}
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate cost thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.Builder addThresholdRulesBuilder() {
return getThresholdRulesFieldBuilder().addBuilder(
yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.getDefaultInstance());
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate cost thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.Builder addThresholdRulesBuilder(
int index) {
return getThresholdRulesFieldBuilder().addBuilder(
index, yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.getDefaultInstance());
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate cost thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public java.util.List
getThresholdRulesBuilderList() {
return getThresholdRulesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule, yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.Builder, yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRuleOrBuilder>
getThresholdRulesFieldBuilder() {
if (thresholdRulesBuilder_ == null) {
thresholdRulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule, yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.Builder, yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRuleOrBuilder>(
thresholdRules_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
thresholdRules_ = null;
}
return thresholdRulesBuilder_;
}
private yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter filter_;
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter, yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter.Builder, yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilterOrBuilder> filterBuilder_;
/**
*
* Filter that can be used for specific resources selection. Only consumption cost of selected resources are used for the budget calculation.
*
*
* .yandex.cloud.billing.v1.ConsumptionFilter filter = 4;
* @return Whether the filter field is set.
*/
public boolean hasFilter() {
return filterBuilder_ != null || filter_ != null;
}
/**
*
* Filter that can be used for specific resources selection. Only consumption cost of selected resources are used for the budget calculation.
*
*
* .yandex.cloud.billing.v1.ConsumptionFilter filter = 4;
* @return The filter.
*/
public yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter getFilter() {
if (filterBuilder_ == null) {
return filter_ == null ? yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter.getDefaultInstance() : filter_;
} else {
return filterBuilder_.getMessage();
}
}
/**
*
* Filter that can be used for specific resources selection. Only consumption cost of selected resources are used for the budget calculation.
*
*
* .yandex.cloud.billing.v1.ConsumptionFilter filter = 4;
*/
public Builder setFilter(yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter value) {
if (filterBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
filter_ = value;
onChanged();
} else {
filterBuilder_.setMessage(value);
}
return this;
}
/**
*
* Filter that can be used for specific resources selection. Only consumption cost of selected resources are used for the budget calculation.
*
*
* .yandex.cloud.billing.v1.ConsumptionFilter filter = 4;
*/
public Builder setFilter(
yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter.Builder builderForValue) {
if (filterBuilder_ == null) {
filter_ = builderForValue.build();
onChanged();
} else {
filterBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Filter that can be used for specific resources selection. Only consumption cost of selected resources are used for the budget calculation.
*
*
* .yandex.cloud.billing.v1.ConsumptionFilter filter = 4;
*/
public Builder mergeFilter(yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter value) {
if (filterBuilder_ == null) {
if (filter_ != null) {
filter_ =
yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter.newBuilder(filter_).mergeFrom(value).buildPartial();
} else {
filter_ = value;
}
onChanged();
} else {
filterBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Filter that can be used for specific resources selection. Only consumption cost of selected resources are used for the budget calculation.
*
*
* .yandex.cloud.billing.v1.ConsumptionFilter filter = 4;
*/
public Builder clearFilter() {
if (filterBuilder_ == null) {
filter_ = null;
onChanged();
} else {
filter_ = null;
filterBuilder_ = null;
}
return this;
}
/**
*
* Filter that can be used for specific resources selection. Only consumption cost of selected resources are used for the budget calculation.
*
*
* .yandex.cloud.billing.v1.ConsumptionFilter filter = 4;
*/
public yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter.Builder getFilterBuilder() {
onChanged();
return getFilterFieldBuilder().getBuilder();
}
/**
*
* Filter that can be used for specific resources selection. Only consumption cost of selected resources are used for the budget calculation.
*
*
* .yandex.cloud.billing.v1.ConsumptionFilter filter = 4;
*/
public yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilterOrBuilder getFilterOrBuilder() {
if (filterBuilder_ != null) {
return filterBuilder_.getMessageOrBuilder();
} else {
return filter_ == null ?
yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter.getDefaultInstance() : filter_;
}
}
/**
*
* Filter that can be used for specific resources selection. Only consumption cost of selected resources are used for the budget calculation.
*
*
* .yandex.cloud.billing.v1.ConsumptionFilter filter = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter, yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter.Builder, yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilterOrBuilder>
getFilterFieldBuilder() {
if (filterBuilder_ == null) {
filterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter, yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter.Builder, yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilterOrBuilder>(
getFilter(),
getParentForChildren(),
isClean());
filter_ = null;
}
return filterBuilder_;
}
/**
*
* Periodic start type that resets budget after specified period is finished.
* First time budget is calculated in the current period, i.e. current month, quarter or year.
*
*
* .yandex.cloud.billing.v1.ResetPeriodType reset_period = 5;
* @return Whether the resetPeriod field is set.
*/
@java.lang.Override
public boolean hasResetPeriod() {
return startTypeCase_ == 5;
}
/**
*
* Periodic start type that resets budget after specified period is finished.
* First time budget is calculated in the current period, i.e. current month, quarter or year.
*
*
* .yandex.cloud.billing.v1.ResetPeriodType reset_period = 5;
* @return The enum numeric value on the wire for resetPeriod.
*/
@java.lang.Override
public int getResetPeriodValue() {
if (startTypeCase_ == 5) {
return ((java.lang.Integer) startType_).intValue();
}
return 0;
}
/**
*
* Periodic start type that resets budget after specified period is finished.
* First time budget is calculated in the current period, i.e. current month, quarter or year.
*
*
* .yandex.cloud.billing.v1.ResetPeriodType reset_period = 5;
* @param value The enum numeric value on the wire for resetPeriod to set.
* @return This builder for chaining.
*/
public Builder setResetPeriodValue(int value) {
startTypeCase_ = 5;
startType_ = value;
onChanged();
return this;
}
/**
*
* Periodic start type that resets budget after specified period is finished.
* First time budget is calculated in the current period, i.e. current month, quarter or year.
*
*
* .yandex.cloud.billing.v1.ResetPeriodType reset_period = 5;
* @return The resetPeriod.
*/
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.ResetPeriodType getResetPeriod() {
if (startTypeCase_ == 5) {
@SuppressWarnings("deprecation")
yandex.cloud.api.billing.v1.BudgetOuterClass.ResetPeriodType result = yandex.cloud.api.billing.v1.BudgetOuterClass.ResetPeriodType.valueOf(
(java.lang.Integer) startType_);
return result == null ? yandex.cloud.api.billing.v1.BudgetOuterClass.ResetPeriodType.UNRECOGNIZED : result;
}
return yandex.cloud.api.billing.v1.BudgetOuterClass.ResetPeriodType.RESET_PERIOD_TYPE_UNSPECIFIED;
}
/**
*
* Periodic start type that resets budget after specified period is finished.
* First time budget is calculated in the current period, i.e. current month, quarter or year.
*
*
* .yandex.cloud.billing.v1.ResetPeriodType reset_period = 5;
* @param value The resetPeriod to set.
* @return This builder for chaining.
*/
public Builder setResetPeriod(yandex.cloud.api.billing.v1.BudgetOuterClass.ResetPeriodType value) {
if (value == null) {
throw new NullPointerException();
}
startTypeCase_ = 5;
startType_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Periodic start type that resets budget after specified period is finished.
* First time budget is calculated in the current period, i.e. current month, quarter or year.
*
*
* .yandex.cloud.billing.v1.ResetPeriodType reset_period = 5;
* @return This builder for chaining.
*/
public Builder clearResetPeriod() {
if (startTypeCase_ == 5) {
startTypeCase_ = 0;
startType_ = null;
onChanged();
}
return this;
}
/**
*
* Custom start date of the budget.
* Must be the first day of a month and must be formatted like YYYY-MM-DD.
*
*
* string start_date = 6;
* @return Whether the startDate field is set.
*/
@java.lang.Override
public boolean hasStartDate() {
return startTypeCase_ == 6;
}
/**
*
* Custom start date of the budget.
* Must be the first day of a month and must be formatted like YYYY-MM-DD.
*
*
* string start_date = 6;
* @return The startDate.
*/
@java.lang.Override
public java.lang.String getStartDate() {
java.lang.Object ref = "";
if (startTypeCase_ == 6) {
ref = startType_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (startTypeCase_ == 6) {
startType_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Custom start date of the budget.
* Must be the first day of a month and must be formatted like YYYY-MM-DD.
*
*
* string start_date = 6;
* @return The bytes for startDate.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getStartDateBytes() {
java.lang.Object ref = "";
if (startTypeCase_ == 6) {
ref = startType_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (startTypeCase_ == 6) {
startType_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Custom start date of the budget.
* Must be the first day of a month and must be formatted like YYYY-MM-DD.
*
*
* string start_date = 6;
* @param value The startDate to set.
* @return This builder for chaining.
*/
public Builder setStartDate(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
startTypeCase_ = 6;
startType_ = value;
onChanged();
return this;
}
/**
*
* Custom start date of the budget.
* Must be the first day of a month and must be formatted like YYYY-MM-DD.
*
*
* string start_date = 6;
* @return This builder for chaining.
*/
public Builder clearStartDate() {
if (startTypeCase_ == 6) {
startTypeCase_ = 0;
startType_ = null;
onChanged();
}
return this;
}
/**
*
* Custom start date of the budget.
* Must be the first day of a month and must be formatted like YYYY-MM-DD.
*
*
* string start_date = 6;
* @param value The bytes for startDate to set.
* @return This builder for chaining.
*/
public Builder setStartDateBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
startTypeCase_ = 6;
startType_ = value;
onChanged();
return this;
}
private java.lang.Object endDate_ = "";
/**
*
* End date of the budget.
* Must be the last day of a month and must be formatted like YYYY-MM-DD.
*
*
* string end_date = 7 [(.yandex.cloud.required) = true];
* @return The endDate.
*/
public java.lang.String getEndDate() {
java.lang.Object ref = endDate_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
endDate_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* End date of the budget.
* Must be the last day of a month and must be formatted like YYYY-MM-DD.
*
*
* string end_date = 7 [(.yandex.cloud.required) = true];
* @return The bytes for endDate.
*/
public com.google.protobuf.ByteString
getEndDateBytes() {
java.lang.Object ref = endDate_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
endDate_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* End date of the budget.
* Must be the last day of a month and must be formatted like YYYY-MM-DD.
*
*
* string end_date = 7 [(.yandex.cloud.required) = true];
* @param value The endDate to set.
* @return This builder for chaining.
*/
public Builder setEndDate(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
endDate_ = value;
onChanged();
return this;
}
/**
*
* End date of the budget.
* Must be the last day of a month and must be formatted like YYYY-MM-DD.
*
*
* string end_date = 7 [(.yandex.cloud.required) = true];
* @return This builder for chaining.
*/
public Builder clearEndDate() {
endDate_ = getDefaultInstance().getEndDate();
onChanged();
return this;
}
/**
*
* End date of the budget.
* Must be the last day of a month and must be formatted like YYYY-MM-DD.
*
*
* string end_date = 7 [(.yandex.cloud.required) = true];
* @param value The bytes for endDate to set.
* @return This builder for chaining.
*/
public Builder setEndDateBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
endDate_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:yandex.cloud.billing.v1.CostBudgetSpec)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.billing.v1.CostBudgetSpec)
private static final yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec();
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CostBudgetSpec parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new CostBudgetSpec(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.CostBudgetSpec getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ExpenseBudgetSpecOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.billing.v1.ExpenseBudgetSpec)
com.google.protobuf.MessageOrBuilder {
/**
*
* Max expense threshold of the budget. Amount currency is the same as corresponding [yandex.cloud.billing.v1.BillingAccount.currency].
*
*
* string amount = 1 [(.yandex.cloud.required) = true];
* @return The amount.
*/
java.lang.String getAmount();
/**
*
* Max expense threshold of the budget. Amount currency is the same as corresponding [yandex.cloud.billing.v1.BillingAccount.currency].
*
*
* string amount = 1 [(.yandex.cloud.required) = true];
* @return The bytes for amount.
*/
com.google.protobuf.ByteString
getAmountBytes();
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @return A list containing the notificationUserAccountIds.
*/
java.util.List
getNotificationUserAccountIdsList();
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @return The count of notificationUserAccountIds.
*/
int getNotificationUserAccountIdsCount();
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @param index The index of the element to return.
* @return The notificationUserAccountIds at the given index.
*/
java.lang.String getNotificationUserAccountIds(int index);
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @param index The index of the value to return.
* @return The bytes of the notificationUserAccountIds at the given index.
*/
com.google.protobuf.ByteString
getNotificationUserAccountIdsBytes(int index);
/**
*
* List of the [ThresholdRule].
* Rules define intermediate expense thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
java.util.List
getThresholdRulesList();
/**
*
* List of the [ThresholdRule].
* Rules define intermediate expense thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule getThresholdRules(int index);
/**
*
* List of the [ThresholdRule].
* Rules define intermediate expense thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
int getThresholdRulesCount();
/**
*
* List of the [ThresholdRule].
* Rules define intermediate expense thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
java.util.List extends yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRuleOrBuilder>
getThresholdRulesOrBuilderList();
/**
*
* List of the [ThresholdRule].
* Rules define intermediate expense thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRuleOrBuilder getThresholdRulesOrBuilder(
int index);
/**
*
* Filter that can be used for specific resources selection. Only consumption expense of selected resources are used for the budget calculation.
*
*
* .yandex.cloud.billing.v1.ConsumptionFilter filter = 4;
* @return Whether the filter field is set.
*/
boolean hasFilter();
/**
*
* Filter that can be used for specific resources selection. Only consumption expense of selected resources are used for the budget calculation.
*
*
* .yandex.cloud.billing.v1.ConsumptionFilter filter = 4;
* @return The filter.
*/
yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter getFilter();
/**
*
* Filter that can be used for specific resources selection. Only consumption expense of selected resources are used for the budget calculation.
*
*
* .yandex.cloud.billing.v1.ConsumptionFilter filter = 4;
*/
yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilterOrBuilder getFilterOrBuilder();
/**
*
* Periodic start type that resets budget after specified period is finished.
* First time budget is calculated in the current period, i.e. current month, quarter or year.
*
*
* .yandex.cloud.billing.v1.ResetPeriodType reset_period = 5;
* @return Whether the resetPeriod field is set.
*/
boolean hasResetPeriod();
/**
*
* Periodic start type that resets budget after specified period is finished.
* First time budget is calculated in the current period, i.e. current month, quarter or year.
*
*
* .yandex.cloud.billing.v1.ResetPeriodType reset_period = 5;
* @return The enum numeric value on the wire for resetPeriod.
*/
int getResetPeriodValue();
/**
*
* Periodic start type that resets budget after specified period is finished.
* First time budget is calculated in the current period, i.e. current month, quarter or year.
*
*
* .yandex.cloud.billing.v1.ResetPeriodType reset_period = 5;
* @return The resetPeriod.
*/
yandex.cloud.api.billing.v1.BudgetOuterClass.ResetPeriodType getResetPeriod();
/**
*
* Custom start date of the budget.
* Must be the first day of a month and must be formatted like YYYY-MM-DD.
*
*
* string start_date = 6;
* @return Whether the startDate field is set.
*/
boolean hasStartDate();
/**
*
* Custom start date of the budget.
* Must be the first day of a month and must be formatted like YYYY-MM-DD.
*
*
* string start_date = 6;
* @return The startDate.
*/
java.lang.String getStartDate();
/**
*
* Custom start date of the budget.
* Must be the first day of a month and must be formatted like YYYY-MM-DD.
*
*
* string start_date = 6;
* @return The bytes for startDate.
*/
com.google.protobuf.ByteString
getStartDateBytes();
/**
*
* End date of the budget.
* Must be the last day of a month and must be formatted like YYYY-MM-DD.
*
*
* string end_date = 7 [(.yandex.cloud.required) = true];
* @return The endDate.
*/
java.lang.String getEndDate();
/**
*
* End date of the budget.
* Must be the last day of a month and must be formatted like YYYY-MM-DD.
*
*
* string end_date = 7 [(.yandex.cloud.required) = true];
* @return The bytes for endDate.
*/
com.google.protobuf.ByteString
getEndDateBytes();
public yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec.StartTypeCase getStartTypeCase();
}
/**
*
* Expense budget specification describes budget that can be used to control expense of cloud resources usage.
*
*
* Protobuf type {@code yandex.cloud.billing.v1.ExpenseBudgetSpec}
*/
public static final class ExpenseBudgetSpec extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.billing.v1.ExpenseBudgetSpec)
ExpenseBudgetSpecOrBuilder {
private static final long serialVersionUID = 0L;
// Use ExpenseBudgetSpec.newBuilder() to construct.
private ExpenseBudgetSpec(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ExpenseBudgetSpec() {
amount_ = "";
notificationUserAccountIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
thresholdRules_ = java.util.Collections.emptyList();
endDate_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ExpenseBudgetSpec();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ExpenseBudgetSpec(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
amount_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
notificationUserAccountIds_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000001;
}
notificationUserAccountIds_.add(s);
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
thresholdRules_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
thresholdRules_.add(
input.readMessage(yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.parser(), extensionRegistry));
break;
}
case 34: {
yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter.Builder subBuilder = null;
if (filter_ != null) {
subBuilder = filter_.toBuilder();
}
filter_ = input.readMessage(yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(filter_);
filter_ = subBuilder.buildPartial();
}
break;
}
case 40: {
int rawValue = input.readEnum();
startTypeCase_ = 5;
startType_ = rawValue;
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
startTypeCase_ = 6;
startType_ = s;
break;
}
case 58: {
java.lang.String s = input.readStringRequireUtf8();
endDate_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
notificationUserAccountIds_ = notificationUserAccountIds_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
thresholdRules_ = java.util.Collections.unmodifiableList(thresholdRules_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.internal_static_yandex_cloud_billing_v1_ExpenseBudgetSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.internal_static_yandex_cloud_billing_v1_ExpenseBudgetSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec.class, yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec.Builder.class);
}
private int startTypeCase_ = 0;
private java.lang.Object startType_;
public enum StartTypeCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
RESET_PERIOD(5),
START_DATE(6),
STARTTYPE_NOT_SET(0);
private final int value;
private StartTypeCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static StartTypeCase valueOf(int value) {
return forNumber(value);
}
public static StartTypeCase forNumber(int value) {
switch (value) {
case 5: return RESET_PERIOD;
case 6: return START_DATE;
case 0: return STARTTYPE_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public StartTypeCase
getStartTypeCase() {
return StartTypeCase.forNumber(
startTypeCase_);
}
public static final int AMOUNT_FIELD_NUMBER = 1;
private volatile java.lang.Object amount_;
/**
*
* Max expense threshold of the budget. Amount currency is the same as corresponding [yandex.cloud.billing.v1.BillingAccount.currency].
*
*
* string amount = 1 [(.yandex.cloud.required) = true];
* @return The amount.
*/
@java.lang.Override
public java.lang.String getAmount() {
java.lang.Object ref = amount_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
amount_ = s;
return s;
}
}
/**
*
* Max expense threshold of the budget. Amount currency is the same as corresponding [yandex.cloud.billing.v1.BillingAccount.currency].
*
*
* string amount = 1 [(.yandex.cloud.required) = true];
* @return The bytes for amount.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getAmountBytes() {
java.lang.Object ref = amount_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
amount_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int NOTIFICATION_USER_ACCOUNT_IDS_FIELD_NUMBER = 2;
private com.google.protobuf.LazyStringList notificationUserAccountIds_;
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @return A list containing the notificationUserAccountIds.
*/
public com.google.protobuf.ProtocolStringList
getNotificationUserAccountIdsList() {
return notificationUserAccountIds_;
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @return The count of notificationUserAccountIds.
*/
public int getNotificationUserAccountIdsCount() {
return notificationUserAccountIds_.size();
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @param index The index of the element to return.
* @return The notificationUserAccountIds at the given index.
*/
public java.lang.String getNotificationUserAccountIds(int index) {
return notificationUserAccountIds_.get(index);
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @param index The index of the value to return.
* @return The bytes of the notificationUserAccountIds at the given index.
*/
public com.google.protobuf.ByteString
getNotificationUserAccountIdsBytes(int index) {
return notificationUserAccountIds_.getByteString(index);
}
public static final int THRESHOLD_RULES_FIELD_NUMBER = 3;
private java.util.List thresholdRules_;
/**
*
* List of the [ThresholdRule].
* Rules define intermediate expense thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
@java.lang.Override
public java.util.List getThresholdRulesList() {
return thresholdRules_;
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate expense thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
@java.lang.Override
public java.util.List extends yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRuleOrBuilder>
getThresholdRulesOrBuilderList() {
return thresholdRules_;
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate expense thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
@java.lang.Override
public int getThresholdRulesCount() {
return thresholdRules_.size();
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate expense thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule getThresholdRules(int index) {
return thresholdRules_.get(index);
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate expense thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRuleOrBuilder getThresholdRulesOrBuilder(
int index) {
return thresholdRules_.get(index);
}
public static final int FILTER_FIELD_NUMBER = 4;
private yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter filter_;
/**
*
* Filter that can be used for specific resources selection. Only consumption expense of selected resources are used for the budget calculation.
*
*
* .yandex.cloud.billing.v1.ConsumptionFilter filter = 4;
* @return Whether the filter field is set.
*/
@java.lang.Override
public boolean hasFilter() {
return filter_ != null;
}
/**
*
* Filter that can be used for specific resources selection. Only consumption expense of selected resources are used for the budget calculation.
*
*
* .yandex.cloud.billing.v1.ConsumptionFilter filter = 4;
* @return The filter.
*/
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter getFilter() {
return filter_ == null ? yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter.getDefaultInstance() : filter_;
}
/**
*
* Filter that can be used for specific resources selection. Only consumption expense of selected resources are used for the budget calculation.
*
*
* .yandex.cloud.billing.v1.ConsumptionFilter filter = 4;
*/
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilterOrBuilder getFilterOrBuilder() {
return getFilter();
}
public static final int RESET_PERIOD_FIELD_NUMBER = 5;
/**
*
* Periodic start type that resets budget after specified period is finished.
* First time budget is calculated in the current period, i.e. current month, quarter or year.
*
*
* .yandex.cloud.billing.v1.ResetPeriodType reset_period = 5;
* @return Whether the resetPeriod field is set.
*/
public boolean hasResetPeriod() {
return startTypeCase_ == 5;
}
/**
*
* Periodic start type that resets budget after specified period is finished.
* First time budget is calculated in the current period, i.e. current month, quarter or year.
*
*
* .yandex.cloud.billing.v1.ResetPeriodType reset_period = 5;
* @return The enum numeric value on the wire for resetPeriod.
*/
public int getResetPeriodValue() {
if (startTypeCase_ == 5) {
return (java.lang.Integer) startType_;
}
return 0;
}
/**
*
* Periodic start type that resets budget after specified period is finished.
* First time budget is calculated in the current period, i.e. current month, quarter or year.
*
*
* .yandex.cloud.billing.v1.ResetPeriodType reset_period = 5;
* @return The resetPeriod.
*/
public yandex.cloud.api.billing.v1.BudgetOuterClass.ResetPeriodType getResetPeriod() {
if (startTypeCase_ == 5) {
@SuppressWarnings("deprecation")
yandex.cloud.api.billing.v1.BudgetOuterClass.ResetPeriodType result = yandex.cloud.api.billing.v1.BudgetOuterClass.ResetPeriodType.valueOf(
(java.lang.Integer) startType_);
return result == null ? yandex.cloud.api.billing.v1.BudgetOuterClass.ResetPeriodType.UNRECOGNIZED : result;
}
return yandex.cloud.api.billing.v1.BudgetOuterClass.ResetPeriodType.RESET_PERIOD_TYPE_UNSPECIFIED;
}
public static final int START_DATE_FIELD_NUMBER = 6;
/**
*
* Custom start date of the budget.
* Must be the first day of a month and must be formatted like YYYY-MM-DD.
*
*
* string start_date = 6;
* @return Whether the startDate field is set.
*/
public boolean hasStartDate() {
return startTypeCase_ == 6;
}
/**
*
* Custom start date of the budget.
* Must be the first day of a month and must be formatted like YYYY-MM-DD.
*
*
* string start_date = 6;
* @return The startDate.
*/
public java.lang.String getStartDate() {
java.lang.Object ref = "";
if (startTypeCase_ == 6) {
ref = startType_;
}
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (startTypeCase_ == 6) {
startType_ = s;
}
return s;
}
}
/**
*
* Custom start date of the budget.
* Must be the first day of a month and must be formatted like YYYY-MM-DD.
*
*
* string start_date = 6;
* @return The bytes for startDate.
*/
public com.google.protobuf.ByteString
getStartDateBytes() {
java.lang.Object ref = "";
if (startTypeCase_ == 6) {
ref = startType_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (startTypeCase_ == 6) {
startType_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int END_DATE_FIELD_NUMBER = 7;
private volatile java.lang.Object endDate_;
/**
*
* End date of the budget.
* Must be the last day of a month and must be formatted like YYYY-MM-DD.
*
*
* string end_date = 7 [(.yandex.cloud.required) = true];
* @return The endDate.
*/
@java.lang.Override
public java.lang.String getEndDate() {
java.lang.Object ref = endDate_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
endDate_ = s;
return s;
}
}
/**
*
* End date of the budget.
* Must be the last day of a month and must be formatted like YYYY-MM-DD.
*
*
* string end_date = 7 [(.yandex.cloud.required) = true];
* @return The bytes for endDate.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getEndDateBytes() {
java.lang.Object ref = endDate_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
endDate_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(amount_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, amount_);
}
for (int i = 0; i < notificationUserAccountIds_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, notificationUserAccountIds_.getRaw(i));
}
for (int i = 0; i < thresholdRules_.size(); i++) {
output.writeMessage(3, thresholdRules_.get(i));
}
if (filter_ != null) {
output.writeMessage(4, getFilter());
}
if (startTypeCase_ == 5) {
output.writeEnum(5, ((java.lang.Integer) startType_));
}
if (startTypeCase_ == 6) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, startType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endDate_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, endDate_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(amount_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, amount_);
}
{
int dataSize = 0;
for (int i = 0; i < notificationUserAccountIds_.size(); i++) {
dataSize += computeStringSizeNoTag(notificationUserAccountIds_.getRaw(i));
}
size += dataSize;
size += 1 * getNotificationUserAccountIdsList().size();
}
for (int i = 0; i < thresholdRules_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, thresholdRules_.get(i));
}
if (filter_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getFilter());
}
if (startTypeCase_ == 5) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(5, ((java.lang.Integer) startType_));
}
if (startTypeCase_ == 6) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, startType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endDate_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, endDate_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec)) {
return super.equals(obj);
}
yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec other = (yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec) obj;
if (!getAmount()
.equals(other.getAmount())) return false;
if (!getNotificationUserAccountIdsList()
.equals(other.getNotificationUserAccountIdsList())) return false;
if (!getThresholdRulesList()
.equals(other.getThresholdRulesList())) return false;
if (hasFilter() != other.hasFilter()) return false;
if (hasFilter()) {
if (!getFilter()
.equals(other.getFilter())) return false;
}
if (!getEndDate()
.equals(other.getEndDate())) return false;
if (!getStartTypeCase().equals(other.getStartTypeCase())) return false;
switch (startTypeCase_) {
case 5:
if (getResetPeriodValue()
!= other.getResetPeriodValue()) return false;
break;
case 6:
if (!getStartDate()
.equals(other.getStartDate())) return false;
break;
case 0:
default:
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + AMOUNT_FIELD_NUMBER;
hash = (53 * hash) + getAmount().hashCode();
if (getNotificationUserAccountIdsCount() > 0) {
hash = (37 * hash) + NOTIFICATION_USER_ACCOUNT_IDS_FIELD_NUMBER;
hash = (53 * hash) + getNotificationUserAccountIdsList().hashCode();
}
if (getThresholdRulesCount() > 0) {
hash = (37 * hash) + THRESHOLD_RULES_FIELD_NUMBER;
hash = (53 * hash) + getThresholdRulesList().hashCode();
}
if (hasFilter()) {
hash = (37 * hash) + FILTER_FIELD_NUMBER;
hash = (53 * hash) + getFilter().hashCode();
}
hash = (37 * hash) + END_DATE_FIELD_NUMBER;
hash = (53 * hash) + getEndDate().hashCode();
switch (startTypeCase_) {
case 5:
hash = (37 * hash) + RESET_PERIOD_FIELD_NUMBER;
hash = (53 * hash) + getResetPeriodValue();
break;
case 6:
hash = (37 * hash) + START_DATE_FIELD_NUMBER;
hash = (53 * hash) + getStartDate().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Expense budget specification describes budget that can be used to control expense of cloud resources usage.
*
*
* Protobuf type {@code yandex.cloud.billing.v1.ExpenseBudgetSpec}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.billing.v1.ExpenseBudgetSpec)
yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpecOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.internal_static_yandex_cloud_billing_v1_ExpenseBudgetSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.internal_static_yandex_cloud_billing_v1_ExpenseBudgetSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec.class, yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec.Builder.class);
}
// Construct using yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getThresholdRulesFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
amount_ = "";
notificationUserAccountIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
if (thresholdRulesBuilder_ == null) {
thresholdRules_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
thresholdRulesBuilder_.clear();
}
if (filterBuilder_ == null) {
filter_ = null;
} else {
filter_ = null;
filterBuilder_ = null;
}
endDate_ = "";
startTypeCase_ = 0;
startType_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.internal_static_yandex_cloud_billing_v1_ExpenseBudgetSpec_descriptor;
}
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec getDefaultInstanceForType() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec build() {
yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec buildPartial() {
yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec result = new yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec(this);
int from_bitField0_ = bitField0_;
result.amount_ = amount_;
if (((bitField0_ & 0x00000001) != 0)) {
notificationUserAccountIds_ = notificationUserAccountIds_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.notificationUserAccountIds_ = notificationUserAccountIds_;
if (thresholdRulesBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
thresholdRules_ = java.util.Collections.unmodifiableList(thresholdRules_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.thresholdRules_ = thresholdRules_;
} else {
result.thresholdRules_ = thresholdRulesBuilder_.build();
}
if (filterBuilder_ == null) {
result.filter_ = filter_;
} else {
result.filter_ = filterBuilder_.build();
}
if (startTypeCase_ == 5) {
result.startType_ = startType_;
}
if (startTypeCase_ == 6) {
result.startType_ = startType_;
}
result.endDate_ = endDate_;
result.startTypeCase_ = startTypeCase_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec) {
return mergeFrom((yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec other) {
if (other == yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec.getDefaultInstance()) return this;
if (!other.getAmount().isEmpty()) {
amount_ = other.amount_;
onChanged();
}
if (!other.notificationUserAccountIds_.isEmpty()) {
if (notificationUserAccountIds_.isEmpty()) {
notificationUserAccountIds_ = other.notificationUserAccountIds_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureNotificationUserAccountIdsIsMutable();
notificationUserAccountIds_.addAll(other.notificationUserAccountIds_);
}
onChanged();
}
if (thresholdRulesBuilder_ == null) {
if (!other.thresholdRules_.isEmpty()) {
if (thresholdRules_.isEmpty()) {
thresholdRules_ = other.thresholdRules_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureThresholdRulesIsMutable();
thresholdRules_.addAll(other.thresholdRules_);
}
onChanged();
}
} else {
if (!other.thresholdRules_.isEmpty()) {
if (thresholdRulesBuilder_.isEmpty()) {
thresholdRulesBuilder_.dispose();
thresholdRulesBuilder_ = null;
thresholdRules_ = other.thresholdRules_;
bitField0_ = (bitField0_ & ~0x00000002);
thresholdRulesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getThresholdRulesFieldBuilder() : null;
} else {
thresholdRulesBuilder_.addAllMessages(other.thresholdRules_);
}
}
}
if (other.hasFilter()) {
mergeFilter(other.getFilter());
}
if (!other.getEndDate().isEmpty()) {
endDate_ = other.endDate_;
onChanged();
}
switch (other.getStartTypeCase()) {
case RESET_PERIOD: {
setResetPeriodValue(other.getResetPeriodValue());
break;
}
case START_DATE: {
startTypeCase_ = 6;
startType_ = other.startType_;
onChanged();
break;
}
case STARTTYPE_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int startTypeCase_ = 0;
private java.lang.Object startType_;
public StartTypeCase
getStartTypeCase() {
return StartTypeCase.forNumber(
startTypeCase_);
}
public Builder clearStartType() {
startTypeCase_ = 0;
startType_ = null;
onChanged();
return this;
}
private int bitField0_;
private java.lang.Object amount_ = "";
/**
*
* Max expense threshold of the budget. Amount currency is the same as corresponding [yandex.cloud.billing.v1.BillingAccount.currency].
*
*
* string amount = 1 [(.yandex.cloud.required) = true];
* @return The amount.
*/
public java.lang.String getAmount() {
java.lang.Object ref = amount_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
amount_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Max expense threshold of the budget. Amount currency is the same as corresponding [yandex.cloud.billing.v1.BillingAccount.currency].
*
*
* string amount = 1 [(.yandex.cloud.required) = true];
* @return The bytes for amount.
*/
public com.google.protobuf.ByteString
getAmountBytes() {
java.lang.Object ref = amount_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
amount_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Max expense threshold of the budget. Amount currency is the same as corresponding [yandex.cloud.billing.v1.BillingAccount.currency].
*
*
* string amount = 1 [(.yandex.cloud.required) = true];
* @param value The amount to set.
* @return This builder for chaining.
*/
public Builder setAmount(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
amount_ = value;
onChanged();
return this;
}
/**
*
* Max expense threshold of the budget. Amount currency is the same as corresponding [yandex.cloud.billing.v1.BillingAccount.currency].
*
*
* string amount = 1 [(.yandex.cloud.required) = true];
* @return This builder for chaining.
*/
public Builder clearAmount() {
amount_ = getDefaultInstance().getAmount();
onChanged();
return this;
}
/**
*
* Max expense threshold of the budget. Amount currency is the same as corresponding [yandex.cloud.billing.v1.BillingAccount.currency].
*
*
* string amount = 1 [(.yandex.cloud.required) = true];
* @param value The bytes for amount to set.
* @return This builder for chaining.
*/
public Builder setAmountBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
amount_ = value;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList notificationUserAccountIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureNotificationUserAccountIdsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
notificationUserAccountIds_ = new com.google.protobuf.LazyStringArrayList(notificationUserAccountIds_);
bitField0_ |= 0x00000001;
}
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @return A list containing the notificationUserAccountIds.
*/
public com.google.protobuf.ProtocolStringList
getNotificationUserAccountIdsList() {
return notificationUserAccountIds_.getUnmodifiableView();
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @return The count of notificationUserAccountIds.
*/
public int getNotificationUserAccountIdsCount() {
return notificationUserAccountIds_.size();
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @param index The index of the element to return.
* @return The notificationUserAccountIds at the given index.
*/
public java.lang.String getNotificationUserAccountIds(int index) {
return notificationUserAccountIds_.get(index);
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @param index The index of the value to return.
* @return The bytes of the notificationUserAccountIds at the given index.
*/
public com.google.protobuf.ByteString
getNotificationUserAccountIdsBytes(int index) {
return notificationUserAccountIds_.getByteString(index);
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @param index The index to set the value at.
* @param value The notificationUserAccountIds to set.
* @return This builder for chaining.
*/
public Builder setNotificationUserAccountIds(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureNotificationUserAccountIdsIsMutable();
notificationUserAccountIds_.set(index, value);
onChanged();
return this;
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @param value The notificationUserAccountIds to add.
* @return This builder for chaining.
*/
public Builder addNotificationUserAccountIds(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureNotificationUserAccountIdsIsMutable();
notificationUserAccountIds_.add(value);
onChanged();
return this;
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @param values The notificationUserAccountIds to add.
* @return This builder for chaining.
*/
public Builder addAllNotificationUserAccountIds(
java.lang.Iterable values) {
ensureNotificationUserAccountIdsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, notificationUserAccountIds_);
onChanged();
return this;
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @return This builder for chaining.
*/
public Builder clearNotificationUserAccountIds() {
notificationUserAccountIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @param value The bytes of the notificationUserAccountIds to add.
* @return This builder for chaining.
*/
public Builder addNotificationUserAccountIdsBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureNotificationUserAccountIdsIsMutable();
notificationUserAccountIds_.add(value);
onChanged();
return this;
}
private java.util.List thresholdRules_ =
java.util.Collections.emptyList();
private void ensureThresholdRulesIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
thresholdRules_ = new java.util.ArrayList(thresholdRules_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule, yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.Builder, yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRuleOrBuilder> thresholdRulesBuilder_;
/**
*
* List of the [ThresholdRule].
* Rules define intermediate expense thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public java.util.List getThresholdRulesList() {
if (thresholdRulesBuilder_ == null) {
return java.util.Collections.unmodifiableList(thresholdRules_);
} else {
return thresholdRulesBuilder_.getMessageList();
}
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate expense thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public int getThresholdRulesCount() {
if (thresholdRulesBuilder_ == null) {
return thresholdRules_.size();
} else {
return thresholdRulesBuilder_.getCount();
}
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate expense thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule getThresholdRules(int index) {
if (thresholdRulesBuilder_ == null) {
return thresholdRules_.get(index);
} else {
return thresholdRulesBuilder_.getMessage(index);
}
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate expense thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public Builder setThresholdRules(
int index, yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule value) {
if (thresholdRulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureThresholdRulesIsMutable();
thresholdRules_.set(index, value);
onChanged();
} else {
thresholdRulesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate expense thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public Builder setThresholdRules(
int index, yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.Builder builderForValue) {
if (thresholdRulesBuilder_ == null) {
ensureThresholdRulesIsMutable();
thresholdRules_.set(index, builderForValue.build());
onChanged();
} else {
thresholdRulesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate expense thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public Builder addThresholdRules(yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule value) {
if (thresholdRulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureThresholdRulesIsMutable();
thresholdRules_.add(value);
onChanged();
} else {
thresholdRulesBuilder_.addMessage(value);
}
return this;
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate expense thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public Builder addThresholdRules(
int index, yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule value) {
if (thresholdRulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureThresholdRulesIsMutable();
thresholdRules_.add(index, value);
onChanged();
} else {
thresholdRulesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate expense thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public Builder addThresholdRules(
yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.Builder builderForValue) {
if (thresholdRulesBuilder_ == null) {
ensureThresholdRulesIsMutable();
thresholdRules_.add(builderForValue.build());
onChanged();
} else {
thresholdRulesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate expense thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public Builder addThresholdRules(
int index, yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.Builder builderForValue) {
if (thresholdRulesBuilder_ == null) {
ensureThresholdRulesIsMutable();
thresholdRules_.add(index, builderForValue.build());
onChanged();
} else {
thresholdRulesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate expense thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public Builder addAllThresholdRules(
java.lang.Iterable extends yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule> values) {
if (thresholdRulesBuilder_ == null) {
ensureThresholdRulesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, thresholdRules_);
onChanged();
} else {
thresholdRulesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate expense thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public Builder clearThresholdRules() {
if (thresholdRulesBuilder_ == null) {
thresholdRules_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
thresholdRulesBuilder_.clear();
}
return this;
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate expense thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public Builder removeThresholdRules(int index) {
if (thresholdRulesBuilder_ == null) {
ensureThresholdRulesIsMutable();
thresholdRules_.remove(index);
onChanged();
} else {
thresholdRulesBuilder_.remove(index);
}
return this;
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate expense thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.Builder getThresholdRulesBuilder(
int index) {
return getThresholdRulesFieldBuilder().getBuilder(index);
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate expense thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRuleOrBuilder getThresholdRulesOrBuilder(
int index) {
if (thresholdRulesBuilder_ == null) {
return thresholdRules_.get(index); } else {
return thresholdRulesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate expense thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public java.util.List extends yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRuleOrBuilder>
getThresholdRulesOrBuilderList() {
if (thresholdRulesBuilder_ != null) {
return thresholdRulesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(thresholdRules_);
}
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate expense thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.Builder addThresholdRulesBuilder() {
return getThresholdRulesFieldBuilder().addBuilder(
yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.getDefaultInstance());
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate expense thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.Builder addThresholdRulesBuilder(
int index) {
return getThresholdRulesFieldBuilder().addBuilder(
index, yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.getDefaultInstance());
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate expense thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public java.util.List
getThresholdRulesBuilderList() {
return getThresholdRulesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule, yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.Builder, yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRuleOrBuilder>
getThresholdRulesFieldBuilder() {
if (thresholdRulesBuilder_ == null) {
thresholdRulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule, yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.Builder, yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRuleOrBuilder>(
thresholdRules_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
thresholdRules_ = null;
}
return thresholdRulesBuilder_;
}
private yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter filter_;
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter, yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter.Builder, yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilterOrBuilder> filterBuilder_;
/**
*
* Filter that can be used for specific resources selection. Only consumption expense of selected resources are used for the budget calculation.
*
*
* .yandex.cloud.billing.v1.ConsumptionFilter filter = 4;
* @return Whether the filter field is set.
*/
public boolean hasFilter() {
return filterBuilder_ != null || filter_ != null;
}
/**
*
* Filter that can be used for specific resources selection. Only consumption expense of selected resources are used for the budget calculation.
*
*
* .yandex.cloud.billing.v1.ConsumptionFilter filter = 4;
* @return The filter.
*/
public yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter getFilter() {
if (filterBuilder_ == null) {
return filter_ == null ? yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter.getDefaultInstance() : filter_;
} else {
return filterBuilder_.getMessage();
}
}
/**
*
* Filter that can be used for specific resources selection. Only consumption expense of selected resources are used for the budget calculation.
*
*
* .yandex.cloud.billing.v1.ConsumptionFilter filter = 4;
*/
public Builder setFilter(yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter value) {
if (filterBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
filter_ = value;
onChanged();
} else {
filterBuilder_.setMessage(value);
}
return this;
}
/**
*
* Filter that can be used for specific resources selection. Only consumption expense of selected resources are used for the budget calculation.
*
*
* .yandex.cloud.billing.v1.ConsumptionFilter filter = 4;
*/
public Builder setFilter(
yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter.Builder builderForValue) {
if (filterBuilder_ == null) {
filter_ = builderForValue.build();
onChanged();
} else {
filterBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Filter that can be used for specific resources selection. Only consumption expense of selected resources are used for the budget calculation.
*
*
* .yandex.cloud.billing.v1.ConsumptionFilter filter = 4;
*/
public Builder mergeFilter(yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter value) {
if (filterBuilder_ == null) {
if (filter_ != null) {
filter_ =
yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter.newBuilder(filter_).mergeFrom(value).buildPartial();
} else {
filter_ = value;
}
onChanged();
} else {
filterBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Filter that can be used for specific resources selection. Only consumption expense of selected resources are used for the budget calculation.
*
*
* .yandex.cloud.billing.v1.ConsumptionFilter filter = 4;
*/
public Builder clearFilter() {
if (filterBuilder_ == null) {
filter_ = null;
onChanged();
} else {
filter_ = null;
filterBuilder_ = null;
}
return this;
}
/**
*
* Filter that can be used for specific resources selection. Only consumption expense of selected resources are used for the budget calculation.
*
*
* .yandex.cloud.billing.v1.ConsumptionFilter filter = 4;
*/
public yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter.Builder getFilterBuilder() {
onChanged();
return getFilterFieldBuilder().getBuilder();
}
/**
*
* Filter that can be used for specific resources selection. Only consumption expense of selected resources are used for the budget calculation.
*
*
* .yandex.cloud.billing.v1.ConsumptionFilter filter = 4;
*/
public yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilterOrBuilder getFilterOrBuilder() {
if (filterBuilder_ != null) {
return filterBuilder_.getMessageOrBuilder();
} else {
return filter_ == null ?
yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter.getDefaultInstance() : filter_;
}
}
/**
*
* Filter that can be used for specific resources selection. Only consumption expense of selected resources are used for the budget calculation.
*
*
* .yandex.cloud.billing.v1.ConsumptionFilter filter = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter, yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter.Builder, yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilterOrBuilder>
getFilterFieldBuilder() {
if (filterBuilder_ == null) {
filterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter, yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter.Builder, yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilterOrBuilder>(
getFilter(),
getParentForChildren(),
isClean());
filter_ = null;
}
return filterBuilder_;
}
/**
*
* Periodic start type that resets budget after specified period is finished.
* First time budget is calculated in the current period, i.e. current month, quarter or year.
*
*
* .yandex.cloud.billing.v1.ResetPeriodType reset_period = 5;
* @return Whether the resetPeriod field is set.
*/
@java.lang.Override
public boolean hasResetPeriod() {
return startTypeCase_ == 5;
}
/**
*
* Periodic start type that resets budget after specified period is finished.
* First time budget is calculated in the current period, i.e. current month, quarter or year.
*
*
* .yandex.cloud.billing.v1.ResetPeriodType reset_period = 5;
* @return The enum numeric value on the wire for resetPeriod.
*/
@java.lang.Override
public int getResetPeriodValue() {
if (startTypeCase_ == 5) {
return ((java.lang.Integer) startType_).intValue();
}
return 0;
}
/**
*
* Periodic start type that resets budget after specified period is finished.
* First time budget is calculated in the current period, i.e. current month, quarter or year.
*
*
* .yandex.cloud.billing.v1.ResetPeriodType reset_period = 5;
* @param value The enum numeric value on the wire for resetPeriod to set.
* @return This builder for chaining.
*/
public Builder setResetPeriodValue(int value) {
startTypeCase_ = 5;
startType_ = value;
onChanged();
return this;
}
/**
*
* Periodic start type that resets budget after specified period is finished.
* First time budget is calculated in the current period, i.e. current month, quarter or year.
*
*
* .yandex.cloud.billing.v1.ResetPeriodType reset_period = 5;
* @return The resetPeriod.
*/
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.ResetPeriodType getResetPeriod() {
if (startTypeCase_ == 5) {
@SuppressWarnings("deprecation")
yandex.cloud.api.billing.v1.BudgetOuterClass.ResetPeriodType result = yandex.cloud.api.billing.v1.BudgetOuterClass.ResetPeriodType.valueOf(
(java.lang.Integer) startType_);
return result == null ? yandex.cloud.api.billing.v1.BudgetOuterClass.ResetPeriodType.UNRECOGNIZED : result;
}
return yandex.cloud.api.billing.v1.BudgetOuterClass.ResetPeriodType.RESET_PERIOD_TYPE_UNSPECIFIED;
}
/**
*
* Periodic start type that resets budget after specified period is finished.
* First time budget is calculated in the current period, i.e. current month, quarter or year.
*
*
* .yandex.cloud.billing.v1.ResetPeriodType reset_period = 5;
* @param value The resetPeriod to set.
* @return This builder for chaining.
*/
public Builder setResetPeriod(yandex.cloud.api.billing.v1.BudgetOuterClass.ResetPeriodType value) {
if (value == null) {
throw new NullPointerException();
}
startTypeCase_ = 5;
startType_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Periodic start type that resets budget after specified period is finished.
* First time budget is calculated in the current period, i.e. current month, quarter or year.
*
*
* .yandex.cloud.billing.v1.ResetPeriodType reset_period = 5;
* @return This builder for chaining.
*/
public Builder clearResetPeriod() {
if (startTypeCase_ == 5) {
startTypeCase_ = 0;
startType_ = null;
onChanged();
}
return this;
}
/**
*
* Custom start date of the budget.
* Must be the first day of a month and must be formatted like YYYY-MM-DD.
*
*
* string start_date = 6;
* @return Whether the startDate field is set.
*/
@java.lang.Override
public boolean hasStartDate() {
return startTypeCase_ == 6;
}
/**
*
* Custom start date of the budget.
* Must be the first day of a month and must be formatted like YYYY-MM-DD.
*
*
* string start_date = 6;
* @return The startDate.
*/
@java.lang.Override
public java.lang.String getStartDate() {
java.lang.Object ref = "";
if (startTypeCase_ == 6) {
ref = startType_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (startTypeCase_ == 6) {
startType_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Custom start date of the budget.
* Must be the first day of a month and must be formatted like YYYY-MM-DD.
*
*
* string start_date = 6;
* @return The bytes for startDate.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getStartDateBytes() {
java.lang.Object ref = "";
if (startTypeCase_ == 6) {
ref = startType_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (startTypeCase_ == 6) {
startType_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Custom start date of the budget.
* Must be the first day of a month and must be formatted like YYYY-MM-DD.
*
*
* string start_date = 6;
* @param value The startDate to set.
* @return This builder for chaining.
*/
public Builder setStartDate(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
startTypeCase_ = 6;
startType_ = value;
onChanged();
return this;
}
/**
*
* Custom start date of the budget.
* Must be the first day of a month and must be formatted like YYYY-MM-DD.
*
*
* string start_date = 6;
* @return This builder for chaining.
*/
public Builder clearStartDate() {
if (startTypeCase_ == 6) {
startTypeCase_ = 0;
startType_ = null;
onChanged();
}
return this;
}
/**
*
* Custom start date of the budget.
* Must be the first day of a month and must be formatted like YYYY-MM-DD.
*
*
* string start_date = 6;
* @param value The bytes for startDate to set.
* @return This builder for chaining.
*/
public Builder setStartDateBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
startTypeCase_ = 6;
startType_ = value;
onChanged();
return this;
}
private java.lang.Object endDate_ = "";
/**
*
* End date of the budget.
* Must be the last day of a month and must be formatted like YYYY-MM-DD.
*
*
* string end_date = 7 [(.yandex.cloud.required) = true];
* @return The endDate.
*/
public java.lang.String getEndDate() {
java.lang.Object ref = endDate_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
endDate_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* End date of the budget.
* Must be the last day of a month and must be formatted like YYYY-MM-DD.
*
*
* string end_date = 7 [(.yandex.cloud.required) = true];
* @return The bytes for endDate.
*/
public com.google.protobuf.ByteString
getEndDateBytes() {
java.lang.Object ref = endDate_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
endDate_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* End date of the budget.
* Must be the last day of a month and must be formatted like YYYY-MM-DD.
*
*
* string end_date = 7 [(.yandex.cloud.required) = true];
* @param value The endDate to set.
* @return This builder for chaining.
*/
public Builder setEndDate(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
endDate_ = value;
onChanged();
return this;
}
/**
*
* End date of the budget.
* Must be the last day of a month and must be formatted like YYYY-MM-DD.
*
*
* string end_date = 7 [(.yandex.cloud.required) = true];
* @return This builder for chaining.
*/
public Builder clearEndDate() {
endDate_ = getDefaultInstance().getEndDate();
onChanged();
return this;
}
/**
*
* End date of the budget.
* Must be the last day of a month and must be formatted like YYYY-MM-DD.
*
*
* string end_date = 7 [(.yandex.cloud.required) = true];
* @param value The bytes for endDate to set.
* @return This builder for chaining.
*/
public Builder setEndDateBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
endDate_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:yandex.cloud.billing.v1.ExpenseBudgetSpec)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.billing.v1.ExpenseBudgetSpec)
private static final yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec();
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ExpenseBudgetSpec parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ExpenseBudgetSpec(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.ExpenseBudgetSpec getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface BalanceBudgetSpecOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.billing.v1.BalanceBudgetSpec)
com.google.protobuf.MessageOrBuilder {
/**
*
* Max balance threshold of the budget. Amount currency is the same as corresponding [yandex.cloud.billing.v1.BillingAccount.currency].
*
*
* string amount = 1 [(.yandex.cloud.required) = true];
* @return The amount.
*/
java.lang.String getAmount();
/**
*
* Max balance threshold of the budget. Amount currency is the same as corresponding [yandex.cloud.billing.v1.BillingAccount.currency].
*
*
* string amount = 1 [(.yandex.cloud.required) = true];
* @return The bytes for amount.
*/
com.google.protobuf.ByteString
getAmountBytes();
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @return A list containing the notificationUserAccountIds.
*/
java.util.List
getNotificationUserAccountIdsList();
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @return The count of notificationUserAccountIds.
*/
int getNotificationUserAccountIdsCount();
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @param index The index of the element to return.
* @return The notificationUserAccountIds at the given index.
*/
java.lang.String getNotificationUserAccountIds(int index);
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @param index The index of the value to return.
* @return The bytes of the notificationUserAccountIds at the given index.
*/
com.google.protobuf.ByteString
getNotificationUserAccountIdsBytes(int index);
/**
*
* List of the [ThresholdRule].
* Rules define intermediate balance thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
java.util.List
getThresholdRulesList();
/**
*
* List of the [ThresholdRule].
* Rules define intermediate balance thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule getThresholdRules(int index);
/**
*
* List of the [ThresholdRule].
* Rules define intermediate balance thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
int getThresholdRulesCount();
/**
*
* List of the [ThresholdRule].
* Rules define intermediate balance thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
java.util.List extends yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRuleOrBuilder>
getThresholdRulesOrBuilderList();
/**
*
* List of the [ThresholdRule].
* Rules define intermediate balance thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRuleOrBuilder getThresholdRulesOrBuilder(
int index);
/**
*
* Start_date of the budget.
* Must be the first day of a month and must be formatted like YYYY-MM-DD.
*
*
* string start_date = 4;
* @return The startDate.
*/
java.lang.String getStartDate();
/**
*
* Start_date of the budget.
* Must be the first day of a month and must be formatted like YYYY-MM-DD.
*
*
* string start_date = 4;
* @return The bytes for startDate.
*/
com.google.protobuf.ByteString
getStartDateBytes();
/**
*
* End date of the budget.
* Must be the last day of a month and must be formatted like YYYY-MM-DD.
*
*
* string end_date = 5 [(.yandex.cloud.required) = true];
* @return The endDate.
*/
java.lang.String getEndDate();
/**
*
* End date of the budget.
* Must be the last day of a month and must be formatted like YYYY-MM-DD.
*
*
* string end_date = 5 [(.yandex.cloud.required) = true];
* @return The bytes for endDate.
*/
com.google.protobuf.ByteString
getEndDateBytes();
}
/**
*
* Balance budget specification describes budget that can be used to control [yandex.cloud.billing.v1.BillingAccount.balance].
*
*
* Protobuf type {@code yandex.cloud.billing.v1.BalanceBudgetSpec}
*/
public static final class BalanceBudgetSpec extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.billing.v1.BalanceBudgetSpec)
BalanceBudgetSpecOrBuilder {
private static final long serialVersionUID = 0L;
// Use BalanceBudgetSpec.newBuilder() to construct.
private BalanceBudgetSpec(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private BalanceBudgetSpec() {
amount_ = "";
notificationUserAccountIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
thresholdRules_ = java.util.Collections.emptyList();
startDate_ = "";
endDate_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new BalanceBudgetSpec();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private BalanceBudgetSpec(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
amount_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
notificationUserAccountIds_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000001;
}
notificationUserAccountIds_.add(s);
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
thresholdRules_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
thresholdRules_.add(
input.readMessage(yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.parser(), extensionRegistry));
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
startDate_ = s;
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
endDate_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
notificationUserAccountIds_ = notificationUserAccountIds_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
thresholdRules_ = java.util.Collections.unmodifiableList(thresholdRules_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.internal_static_yandex_cloud_billing_v1_BalanceBudgetSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.internal_static_yandex_cloud_billing_v1_BalanceBudgetSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec.class, yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec.Builder.class);
}
public static final int AMOUNT_FIELD_NUMBER = 1;
private volatile java.lang.Object amount_;
/**
*
* Max balance threshold of the budget. Amount currency is the same as corresponding [yandex.cloud.billing.v1.BillingAccount.currency].
*
*
* string amount = 1 [(.yandex.cloud.required) = true];
* @return The amount.
*/
@java.lang.Override
public java.lang.String getAmount() {
java.lang.Object ref = amount_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
amount_ = s;
return s;
}
}
/**
*
* Max balance threshold of the budget. Amount currency is the same as corresponding [yandex.cloud.billing.v1.BillingAccount.currency].
*
*
* string amount = 1 [(.yandex.cloud.required) = true];
* @return The bytes for amount.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getAmountBytes() {
java.lang.Object ref = amount_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
amount_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int NOTIFICATION_USER_ACCOUNT_IDS_FIELD_NUMBER = 2;
private com.google.protobuf.LazyStringList notificationUserAccountIds_;
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @return A list containing the notificationUserAccountIds.
*/
public com.google.protobuf.ProtocolStringList
getNotificationUserAccountIdsList() {
return notificationUserAccountIds_;
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @return The count of notificationUserAccountIds.
*/
public int getNotificationUserAccountIdsCount() {
return notificationUserAccountIds_.size();
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @param index The index of the element to return.
* @return The notificationUserAccountIds at the given index.
*/
public java.lang.String getNotificationUserAccountIds(int index) {
return notificationUserAccountIds_.get(index);
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @param index The index of the value to return.
* @return The bytes of the notificationUserAccountIds at the given index.
*/
public com.google.protobuf.ByteString
getNotificationUserAccountIdsBytes(int index) {
return notificationUserAccountIds_.getByteString(index);
}
public static final int THRESHOLD_RULES_FIELD_NUMBER = 3;
private java.util.List thresholdRules_;
/**
*
* List of the [ThresholdRule].
* Rules define intermediate balance thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
@java.lang.Override
public java.util.List getThresholdRulesList() {
return thresholdRules_;
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate balance thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
@java.lang.Override
public java.util.List extends yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRuleOrBuilder>
getThresholdRulesOrBuilderList() {
return thresholdRules_;
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate balance thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
@java.lang.Override
public int getThresholdRulesCount() {
return thresholdRules_.size();
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate balance thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule getThresholdRules(int index) {
return thresholdRules_.get(index);
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate balance thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRuleOrBuilder getThresholdRulesOrBuilder(
int index) {
return thresholdRules_.get(index);
}
public static final int START_DATE_FIELD_NUMBER = 4;
private volatile java.lang.Object startDate_;
/**
*
* Start_date of the budget.
* Must be the first day of a month and must be formatted like YYYY-MM-DD.
*
*
* string start_date = 4;
* @return The startDate.
*/
@java.lang.Override
public java.lang.String getStartDate() {
java.lang.Object ref = startDate_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
startDate_ = s;
return s;
}
}
/**
*
* Start_date of the budget.
* Must be the first day of a month and must be formatted like YYYY-MM-DD.
*
*
* string start_date = 4;
* @return The bytes for startDate.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getStartDateBytes() {
java.lang.Object ref = startDate_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
startDate_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int END_DATE_FIELD_NUMBER = 5;
private volatile java.lang.Object endDate_;
/**
*
* End date of the budget.
* Must be the last day of a month and must be formatted like YYYY-MM-DD.
*
*
* string end_date = 5 [(.yandex.cloud.required) = true];
* @return The endDate.
*/
@java.lang.Override
public java.lang.String getEndDate() {
java.lang.Object ref = endDate_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
endDate_ = s;
return s;
}
}
/**
*
* End date of the budget.
* Must be the last day of a month and must be formatted like YYYY-MM-DD.
*
*
* string end_date = 5 [(.yandex.cloud.required) = true];
* @return The bytes for endDate.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getEndDateBytes() {
java.lang.Object ref = endDate_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
endDate_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(amount_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, amount_);
}
for (int i = 0; i < notificationUserAccountIds_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, notificationUserAccountIds_.getRaw(i));
}
for (int i = 0; i < thresholdRules_.size(); i++) {
output.writeMessage(3, thresholdRules_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(startDate_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, startDate_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endDate_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, endDate_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(amount_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, amount_);
}
{
int dataSize = 0;
for (int i = 0; i < notificationUserAccountIds_.size(); i++) {
dataSize += computeStringSizeNoTag(notificationUserAccountIds_.getRaw(i));
}
size += dataSize;
size += 1 * getNotificationUserAccountIdsList().size();
}
for (int i = 0; i < thresholdRules_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, thresholdRules_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(startDate_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, startDate_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endDate_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, endDate_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec)) {
return super.equals(obj);
}
yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec other = (yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec) obj;
if (!getAmount()
.equals(other.getAmount())) return false;
if (!getNotificationUserAccountIdsList()
.equals(other.getNotificationUserAccountIdsList())) return false;
if (!getThresholdRulesList()
.equals(other.getThresholdRulesList())) return false;
if (!getStartDate()
.equals(other.getStartDate())) return false;
if (!getEndDate()
.equals(other.getEndDate())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + AMOUNT_FIELD_NUMBER;
hash = (53 * hash) + getAmount().hashCode();
if (getNotificationUserAccountIdsCount() > 0) {
hash = (37 * hash) + NOTIFICATION_USER_ACCOUNT_IDS_FIELD_NUMBER;
hash = (53 * hash) + getNotificationUserAccountIdsList().hashCode();
}
if (getThresholdRulesCount() > 0) {
hash = (37 * hash) + THRESHOLD_RULES_FIELD_NUMBER;
hash = (53 * hash) + getThresholdRulesList().hashCode();
}
hash = (37 * hash) + START_DATE_FIELD_NUMBER;
hash = (53 * hash) + getStartDate().hashCode();
hash = (37 * hash) + END_DATE_FIELD_NUMBER;
hash = (53 * hash) + getEndDate().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Balance budget specification describes budget that can be used to control [yandex.cloud.billing.v1.BillingAccount.balance].
*
*
* Protobuf type {@code yandex.cloud.billing.v1.BalanceBudgetSpec}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.billing.v1.BalanceBudgetSpec)
yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpecOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.internal_static_yandex_cloud_billing_v1_BalanceBudgetSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.internal_static_yandex_cloud_billing_v1_BalanceBudgetSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec.class, yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec.Builder.class);
}
// Construct using yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getThresholdRulesFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
amount_ = "";
notificationUserAccountIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
if (thresholdRulesBuilder_ == null) {
thresholdRules_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
thresholdRulesBuilder_.clear();
}
startDate_ = "";
endDate_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.internal_static_yandex_cloud_billing_v1_BalanceBudgetSpec_descriptor;
}
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec getDefaultInstanceForType() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec build() {
yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec buildPartial() {
yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec result = new yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec(this);
int from_bitField0_ = bitField0_;
result.amount_ = amount_;
if (((bitField0_ & 0x00000001) != 0)) {
notificationUserAccountIds_ = notificationUserAccountIds_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.notificationUserAccountIds_ = notificationUserAccountIds_;
if (thresholdRulesBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
thresholdRules_ = java.util.Collections.unmodifiableList(thresholdRules_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.thresholdRules_ = thresholdRules_;
} else {
result.thresholdRules_ = thresholdRulesBuilder_.build();
}
result.startDate_ = startDate_;
result.endDate_ = endDate_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec) {
return mergeFrom((yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec other) {
if (other == yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec.getDefaultInstance()) return this;
if (!other.getAmount().isEmpty()) {
amount_ = other.amount_;
onChanged();
}
if (!other.notificationUserAccountIds_.isEmpty()) {
if (notificationUserAccountIds_.isEmpty()) {
notificationUserAccountIds_ = other.notificationUserAccountIds_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureNotificationUserAccountIdsIsMutable();
notificationUserAccountIds_.addAll(other.notificationUserAccountIds_);
}
onChanged();
}
if (thresholdRulesBuilder_ == null) {
if (!other.thresholdRules_.isEmpty()) {
if (thresholdRules_.isEmpty()) {
thresholdRules_ = other.thresholdRules_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureThresholdRulesIsMutable();
thresholdRules_.addAll(other.thresholdRules_);
}
onChanged();
}
} else {
if (!other.thresholdRules_.isEmpty()) {
if (thresholdRulesBuilder_.isEmpty()) {
thresholdRulesBuilder_.dispose();
thresholdRulesBuilder_ = null;
thresholdRules_ = other.thresholdRules_;
bitField0_ = (bitField0_ & ~0x00000002);
thresholdRulesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getThresholdRulesFieldBuilder() : null;
} else {
thresholdRulesBuilder_.addAllMessages(other.thresholdRules_);
}
}
}
if (!other.getStartDate().isEmpty()) {
startDate_ = other.startDate_;
onChanged();
}
if (!other.getEndDate().isEmpty()) {
endDate_ = other.endDate_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object amount_ = "";
/**
*
* Max balance threshold of the budget. Amount currency is the same as corresponding [yandex.cloud.billing.v1.BillingAccount.currency].
*
*
* string amount = 1 [(.yandex.cloud.required) = true];
* @return The amount.
*/
public java.lang.String getAmount() {
java.lang.Object ref = amount_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
amount_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Max balance threshold of the budget. Amount currency is the same as corresponding [yandex.cloud.billing.v1.BillingAccount.currency].
*
*
* string amount = 1 [(.yandex.cloud.required) = true];
* @return The bytes for amount.
*/
public com.google.protobuf.ByteString
getAmountBytes() {
java.lang.Object ref = amount_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
amount_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Max balance threshold of the budget. Amount currency is the same as corresponding [yandex.cloud.billing.v1.BillingAccount.currency].
*
*
* string amount = 1 [(.yandex.cloud.required) = true];
* @param value The amount to set.
* @return This builder for chaining.
*/
public Builder setAmount(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
amount_ = value;
onChanged();
return this;
}
/**
*
* Max balance threshold of the budget. Amount currency is the same as corresponding [yandex.cloud.billing.v1.BillingAccount.currency].
*
*
* string amount = 1 [(.yandex.cloud.required) = true];
* @return This builder for chaining.
*/
public Builder clearAmount() {
amount_ = getDefaultInstance().getAmount();
onChanged();
return this;
}
/**
*
* Max balance threshold of the budget. Amount currency is the same as corresponding [yandex.cloud.billing.v1.BillingAccount.currency].
*
*
* string amount = 1 [(.yandex.cloud.required) = true];
* @param value The bytes for amount to set.
* @return This builder for chaining.
*/
public Builder setAmountBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
amount_ = value;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList notificationUserAccountIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureNotificationUserAccountIdsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
notificationUserAccountIds_ = new com.google.protobuf.LazyStringArrayList(notificationUserAccountIds_);
bitField0_ |= 0x00000001;
}
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @return A list containing the notificationUserAccountIds.
*/
public com.google.protobuf.ProtocolStringList
getNotificationUserAccountIdsList() {
return notificationUserAccountIds_.getUnmodifiableView();
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @return The count of notificationUserAccountIds.
*/
public int getNotificationUserAccountIdsCount() {
return notificationUserAccountIds_.size();
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @param index The index of the element to return.
* @return The notificationUserAccountIds at the given index.
*/
public java.lang.String getNotificationUserAccountIds(int index) {
return notificationUserAccountIds_.get(index);
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @param index The index of the value to return.
* @return The bytes of the notificationUserAccountIds at the given index.
*/
public com.google.protobuf.ByteString
getNotificationUserAccountIdsBytes(int index) {
return notificationUserAccountIds_.getByteString(index);
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @param index The index to set the value at.
* @param value The notificationUserAccountIds to set.
* @return This builder for chaining.
*/
public Builder setNotificationUserAccountIds(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureNotificationUserAccountIdsIsMutable();
notificationUserAccountIds_.set(index, value);
onChanged();
return this;
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @param value The notificationUserAccountIds to add.
* @return This builder for chaining.
*/
public Builder addNotificationUserAccountIds(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureNotificationUserAccountIdsIsMutable();
notificationUserAccountIds_.add(value);
onChanged();
return this;
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @param values The notificationUserAccountIds to add.
* @return This builder for chaining.
*/
public Builder addAllNotificationUserAccountIds(
java.lang.Iterable values) {
ensureNotificationUserAccountIdsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, notificationUserAccountIds_);
onChanged();
return this;
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @return This builder for chaining.
*/
public Builder clearNotificationUserAccountIds() {
notificationUserAccountIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the budget exceeds.
*
*
* repeated string notification_user_account_ids = 2 [(.yandex.cloud.size) = ">=1"];
* @param value The bytes of the notificationUserAccountIds to add.
* @return This builder for chaining.
*/
public Builder addNotificationUserAccountIdsBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureNotificationUserAccountIdsIsMutable();
notificationUserAccountIds_.add(value);
onChanged();
return this;
}
private java.util.List thresholdRules_ =
java.util.Collections.emptyList();
private void ensureThresholdRulesIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
thresholdRules_ = new java.util.ArrayList(thresholdRules_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule, yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.Builder, yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRuleOrBuilder> thresholdRulesBuilder_;
/**
*
* List of the [ThresholdRule].
* Rules define intermediate balance thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public java.util.List getThresholdRulesList() {
if (thresholdRulesBuilder_ == null) {
return java.util.Collections.unmodifiableList(thresholdRules_);
} else {
return thresholdRulesBuilder_.getMessageList();
}
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate balance thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public int getThresholdRulesCount() {
if (thresholdRulesBuilder_ == null) {
return thresholdRules_.size();
} else {
return thresholdRulesBuilder_.getCount();
}
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate balance thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule getThresholdRules(int index) {
if (thresholdRulesBuilder_ == null) {
return thresholdRules_.get(index);
} else {
return thresholdRulesBuilder_.getMessage(index);
}
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate balance thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public Builder setThresholdRules(
int index, yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule value) {
if (thresholdRulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureThresholdRulesIsMutable();
thresholdRules_.set(index, value);
onChanged();
} else {
thresholdRulesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate balance thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public Builder setThresholdRules(
int index, yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.Builder builderForValue) {
if (thresholdRulesBuilder_ == null) {
ensureThresholdRulesIsMutable();
thresholdRules_.set(index, builderForValue.build());
onChanged();
} else {
thresholdRulesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate balance thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public Builder addThresholdRules(yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule value) {
if (thresholdRulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureThresholdRulesIsMutable();
thresholdRules_.add(value);
onChanged();
} else {
thresholdRulesBuilder_.addMessage(value);
}
return this;
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate balance thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public Builder addThresholdRules(
int index, yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule value) {
if (thresholdRulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureThresholdRulesIsMutable();
thresholdRules_.add(index, value);
onChanged();
} else {
thresholdRulesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate balance thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public Builder addThresholdRules(
yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.Builder builderForValue) {
if (thresholdRulesBuilder_ == null) {
ensureThresholdRulesIsMutable();
thresholdRules_.add(builderForValue.build());
onChanged();
} else {
thresholdRulesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate balance thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public Builder addThresholdRules(
int index, yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.Builder builderForValue) {
if (thresholdRulesBuilder_ == null) {
ensureThresholdRulesIsMutable();
thresholdRules_.add(index, builderForValue.build());
onChanged();
} else {
thresholdRulesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate balance thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public Builder addAllThresholdRules(
java.lang.Iterable extends yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule> values) {
if (thresholdRulesBuilder_ == null) {
ensureThresholdRulesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, thresholdRules_);
onChanged();
} else {
thresholdRulesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate balance thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public Builder clearThresholdRules() {
if (thresholdRulesBuilder_ == null) {
thresholdRules_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
thresholdRulesBuilder_.clear();
}
return this;
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate balance thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public Builder removeThresholdRules(int index) {
if (thresholdRulesBuilder_ == null) {
ensureThresholdRulesIsMutable();
thresholdRules_.remove(index);
onChanged();
} else {
thresholdRulesBuilder_.remove(index);
}
return this;
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate balance thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.Builder getThresholdRulesBuilder(
int index) {
return getThresholdRulesFieldBuilder().getBuilder(index);
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate balance thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRuleOrBuilder getThresholdRulesOrBuilder(
int index) {
if (thresholdRulesBuilder_ == null) {
return thresholdRules_.get(index); } else {
return thresholdRulesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate balance thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public java.util.List extends yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRuleOrBuilder>
getThresholdRulesOrBuilderList() {
if (thresholdRulesBuilder_ != null) {
return thresholdRulesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(thresholdRules_);
}
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate balance thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.Builder addThresholdRulesBuilder() {
return getThresholdRulesFieldBuilder().addBuilder(
yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.getDefaultInstance());
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate balance thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.Builder addThresholdRulesBuilder(
int index) {
return getThresholdRulesFieldBuilder().addBuilder(
index, yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.getDefaultInstance());
}
/**
*
* List of the [ThresholdRule].
* Rules define intermediate balance thresholds of the budget.
*
*
* repeated .yandex.cloud.billing.v1.ThresholdRule threshold_rules = 3;
*/
public java.util.List
getThresholdRulesBuilderList() {
return getThresholdRulesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule, yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.Builder, yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRuleOrBuilder>
getThresholdRulesFieldBuilder() {
if (thresholdRulesBuilder_ == null) {
thresholdRulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule, yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.Builder, yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRuleOrBuilder>(
thresholdRules_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
thresholdRules_ = null;
}
return thresholdRulesBuilder_;
}
private java.lang.Object startDate_ = "";
/**
*
* Start_date of the budget.
* Must be the first day of a month and must be formatted like YYYY-MM-DD.
*
*
* string start_date = 4;
* @return The startDate.
*/
public java.lang.String getStartDate() {
java.lang.Object ref = startDate_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
startDate_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Start_date of the budget.
* Must be the first day of a month and must be formatted like YYYY-MM-DD.
*
*
* string start_date = 4;
* @return The bytes for startDate.
*/
public com.google.protobuf.ByteString
getStartDateBytes() {
java.lang.Object ref = startDate_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
startDate_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Start_date of the budget.
* Must be the first day of a month and must be formatted like YYYY-MM-DD.
*
*
* string start_date = 4;
* @param value The startDate to set.
* @return This builder for chaining.
*/
public Builder setStartDate(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
startDate_ = value;
onChanged();
return this;
}
/**
*
* Start_date of the budget.
* Must be the first day of a month and must be formatted like YYYY-MM-DD.
*
*
* string start_date = 4;
* @return This builder for chaining.
*/
public Builder clearStartDate() {
startDate_ = getDefaultInstance().getStartDate();
onChanged();
return this;
}
/**
*
* Start_date of the budget.
* Must be the first day of a month and must be formatted like YYYY-MM-DD.
*
*
* string start_date = 4;
* @param value The bytes for startDate to set.
* @return This builder for chaining.
*/
public Builder setStartDateBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
startDate_ = value;
onChanged();
return this;
}
private java.lang.Object endDate_ = "";
/**
*
* End date of the budget.
* Must be the last day of a month and must be formatted like YYYY-MM-DD.
*
*
* string end_date = 5 [(.yandex.cloud.required) = true];
* @return The endDate.
*/
public java.lang.String getEndDate() {
java.lang.Object ref = endDate_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
endDate_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* End date of the budget.
* Must be the last day of a month and must be formatted like YYYY-MM-DD.
*
*
* string end_date = 5 [(.yandex.cloud.required) = true];
* @return The bytes for endDate.
*/
public com.google.protobuf.ByteString
getEndDateBytes() {
java.lang.Object ref = endDate_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
endDate_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* End date of the budget.
* Must be the last day of a month and must be formatted like YYYY-MM-DD.
*
*
* string end_date = 5 [(.yandex.cloud.required) = true];
* @param value The endDate to set.
* @return This builder for chaining.
*/
public Builder setEndDate(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
endDate_ = value;
onChanged();
return this;
}
/**
*
* End date of the budget.
* Must be the last day of a month and must be formatted like YYYY-MM-DD.
*
*
* string end_date = 5 [(.yandex.cloud.required) = true];
* @return This builder for chaining.
*/
public Builder clearEndDate() {
endDate_ = getDefaultInstance().getEndDate();
onChanged();
return this;
}
/**
*
* End date of the budget.
* Must be the last day of a month and must be formatted like YYYY-MM-DD.
*
*
* string end_date = 5 [(.yandex.cloud.required) = true];
* @param value The bytes for endDate to set.
* @return This builder for chaining.
*/
public Builder setEndDateBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
endDate_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:yandex.cloud.billing.v1.BalanceBudgetSpec)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.billing.v1.BalanceBudgetSpec)
private static final yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec();
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public BalanceBudgetSpec parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new BalanceBudgetSpec(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.BalanceBudgetSpec getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ConsumptionFilterOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.billing.v1.ConsumptionFilter)
com.google.protobuf.MessageOrBuilder {
/**
*
* IDs of the [yandex.cloud.billing.v1.Service].
* Only consumption of resources corresponding to the given services is used for the budget calculation.
* Empty sequence means no services filters.
*
*
* repeated string service_ids = 1;
* @return A list containing the serviceIds.
*/
java.util.List
getServiceIdsList();
/**
*
* IDs of the [yandex.cloud.billing.v1.Service].
* Only consumption of resources corresponding to the given services is used for the budget calculation.
* Empty sequence means no services filters.
*
*
* repeated string service_ids = 1;
* @return The count of serviceIds.
*/
int getServiceIdsCount();
/**
*
* IDs of the [yandex.cloud.billing.v1.Service].
* Only consumption of resources corresponding to the given services is used for the budget calculation.
* Empty sequence means no services filters.
*
*
* repeated string service_ids = 1;
* @param index The index of the element to return.
* @return The serviceIds at the given index.
*/
java.lang.String getServiceIds(int index);
/**
*
* IDs of the [yandex.cloud.billing.v1.Service].
* Only consumption of resources corresponding to the given services is used for the budget calculation.
* Empty sequence means no services filters.
*
*
* repeated string service_ids = 1;
* @param index The index of the value to return.
* @return The bytes of the serviceIds at the given index.
*/
com.google.protobuf.ByteString
getServiceIdsBytes(int index);
/**
*
* Cloud and folders consumption filter.
* Only consumption within specified clouds and folders is used for the budget calculation.
* Empty sequence means no cloud and folders filters.
*
*
* repeated .yandex.cloud.billing.v1.CloudFoldersConsumptionFilter cloud_folders_filters = 2;
*/
java.util.List
getCloudFoldersFiltersList();
/**
*
* Cloud and folders consumption filter.
* Only consumption within specified clouds and folders is used for the budget calculation.
* Empty sequence means no cloud and folders filters.
*
*
* repeated .yandex.cloud.billing.v1.CloudFoldersConsumptionFilter cloud_folders_filters = 2;
*/
yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter getCloudFoldersFilters(int index);
/**
*
* Cloud and folders consumption filter.
* Only consumption within specified clouds and folders is used for the budget calculation.
* Empty sequence means no cloud and folders filters.
*
*
* repeated .yandex.cloud.billing.v1.CloudFoldersConsumptionFilter cloud_folders_filters = 2;
*/
int getCloudFoldersFiltersCount();
/**
*
* Cloud and folders consumption filter.
* Only consumption within specified clouds and folders is used for the budget calculation.
* Empty sequence means no cloud and folders filters.
*
*
* repeated .yandex.cloud.billing.v1.CloudFoldersConsumptionFilter cloud_folders_filters = 2;
*/
java.util.List extends yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilterOrBuilder>
getCloudFoldersFiltersOrBuilderList();
/**
*
* Cloud and folders consumption filter.
* Only consumption within specified clouds and folders is used for the budget calculation.
* Empty sequence means no cloud and folders filters.
*
*
* repeated .yandex.cloud.billing.v1.CloudFoldersConsumptionFilter cloud_folders_filters = 2;
*/
yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilterOrBuilder getCloudFoldersFiltersOrBuilder(
int index);
}
/**
*
* Filter that can be used for specific resources selection.
*
*
* Protobuf type {@code yandex.cloud.billing.v1.ConsumptionFilter}
*/
public static final class ConsumptionFilter extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.billing.v1.ConsumptionFilter)
ConsumptionFilterOrBuilder {
private static final long serialVersionUID = 0L;
// Use ConsumptionFilter.newBuilder() to construct.
private ConsumptionFilter(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ConsumptionFilter() {
serviceIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
cloudFoldersFilters_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ConsumptionFilter();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ConsumptionFilter(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
serviceIds_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000001;
}
serviceIds_.add(s);
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
cloudFoldersFilters_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
cloudFoldersFilters_.add(
input.readMessage(yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter.parser(), extensionRegistry));
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
serviceIds_ = serviceIds_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
cloudFoldersFilters_ = java.util.Collections.unmodifiableList(cloudFoldersFilters_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.internal_static_yandex_cloud_billing_v1_ConsumptionFilter_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.internal_static_yandex_cloud_billing_v1_ConsumptionFilter_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter.class, yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter.Builder.class);
}
public static final int SERVICE_IDS_FIELD_NUMBER = 1;
private com.google.protobuf.LazyStringList serviceIds_;
/**
*
* IDs of the [yandex.cloud.billing.v1.Service].
* Only consumption of resources corresponding to the given services is used for the budget calculation.
* Empty sequence means no services filters.
*
*
* repeated string service_ids = 1;
* @return A list containing the serviceIds.
*/
public com.google.protobuf.ProtocolStringList
getServiceIdsList() {
return serviceIds_;
}
/**
*
* IDs of the [yandex.cloud.billing.v1.Service].
* Only consumption of resources corresponding to the given services is used for the budget calculation.
* Empty sequence means no services filters.
*
*
* repeated string service_ids = 1;
* @return The count of serviceIds.
*/
public int getServiceIdsCount() {
return serviceIds_.size();
}
/**
*
* IDs of the [yandex.cloud.billing.v1.Service].
* Only consumption of resources corresponding to the given services is used for the budget calculation.
* Empty sequence means no services filters.
*
*
* repeated string service_ids = 1;
* @param index The index of the element to return.
* @return The serviceIds at the given index.
*/
public java.lang.String getServiceIds(int index) {
return serviceIds_.get(index);
}
/**
*
* IDs of the [yandex.cloud.billing.v1.Service].
* Only consumption of resources corresponding to the given services is used for the budget calculation.
* Empty sequence means no services filters.
*
*
* repeated string service_ids = 1;
* @param index The index of the value to return.
* @return The bytes of the serviceIds at the given index.
*/
public com.google.protobuf.ByteString
getServiceIdsBytes(int index) {
return serviceIds_.getByteString(index);
}
public static final int CLOUD_FOLDERS_FILTERS_FIELD_NUMBER = 2;
private java.util.List cloudFoldersFilters_;
/**
*
* Cloud and folders consumption filter.
* Only consumption within specified clouds and folders is used for the budget calculation.
* Empty sequence means no cloud and folders filters.
*
*
* repeated .yandex.cloud.billing.v1.CloudFoldersConsumptionFilter cloud_folders_filters = 2;
*/
@java.lang.Override
public java.util.List getCloudFoldersFiltersList() {
return cloudFoldersFilters_;
}
/**
*
* Cloud and folders consumption filter.
* Only consumption within specified clouds and folders is used for the budget calculation.
* Empty sequence means no cloud and folders filters.
*
*
* repeated .yandex.cloud.billing.v1.CloudFoldersConsumptionFilter cloud_folders_filters = 2;
*/
@java.lang.Override
public java.util.List extends yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilterOrBuilder>
getCloudFoldersFiltersOrBuilderList() {
return cloudFoldersFilters_;
}
/**
*
* Cloud and folders consumption filter.
* Only consumption within specified clouds and folders is used for the budget calculation.
* Empty sequence means no cloud and folders filters.
*
*
* repeated .yandex.cloud.billing.v1.CloudFoldersConsumptionFilter cloud_folders_filters = 2;
*/
@java.lang.Override
public int getCloudFoldersFiltersCount() {
return cloudFoldersFilters_.size();
}
/**
*
* Cloud and folders consumption filter.
* Only consumption within specified clouds and folders is used for the budget calculation.
* Empty sequence means no cloud and folders filters.
*
*
* repeated .yandex.cloud.billing.v1.CloudFoldersConsumptionFilter cloud_folders_filters = 2;
*/
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter getCloudFoldersFilters(int index) {
return cloudFoldersFilters_.get(index);
}
/**
*
* Cloud and folders consumption filter.
* Only consumption within specified clouds and folders is used for the budget calculation.
* Empty sequence means no cloud and folders filters.
*
*
* repeated .yandex.cloud.billing.v1.CloudFoldersConsumptionFilter cloud_folders_filters = 2;
*/
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilterOrBuilder getCloudFoldersFiltersOrBuilder(
int index) {
return cloudFoldersFilters_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < serviceIds_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serviceIds_.getRaw(i));
}
for (int i = 0; i < cloudFoldersFilters_.size(); i++) {
output.writeMessage(2, cloudFoldersFilters_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < serviceIds_.size(); i++) {
dataSize += computeStringSizeNoTag(serviceIds_.getRaw(i));
}
size += dataSize;
size += 1 * getServiceIdsList().size();
}
for (int i = 0; i < cloudFoldersFilters_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, cloudFoldersFilters_.get(i));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter)) {
return super.equals(obj);
}
yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter other = (yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter) obj;
if (!getServiceIdsList()
.equals(other.getServiceIdsList())) return false;
if (!getCloudFoldersFiltersList()
.equals(other.getCloudFoldersFiltersList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getServiceIdsCount() > 0) {
hash = (37 * hash) + SERVICE_IDS_FIELD_NUMBER;
hash = (53 * hash) + getServiceIdsList().hashCode();
}
if (getCloudFoldersFiltersCount() > 0) {
hash = (37 * hash) + CLOUD_FOLDERS_FILTERS_FIELD_NUMBER;
hash = (53 * hash) + getCloudFoldersFiltersList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Filter that can be used for specific resources selection.
*
*
* Protobuf type {@code yandex.cloud.billing.v1.ConsumptionFilter}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.billing.v1.ConsumptionFilter)
yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilterOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.internal_static_yandex_cloud_billing_v1_ConsumptionFilter_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.internal_static_yandex_cloud_billing_v1_ConsumptionFilter_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter.class, yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter.Builder.class);
}
// Construct using yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getCloudFoldersFiltersFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
serviceIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
if (cloudFoldersFiltersBuilder_ == null) {
cloudFoldersFilters_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
cloudFoldersFiltersBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.internal_static_yandex_cloud_billing_v1_ConsumptionFilter_descriptor;
}
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter getDefaultInstanceForType() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter build() {
yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter buildPartial() {
yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter result = new yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter(this);
int from_bitField0_ = bitField0_;
if (((bitField0_ & 0x00000001) != 0)) {
serviceIds_ = serviceIds_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.serviceIds_ = serviceIds_;
if (cloudFoldersFiltersBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
cloudFoldersFilters_ = java.util.Collections.unmodifiableList(cloudFoldersFilters_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.cloudFoldersFilters_ = cloudFoldersFilters_;
} else {
result.cloudFoldersFilters_ = cloudFoldersFiltersBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter) {
return mergeFrom((yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter other) {
if (other == yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter.getDefaultInstance()) return this;
if (!other.serviceIds_.isEmpty()) {
if (serviceIds_.isEmpty()) {
serviceIds_ = other.serviceIds_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureServiceIdsIsMutable();
serviceIds_.addAll(other.serviceIds_);
}
onChanged();
}
if (cloudFoldersFiltersBuilder_ == null) {
if (!other.cloudFoldersFilters_.isEmpty()) {
if (cloudFoldersFilters_.isEmpty()) {
cloudFoldersFilters_ = other.cloudFoldersFilters_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureCloudFoldersFiltersIsMutable();
cloudFoldersFilters_.addAll(other.cloudFoldersFilters_);
}
onChanged();
}
} else {
if (!other.cloudFoldersFilters_.isEmpty()) {
if (cloudFoldersFiltersBuilder_.isEmpty()) {
cloudFoldersFiltersBuilder_.dispose();
cloudFoldersFiltersBuilder_ = null;
cloudFoldersFilters_ = other.cloudFoldersFilters_;
bitField0_ = (bitField0_ & ~0x00000002);
cloudFoldersFiltersBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getCloudFoldersFiltersFieldBuilder() : null;
} else {
cloudFoldersFiltersBuilder_.addAllMessages(other.cloudFoldersFilters_);
}
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.LazyStringList serviceIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureServiceIdsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
serviceIds_ = new com.google.protobuf.LazyStringArrayList(serviceIds_);
bitField0_ |= 0x00000001;
}
}
/**
*
* IDs of the [yandex.cloud.billing.v1.Service].
* Only consumption of resources corresponding to the given services is used for the budget calculation.
* Empty sequence means no services filters.
*
*
* repeated string service_ids = 1;
* @return A list containing the serviceIds.
*/
public com.google.protobuf.ProtocolStringList
getServiceIdsList() {
return serviceIds_.getUnmodifiableView();
}
/**
*
* IDs of the [yandex.cloud.billing.v1.Service].
* Only consumption of resources corresponding to the given services is used for the budget calculation.
* Empty sequence means no services filters.
*
*
* repeated string service_ids = 1;
* @return The count of serviceIds.
*/
public int getServiceIdsCount() {
return serviceIds_.size();
}
/**
*
* IDs of the [yandex.cloud.billing.v1.Service].
* Only consumption of resources corresponding to the given services is used for the budget calculation.
* Empty sequence means no services filters.
*
*
* repeated string service_ids = 1;
* @param index The index of the element to return.
* @return The serviceIds at the given index.
*/
public java.lang.String getServiceIds(int index) {
return serviceIds_.get(index);
}
/**
*
* IDs of the [yandex.cloud.billing.v1.Service].
* Only consumption of resources corresponding to the given services is used for the budget calculation.
* Empty sequence means no services filters.
*
*
* repeated string service_ids = 1;
* @param index The index of the value to return.
* @return The bytes of the serviceIds at the given index.
*/
public com.google.protobuf.ByteString
getServiceIdsBytes(int index) {
return serviceIds_.getByteString(index);
}
/**
*
* IDs of the [yandex.cloud.billing.v1.Service].
* Only consumption of resources corresponding to the given services is used for the budget calculation.
* Empty sequence means no services filters.
*
*
* repeated string service_ids = 1;
* @param index The index to set the value at.
* @param value The serviceIds to set.
* @return This builder for chaining.
*/
public Builder setServiceIds(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureServiceIdsIsMutable();
serviceIds_.set(index, value);
onChanged();
return this;
}
/**
*
* IDs of the [yandex.cloud.billing.v1.Service].
* Only consumption of resources corresponding to the given services is used for the budget calculation.
* Empty sequence means no services filters.
*
*
* repeated string service_ids = 1;
* @param value The serviceIds to add.
* @return This builder for chaining.
*/
public Builder addServiceIds(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureServiceIdsIsMutable();
serviceIds_.add(value);
onChanged();
return this;
}
/**
*
* IDs of the [yandex.cloud.billing.v1.Service].
* Only consumption of resources corresponding to the given services is used for the budget calculation.
* Empty sequence means no services filters.
*
*
* repeated string service_ids = 1;
* @param values The serviceIds to add.
* @return This builder for chaining.
*/
public Builder addAllServiceIds(
java.lang.Iterable values) {
ensureServiceIdsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, serviceIds_);
onChanged();
return this;
}
/**
*
* IDs of the [yandex.cloud.billing.v1.Service].
* Only consumption of resources corresponding to the given services is used for the budget calculation.
* Empty sequence means no services filters.
*
*
* repeated string service_ids = 1;
* @return This builder for chaining.
*/
public Builder clearServiceIds() {
serviceIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* IDs of the [yandex.cloud.billing.v1.Service].
* Only consumption of resources corresponding to the given services is used for the budget calculation.
* Empty sequence means no services filters.
*
*
* repeated string service_ids = 1;
* @param value The bytes of the serviceIds to add.
* @return This builder for chaining.
*/
public Builder addServiceIdsBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureServiceIdsIsMutable();
serviceIds_.add(value);
onChanged();
return this;
}
private java.util.List cloudFoldersFilters_ =
java.util.Collections.emptyList();
private void ensureCloudFoldersFiltersIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
cloudFoldersFilters_ = new java.util.ArrayList(cloudFoldersFilters_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter, yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter.Builder, yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilterOrBuilder> cloudFoldersFiltersBuilder_;
/**
*
* Cloud and folders consumption filter.
* Only consumption within specified clouds and folders is used for the budget calculation.
* Empty sequence means no cloud and folders filters.
*
*
* repeated .yandex.cloud.billing.v1.CloudFoldersConsumptionFilter cloud_folders_filters = 2;
*/
public java.util.List getCloudFoldersFiltersList() {
if (cloudFoldersFiltersBuilder_ == null) {
return java.util.Collections.unmodifiableList(cloudFoldersFilters_);
} else {
return cloudFoldersFiltersBuilder_.getMessageList();
}
}
/**
*
* Cloud and folders consumption filter.
* Only consumption within specified clouds and folders is used for the budget calculation.
* Empty sequence means no cloud and folders filters.
*
*
* repeated .yandex.cloud.billing.v1.CloudFoldersConsumptionFilter cloud_folders_filters = 2;
*/
public int getCloudFoldersFiltersCount() {
if (cloudFoldersFiltersBuilder_ == null) {
return cloudFoldersFilters_.size();
} else {
return cloudFoldersFiltersBuilder_.getCount();
}
}
/**
*
* Cloud and folders consumption filter.
* Only consumption within specified clouds and folders is used for the budget calculation.
* Empty sequence means no cloud and folders filters.
*
*
* repeated .yandex.cloud.billing.v1.CloudFoldersConsumptionFilter cloud_folders_filters = 2;
*/
public yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter getCloudFoldersFilters(int index) {
if (cloudFoldersFiltersBuilder_ == null) {
return cloudFoldersFilters_.get(index);
} else {
return cloudFoldersFiltersBuilder_.getMessage(index);
}
}
/**
*
* Cloud and folders consumption filter.
* Only consumption within specified clouds and folders is used for the budget calculation.
* Empty sequence means no cloud and folders filters.
*
*
* repeated .yandex.cloud.billing.v1.CloudFoldersConsumptionFilter cloud_folders_filters = 2;
*/
public Builder setCloudFoldersFilters(
int index, yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter value) {
if (cloudFoldersFiltersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureCloudFoldersFiltersIsMutable();
cloudFoldersFilters_.set(index, value);
onChanged();
} else {
cloudFoldersFiltersBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Cloud and folders consumption filter.
* Only consumption within specified clouds and folders is used for the budget calculation.
* Empty sequence means no cloud and folders filters.
*
*
* repeated .yandex.cloud.billing.v1.CloudFoldersConsumptionFilter cloud_folders_filters = 2;
*/
public Builder setCloudFoldersFilters(
int index, yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter.Builder builderForValue) {
if (cloudFoldersFiltersBuilder_ == null) {
ensureCloudFoldersFiltersIsMutable();
cloudFoldersFilters_.set(index, builderForValue.build());
onChanged();
} else {
cloudFoldersFiltersBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Cloud and folders consumption filter.
* Only consumption within specified clouds and folders is used for the budget calculation.
* Empty sequence means no cloud and folders filters.
*
*
* repeated .yandex.cloud.billing.v1.CloudFoldersConsumptionFilter cloud_folders_filters = 2;
*/
public Builder addCloudFoldersFilters(yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter value) {
if (cloudFoldersFiltersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureCloudFoldersFiltersIsMutable();
cloudFoldersFilters_.add(value);
onChanged();
} else {
cloudFoldersFiltersBuilder_.addMessage(value);
}
return this;
}
/**
*
* Cloud and folders consumption filter.
* Only consumption within specified clouds and folders is used for the budget calculation.
* Empty sequence means no cloud and folders filters.
*
*
* repeated .yandex.cloud.billing.v1.CloudFoldersConsumptionFilter cloud_folders_filters = 2;
*/
public Builder addCloudFoldersFilters(
int index, yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter value) {
if (cloudFoldersFiltersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureCloudFoldersFiltersIsMutable();
cloudFoldersFilters_.add(index, value);
onChanged();
} else {
cloudFoldersFiltersBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Cloud and folders consumption filter.
* Only consumption within specified clouds and folders is used for the budget calculation.
* Empty sequence means no cloud and folders filters.
*
*
* repeated .yandex.cloud.billing.v1.CloudFoldersConsumptionFilter cloud_folders_filters = 2;
*/
public Builder addCloudFoldersFilters(
yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter.Builder builderForValue) {
if (cloudFoldersFiltersBuilder_ == null) {
ensureCloudFoldersFiltersIsMutable();
cloudFoldersFilters_.add(builderForValue.build());
onChanged();
} else {
cloudFoldersFiltersBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Cloud and folders consumption filter.
* Only consumption within specified clouds and folders is used for the budget calculation.
* Empty sequence means no cloud and folders filters.
*
*
* repeated .yandex.cloud.billing.v1.CloudFoldersConsumptionFilter cloud_folders_filters = 2;
*/
public Builder addCloudFoldersFilters(
int index, yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter.Builder builderForValue) {
if (cloudFoldersFiltersBuilder_ == null) {
ensureCloudFoldersFiltersIsMutable();
cloudFoldersFilters_.add(index, builderForValue.build());
onChanged();
} else {
cloudFoldersFiltersBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Cloud and folders consumption filter.
* Only consumption within specified clouds and folders is used for the budget calculation.
* Empty sequence means no cloud and folders filters.
*
*
* repeated .yandex.cloud.billing.v1.CloudFoldersConsumptionFilter cloud_folders_filters = 2;
*/
public Builder addAllCloudFoldersFilters(
java.lang.Iterable extends yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter> values) {
if (cloudFoldersFiltersBuilder_ == null) {
ensureCloudFoldersFiltersIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, cloudFoldersFilters_);
onChanged();
} else {
cloudFoldersFiltersBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Cloud and folders consumption filter.
* Only consumption within specified clouds and folders is used for the budget calculation.
* Empty sequence means no cloud and folders filters.
*
*
* repeated .yandex.cloud.billing.v1.CloudFoldersConsumptionFilter cloud_folders_filters = 2;
*/
public Builder clearCloudFoldersFilters() {
if (cloudFoldersFiltersBuilder_ == null) {
cloudFoldersFilters_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
cloudFoldersFiltersBuilder_.clear();
}
return this;
}
/**
*
* Cloud and folders consumption filter.
* Only consumption within specified clouds and folders is used for the budget calculation.
* Empty sequence means no cloud and folders filters.
*
*
* repeated .yandex.cloud.billing.v1.CloudFoldersConsumptionFilter cloud_folders_filters = 2;
*/
public Builder removeCloudFoldersFilters(int index) {
if (cloudFoldersFiltersBuilder_ == null) {
ensureCloudFoldersFiltersIsMutable();
cloudFoldersFilters_.remove(index);
onChanged();
} else {
cloudFoldersFiltersBuilder_.remove(index);
}
return this;
}
/**
*
* Cloud and folders consumption filter.
* Only consumption within specified clouds and folders is used for the budget calculation.
* Empty sequence means no cloud and folders filters.
*
*
* repeated .yandex.cloud.billing.v1.CloudFoldersConsumptionFilter cloud_folders_filters = 2;
*/
public yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter.Builder getCloudFoldersFiltersBuilder(
int index) {
return getCloudFoldersFiltersFieldBuilder().getBuilder(index);
}
/**
*
* Cloud and folders consumption filter.
* Only consumption within specified clouds and folders is used for the budget calculation.
* Empty sequence means no cloud and folders filters.
*
*
* repeated .yandex.cloud.billing.v1.CloudFoldersConsumptionFilter cloud_folders_filters = 2;
*/
public yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilterOrBuilder getCloudFoldersFiltersOrBuilder(
int index) {
if (cloudFoldersFiltersBuilder_ == null) {
return cloudFoldersFilters_.get(index); } else {
return cloudFoldersFiltersBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Cloud and folders consumption filter.
* Only consumption within specified clouds and folders is used for the budget calculation.
* Empty sequence means no cloud and folders filters.
*
*
* repeated .yandex.cloud.billing.v1.CloudFoldersConsumptionFilter cloud_folders_filters = 2;
*/
public java.util.List extends yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilterOrBuilder>
getCloudFoldersFiltersOrBuilderList() {
if (cloudFoldersFiltersBuilder_ != null) {
return cloudFoldersFiltersBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(cloudFoldersFilters_);
}
}
/**
*
* Cloud and folders consumption filter.
* Only consumption within specified clouds and folders is used for the budget calculation.
* Empty sequence means no cloud and folders filters.
*
*
* repeated .yandex.cloud.billing.v1.CloudFoldersConsumptionFilter cloud_folders_filters = 2;
*/
public yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter.Builder addCloudFoldersFiltersBuilder() {
return getCloudFoldersFiltersFieldBuilder().addBuilder(
yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter.getDefaultInstance());
}
/**
*
* Cloud and folders consumption filter.
* Only consumption within specified clouds and folders is used for the budget calculation.
* Empty sequence means no cloud and folders filters.
*
*
* repeated .yandex.cloud.billing.v1.CloudFoldersConsumptionFilter cloud_folders_filters = 2;
*/
public yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter.Builder addCloudFoldersFiltersBuilder(
int index) {
return getCloudFoldersFiltersFieldBuilder().addBuilder(
index, yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter.getDefaultInstance());
}
/**
*
* Cloud and folders consumption filter.
* Only consumption within specified clouds and folders is used for the budget calculation.
* Empty sequence means no cloud and folders filters.
*
*
* repeated .yandex.cloud.billing.v1.CloudFoldersConsumptionFilter cloud_folders_filters = 2;
*/
public java.util.List
getCloudFoldersFiltersBuilderList() {
return getCloudFoldersFiltersFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter, yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter.Builder, yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilterOrBuilder>
getCloudFoldersFiltersFieldBuilder() {
if (cloudFoldersFiltersBuilder_ == null) {
cloudFoldersFiltersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter, yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter.Builder, yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilterOrBuilder>(
cloudFoldersFilters_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
cloudFoldersFilters_ = null;
}
return cloudFoldersFiltersBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:yandex.cloud.billing.v1.ConsumptionFilter)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.billing.v1.ConsumptionFilter)
private static final yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter();
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ConsumptionFilter parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ConsumptionFilter(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.ConsumptionFilter getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CloudFoldersConsumptionFilterOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.billing.v1.CloudFoldersConsumptionFilter)
com.google.protobuf.MessageOrBuilder {
/**
*
* ID of the [yandex.cloud.resourcemanager.v1.Cloud].
* Only consumption within specified cloud is used for the budget calculation.
*
*
* string cloud_id = 1;
* @return The cloudId.
*/
java.lang.String getCloudId();
/**
*
* ID of the [yandex.cloud.resourcemanager.v1.Cloud].
* Only consumption within specified cloud is used for the budget calculation.
*
*
* string cloud_id = 1;
* @return The bytes for cloudId.
*/
com.google.protobuf.ByteString
getCloudIdBytes();
/**
*
* IDs of the [yandex.cloud.resourcemanager.v1.Folder].
* Only consumption within specified folders of the given cloud is used for the budget calculation.
* Empty sequence means no folders filters and the whole cloud consumption will be used.
*
*
* repeated string folder_ids = 2;
* @return A list containing the folderIds.
*/
java.util.List
getFolderIdsList();
/**
*
* IDs of the [yandex.cloud.resourcemanager.v1.Folder].
* Only consumption within specified folders of the given cloud is used for the budget calculation.
* Empty sequence means no folders filters and the whole cloud consumption will be used.
*
*
* repeated string folder_ids = 2;
* @return The count of folderIds.
*/
int getFolderIdsCount();
/**
*
* IDs of the [yandex.cloud.resourcemanager.v1.Folder].
* Only consumption within specified folders of the given cloud is used for the budget calculation.
* Empty sequence means no folders filters and the whole cloud consumption will be used.
*
*
* repeated string folder_ids = 2;
* @param index The index of the element to return.
* @return The folderIds at the given index.
*/
java.lang.String getFolderIds(int index);
/**
*
* IDs of the [yandex.cloud.resourcemanager.v1.Folder].
* Only consumption within specified folders of the given cloud is used for the budget calculation.
* Empty sequence means no folders filters and the whole cloud consumption will be used.
*
*
* repeated string folder_ids = 2;
* @param index The index of the value to return.
* @return The bytes of the folderIds at the given index.
*/
com.google.protobuf.ByteString
getFolderIdsBytes(int index);
}
/**
*
* Filter that can be used for specific cloud and its folders selection.
*
*
* Protobuf type {@code yandex.cloud.billing.v1.CloudFoldersConsumptionFilter}
*/
public static final class CloudFoldersConsumptionFilter extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.billing.v1.CloudFoldersConsumptionFilter)
CloudFoldersConsumptionFilterOrBuilder {
private static final long serialVersionUID = 0L;
// Use CloudFoldersConsumptionFilter.newBuilder() to construct.
private CloudFoldersConsumptionFilter(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CloudFoldersConsumptionFilter() {
cloudId_ = "";
folderIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CloudFoldersConsumptionFilter();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private CloudFoldersConsumptionFilter(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
cloudId_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
folderIds_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000001;
}
folderIds_.add(s);
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
folderIds_ = folderIds_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.internal_static_yandex_cloud_billing_v1_CloudFoldersConsumptionFilter_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.internal_static_yandex_cloud_billing_v1_CloudFoldersConsumptionFilter_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter.class, yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter.Builder.class);
}
public static final int CLOUD_ID_FIELD_NUMBER = 1;
private volatile java.lang.Object cloudId_;
/**
*
* ID of the [yandex.cloud.resourcemanager.v1.Cloud].
* Only consumption within specified cloud is used for the budget calculation.
*
*
* string cloud_id = 1;
* @return The cloudId.
*/
@java.lang.Override
public java.lang.String getCloudId() {
java.lang.Object ref = cloudId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
cloudId_ = s;
return s;
}
}
/**
*
* ID of the [yandex.cloud.resourcemanager.v1.Cloud].
* Only consumption within specified cloud is used for the budget calculation.
*
*
* string cloud_id = 1;
* @return The bytes for cloudId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getCloudIdBytes() {
java.lang.Object ref = cloudId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
cloudId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int FOLDER_IDS_FIELD_NUMBER = 2;
private com.google.protobuf.LazyStringList folderIds_;
/**
*
* IDs of the [yandex.cloud.resourcemanager.v1.Folder].
* Only consumption within specified folders of the given cloud is used for the budget calculation.
* Empty sequence means no folders filters and the whole cloud consumption will be used.
*
*
* repeated string folder_ids = 2;
* @return A list containing the folderIds.
*/
public com.google.protobuf.ProtocolStringList
getFolderIdsList() {
return folderIds_;
}
/**
*
* IDs of the [yandex.cloud.resourcemanager.v1.Folder].
* Only consumption within specified folders of the given cloud is used for the budget calculation.
* Empty sequence means no folders filters and the whole cloud consumption will be used.
*
*
* repeated string folder_ids = 2;
* @return The count of folderIds.
*/
public int getFolderIdsCount() {
return folderIds_.size();
}
/**
*
* IDs of the [yandex.cloud.resourcemanager.v1.Folder].
* Only consumption within specified folders of the given cloud is used for the budget calculation.
* Empty sequence means no folders filters and the whole cloud consumption will be used.
*
*
* repeated string folder_ids = 2;
* @param index The index of the element to return.
* @return The folderIds at the given index.
*/
public java.lang.String getFolderIds(int index) {
return folderIds_.get(index);
}
/**
*
* IDs of the [yandex.cloud.resourcemanager.v1.Folder].
* Only consumption within specified folders of the given cloud is used for the budget calculation.
* Empty sequence means no folders filters and the whole cloud consumption will be used.
*
*
* repeated string folder_ids = 2;
* @param index The index of the value to return.
* @return The bytes of the folderIds at the given index.
*/
public com.google.protobuf.ByteString
getFolderIdsBytes(int index) {
return folderIds_.getByteString(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cloudId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cloudId_);
}
for (int i = 0; i < folderIds_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, folderIds_.getRaw(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cloudId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cloudId_);
}
{
int dataSize = 0;
for (int i = 0; i < folderIds_.size(); i++) {
dataSize += computeStringSizeNoTag(folderIds_.getRaw(i));
}
size += dataSize;
size += 1 * getFolderIdsList().size();
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter)) {
return super.equals(obj);
}
yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter other = (yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter) obj;
if (!getCloudId()
.equals(other.getCloudId())) return false;
if (!getFolderIdsList()
.equals(other.getFolderIdsList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + CLOUD_ID_FIELD_NUMBER;
hash = (53 * hash) + getCloudId().hashCode();
if (getFolderIdsCount() > 0) {
hash = (37 * hash) + FOLDER_IDS_FIELD_NUMBER;
hash = (53 * hash) + getFolderIdsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Filter that can be used for specific cloud and its folders selection.
*
*
* Protobuf type {@code yandex.cloud.billing.v1.CloudFoldersConsumptionFilter}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.billing.v1.CloudFoldersConsumptionFilter)
yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilterOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.internal_static_yandex_cloud_billing_v1_CloudFoldersConsumptionFilter_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.internal_static_yandex_cloud_billing_v1_CloudFoldersConsumptionFilter_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter.class, yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter.Builder.class);
}
// Construct using yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
cloudId_ = "";
folderIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.internal_static_yandex_cloud_billing_v1_CloudFoldersConsumptionFilter_descriptor;
}
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter getDefaultInstanceForType() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter build() {
yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter buildPartial() {
yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter result = new yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter(this);
int from_bitField0_ = bitField0_;
result.cloudId_ = cloudId_;
if (((bitField0_ & 0x00000001) != 0)) {
folderIds_ = folderIds_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.folderIds_ = folderIds_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter) {
return mergeFrom((yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter other) {
if (other == yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter.getDefaultInstance()) return this;
if (!other.getCloudId().isEmpty()) {
cloudId_ = other.cloudId_;
onChanged();
}
if (!other.folderIds_.isEmpty()) {
if (folderIds_.isEmpty()) {
folderIds_ = other.folderIds_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureFolderIdsIsMutable();
folderIds_.addAll(other.folderIds_);
}
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object cloudId_ = "";
/**
*
* ID of the [yandex.cloud.resourcemanager.v1.Cloud].
* Only consumption within specified cloud is used for the budget calculation.
*
*
* string cloud_id = 1;
* @return The cloudId.
*/
public java.lang.String getCloudId() {
java.lang.Object ref = cloudId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
cloudId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* ID of the [yandex.cloud.resourcemanager.v1.Cloud].
* Only consumption within specified cloud is used for the budget calculation.
*
*
* string cloud_id = 1;
* @return The bytes for cloudId.
*/
public com.google.protobuf.ByteString
getCloudIdBytes() {
java.lang.Object ref = cloudId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
cloudId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* ID of the [yandex.cloud.resourcemanager.v1.Cloud].
* Only consumption within specified cloud is used for the budget calculation.
*
*
* string cloud_id = 1;
* @param value The cloudId to set.
* @return This builder for chaining.
*/
public Builder setCloudId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
cloudId_ = value;
onChanged();
return this;
}
/**
*
* ID of the [yandex.cloud.resourcemanager.v1.Cloud].
* Only consumption within specified cloud is used for the budget calculation.
*
*
* string cloud_id = 1;
* @return This builder for chaining.
*/
public Builder clearCloudId() {
cloudId_ = getDefaultInstance().getCloudId();
onChanged();
return this;
}
/**
*
* ID of the [yandex.cloud.resourcemanager.v1.Cloud].
* Only consumption within specified cloud is used for the budget calculation.
*
*
* string cloud_id = 1;
* @param value The bytes for cloudId to set.
* @return This builder for chaining.
*/
public Builder setCloudIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
cloudId_ = value;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList folderIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureFolderIdsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
folderIds_ = new com.google.protobuf.LazyStringArrayList(folderIds_);
bitField0_ |= 0x00000001;
}
}
/**
*
* IDs of the [yandex.cloud.resourcemanager.v1.Folder].
* Only consumption within specified folders of the given cloud is used for the budget calculation.
* Empty sequence means no folders filters and the whole cloud consumption will be used.
*
*
* repeated string folder_ids = 2;
* @return A list containing the folderIds.
*/
public com.google.protobuf.ProtocolStringList
getFolderIdsList() {
return folderIds_.getUnmodifiableView();
}
/**
*
* IDs of the [yandex.cloud.resourcemanager.v1.Folder].
* Only consumption within specified folders of the given cloud is used for the budget calculation.
* Empty sequence means no folders filters and the whole cloud consumption will be used.
*
*
* repeated string folder_ids = 2;
* @return The count of folderIds.
*/
public int getFolderIdsCount() {
return folderIds_.size();
}
/**
*
* IDs of the [yandex.cloud.resourcemanager.v1.Folder].
* Only consumption within specified folders of the given cloud is used for the budget calculation.
* Empty sequence means no folders filters and the whole cloud consumption will be used.
*
*
* repeated string folder_ids = 2;
* @param index The index of the element to return.
* @return The folderIds at the given index.
*/
public java.lang.String getFolderIds(int index) {
return folderIds_.get(index);
}
/**
*
* IDs of the [yandex.cloud.resourcemanager.v1.Folder].
* Only consumption within specified folders of the given cloud is used for the budget calculation.
* Empty sequence means no folders filters and the whole cloud consumption will be used.
*
*
* repeated string folder_ids = 2;
* @param index The index of the value to return.
* @return The bytes of the folderIds at the given index.
*/
public com.google.protobuf.ByteString
getFolderIdsBytes(int index) {
return folderIds_.getByteString(index);
}
/**
*
* IDs of the [yandex.cloud.resourcemanager.v1.Folder].
* Only consumption within specified folders of the given cloud is used for the budget calculation.
* Empty sequence means no folders filters and the whole cloud consumption will be used.
*
*
* repeated string folder_ids = 2;
* @param index The index to set the value at.
* @param value The folderIds to set.
* @return This builder for chaining.
*/
public Builder setFolderIds(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureFolderIdsIsMutable();
folderIds_.set(index, value);
onChanged();
return this;
}
/**
*
* IDs of the [yandex.cloud.resourcemanager.v1.Folder].
* Only consumption within specified folders of the given cloud is used for the budget calculation.
* Empty sequence means no folders filters and the whole cloud consumption will be used.
*
*
* repeated string folder_ids = 2;
* @param value The folderIds to add.
* @return This builder for chaining.
*/
public Builder addFolderIds(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureFolderIdsIsMutable();
folderIds_.add(value);
onChanged();
return this;
}
/**
*
* IDs of the [yandex.cloud.resourcemanager.v1.Folder].
* Only consumption within specified folders of the given cloud is used for the budget calculation.
* Empty sequence means no folders filters and the whole cloud consumption will be used.
*
*
* repeated string folder_ids = 2;
* @param values The folderIds to add.
* @return This builder for chaining.
*/
public Builder addAllFolderIds(
java.lang.Iterable values) {
ensureFolderIdsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, folderIds_);
onChanged();
return this;
}
/**
*
* IDs of the [yandex.cloud.resourcemanager.v1.Folder].
* Only consumption within specified folders of the given cloud is used for the budget calculation.
* Empty sequence means no folders filters and the whole cloud consumption will be used.
*
*
* repeated string folder_ids = 2;
* @return This builder for chaining.
*/
public Builder clearFolderIds() {
folderIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* IDs of the [yandex.cloud.resourcemanager.v1.Folder].
* Only consumption within specified folders of the given cloud is used for the budget calculation.
* Empty sequence means no folders filters and the whole cloud consumption will be used.
*
*
* repeated string folder_ids = 2;
* @param value The bytes of the folderIds to add.
* @return This builder for chaining.
*/
public Builder addFolderIdsBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureFolderIdsIsMutable();
folderIds_.add(value);
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:yandex.cloud.billing.v1.CloudFoldersConsumptionFilter)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.billing.v1.CloudFoldersConsumptionFilter)
private static final yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter();
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CloudFoldersConsumptionFilter parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new CloudFoldersConsumptionFilter(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.CloudFoldersConsumptionFilter getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ThresholdRuleOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.billing.v1.ThresholdRule)
com.google.protobuf.MessageOrBuilder {
/**
*
* Type of the rule.
*
*
* .yandex.cloud.billing.v1.ThresholdType type = 1 [(.yandex.cloud.required) = true];
* @return The enum numeric value on the wire for type.
*/
int getTypeValue();
/**
*
* Type of the rule.
*
*
* .yandex.cloud.billing.v1.ThresholdType type = 1 [(.yandex.cloud.required) = true];
* @return The type.
*/
yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdType getType();
/**
*
* Amount of the rule.
* * Must be less than 100 if type is PERCENT.
* * Must be less than budget's amount if type is AMOUNT.
*
*
* string amount = 2 [(.yandex.cloud.required) = true];
* @return The amount.
*/
java.lang.String getAmount();
/**
*
* Amount of the rule.
* * Must be less than 100 if type is PERCENT.
* * Must be less than budget's amount if type is AMOUNT.
*
*
* string amount = 2 [(.yandex.cloud.required) = true];
* @return The bytes for amount.
*/
com.google.protobuf.ByteString
getAmountBytes();
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the threshold exceeds.
*
*
* repeated string notification_user_account_ids = 3;
* @return A list containing the notificationUserAccountIds.
*/
java.util.List
getNotificationUserAccountIdsList();
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the threshold exceeds.
*
*
* repeated string notification_user_account_ids = 3;
* @return The count of notificationUserAccountIds.
*/
int getNotificationUserAccountIdsCount();
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the threshold exceeds.
*
*
* repeated string notification_user_account_ids = 3;
* @param index The index of the element to return.
* @return The notificationUserAccountIds at the given index.
*/
java.lang.String getNotificationUserAccountIds(int index);
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the threshold exceeds.
*
*
* repeated string notification_user_account_ids = 3;
* @param index The index of the value to return.
* @return The bytes of the notificationUserAccountIds at the given index.
*/
com.google.protobuf.ByteString
getNotificationUserAccountIdsBytes(int index);
}
/**
*
* Rules that define intermediate cost thresholds of the budget.
*
*
* Protobuf type {@code yandex.cloud.billing.v1.ThresholdRule}
*/
public static final class ThresholdRule extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.billing.v1.ThresholdRule)
ThresholdRuleOrBuilder {
private static final long serialVersionUID = 0L;
// Use ThresholdRule.newBuilder() to construct.
private ThresholdRule(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ThresholdRule() {
type_ = 0;
amount_ = "";
notificationUserAccountIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ThresholdRule();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ThresholdRule(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
int rawValue = input.readEnum();
type_ = rawValue;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
amount_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
notificationUserAccountIds_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000001;
}
notificationUserAccountIds_.add(s);
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
notificationUserAccountIds_ = notificationUserAccountIds_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.internal_static_yandex_cloud_billing_v1_ThresholdRule_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.internal_static_yandex_cloud_billing_v1_ThresholdRule_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.class, yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.Builder.class);
}
public static final int TYPE_FIELD_NUMBER = 1;
private int type_;
/**
*
* Type of the rule.
*
*
* .yandex.cloud.billing.v1.ThresholdType type = 1 [(.yandex.cloud.required) = true];
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
*
* Type of the rule.
*
*
* .yandex.cloud.billing.v1.ThresholdType type = 1 [(.yandex.cloud.required) = true];
* @return The type.
*/
@java.lang.Override public yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdType getType() {
@SuppressWarnings("deprecation")
yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdType result = yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdType.valueOf(type_);
return result == null ? yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdType.UNRECOGNIZED : result;
}
public static final int AMOUNT_FIELD_NUMBER = 2;
private volatile java.lang.Object amount_;
/**
*
* Amount of the rule.
* * Must be less than 100 if type is PERCENT.
* * Must be less than budget's amount if type is AMOUNT.
*
*
* string amount = 2 [(.yandex.cloud.required) = true];
* @return The amount.
*/
@java.lang.Override
public java.lang.String getAmount() {
java.lang.Object ref = amount_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
amount_ = s;
return s;
}
}
/**
*
* Amount of the rule.
* * Must be less than 100 if type is PERCENT.
* * Must be less than budget's amount if type is AMOUNT.
*
*
* string amount = 2 [(.yandex.cloud.required) = true];
* @return The bytes for amount.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getAmountBytes() {
java.lang.Object ref = amount_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
amount_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int NOTIFICATION_USER_ACCOUNT_IDS_FIELD_NUMBER = 3;
private com.google.protobuf.LazyStringList notificationUserAccountIds_;
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the threshold exceeds.
*
*
* repeated string notification_user_account_ids = 3;
* @return A list containing the notificationUserAccountIds.
*/
public com.google.protobuf.ProtocolStringList
getNotificationUserAccountIdsList() {
return notificationUserAccountIds_;
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the threshold exceeds.
*
*
* repeated string notification_user_account_ids = 3;
* @return The count of notificationUserAccountIds.
*/
public int getNotificationUserAccountIdsCount() {
return notificationUserAccountIds_.size();
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the threshold exceeds.
*
*
* repeated string notification_user_account_ids = 3;
* @param index The index of the element to return.
* @return The notificationUserAccountIds at the given index.
*/
public java.lang.String getNotificationUserAccountIds(int index) {
return notificationUserAccountIds_.get(index);
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the threshold exceeds.
*
*
* repeated string notification_user_account_ids = 3;
* @param index The index of the value to return.
* @return The bytes of the notificationUserAccountIds at the given index.
*/
public com.google.protobuf.ByteString
getNotificationUserAccountIdsBytes(int index) {
return notificationUserAccountIds_.getByteString(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (type_ != yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdType.THRESHOLD_TYPE_UNSPECIFIED.getNumber()) {
output.writeEnum(1, type_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(amount_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, amount_);
}
for (int i = 0; i < notificationUserAccountIds_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, notificationUserAccountIds_.getRaw(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (type_ != yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdType.THRESHOLD_TYPE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, type_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(amount_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, amount_);
}
{
int dataSize = 0;
for (int i = 0; i < notificationUserAccountIds_.size(); i++) {
dataSize += computeStringSizeNoTag(notificationUserAccountIds_.getRaw(i));
}
size += dataSize;
size += 1 * getNotificationUserAccountIdsList().size();
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule)) {
return super.equals(obj);
}
yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule other = (yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule) obj;
if (type_ != other.type_) return false;
if (!getAmount()
.equals(other.getAmount())) return false;
if (!getNotificationUserAccountIdsList()
.equals(other.getNotificationUserAccountIdsList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + type_;
hash = (37 * hash) + AMOUNT_FIELD_NUMBER;
hash = (53 * hash) + getAmount().hashCode();
if (getNotificationUserAccountIdsCount() > 0) {
hash = (37 * hash) + NOTIFICATION_USER_ACCOUNT_IDS_FIELD_NUMBER;
hash = (53 * hash) + getNotificationUserAccountIdsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Rules that define intermediate cost thresholds of the budget.
*
*
* Protobuf type {@code yandex.cloud.billing.v1.ThresholdRule}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.billing.v1.ThresholdRule)
yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRuleOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.internal_static_yandex_cloud_billing_v1_ThresholdRule_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.internal_static_yandex_cloud_billing_v1_ThresholdRule_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.class, yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.Builder.class);
}
// Construct using yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
type_ = 0;
amount_ = "";
notificationUserAccountIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.internal_static_yandex_cloud_billing_v1_ThresholdRule_descriptor;
}
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule getDefaultInstanceForType() {
return yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule build() {
yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule buildPartial() {
yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule result = new yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule(this);
int from_bitField0_ = bitField0_;
result.type_ = type_;
result.amount_ = amount_;
if (((bitField0_ & 0x00000001) != 0)) {
notificationUserAccountIds_ = notificationUserAccountIds_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.notificationUserAccountIds_ = notificationUserAccountIds_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule) {
return mergeFrom((yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule other) {
if (other == yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule.getDefaultInstance()) return this;
if (other.type_ != 0) {
setTypeValue(other.getTypeValue());
}
if (!other.getAmount().isEmpty()) {
amount_ = other.amount_;
onChanged();
}
if (!other.notificationUserAccountIds_.isEmpty()) {
if (notificationUserAccountIds_.isEmpty()) {
notificationUserAccountIds_ = other.notificationUserAccountIds_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureNotificationUserAccountIdsIsMutable();
notificationUserAccountIds_.addAll(other.notificationUserAccountIds_);
}
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private int type_ = 0;
/**
*
* Type of the rule.
*
*
* .yandex.cloud.billing.v1.ThresholdType type = 1 [(.yandex.cloud.required) = true];
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
*
* Type of the rule.
*
*
* .yandex.cloud.billing.v1.ThresholdType type = 1 [(.yandex.cloud.required) = true];
* @param value The enum numeric value on the wire for type to set.
* @return This builder for chaining.
*/
public Builder setTypeValue(int value) {
type_ = value;
onChanged();
return this;
}
/**
*
* Type of the rule.
*
*
* .yandex.cloud.billing.v1.ThresholdType type = 1 [(.yandex.cloud.required) = true];
* @return The type.
*/
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdType getType() {
@SuppressWarnings("deprecation")
yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdType result = yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdType.valueOf(type_);
return result == null ? yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdType.UNRECOGNIZED : result;
}
/**
*
* Type of the rule.
*
*
* .yandex.cloud.billing.v1.ThresholdType type = 1 [(.yandex.cloud.required) = true];
* @param value The type to set.
* @return This builder for chaining.
*/
public Builder setType(yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdType value) {
if (value == null) {
throw new NullPointerException();
}
type_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Type of the rule.
*
*
* .yandex.cloud.billing.v1.ThresholdType type = 1 [(.yandex.cloud.required) = true];
* @return This builder for chaining.
*/
public Builder clearType() {
type_ = 0;
onChanged();
return this;
}
private java.lang.Object amount_ = "";
/**
*
* Amount of the rule.
* * Must be less than 100 if type is PERCENT.
* * Must be less than budget's amount if type is AMOUNT.
*
*
* string amount = 2 [(.yandex.cloud.required) = true];
* @return The amount.
*/
public java.lang.String getAmount() {
java.lang.Object ref = amount_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
amount_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Amount of the rule.
* * Must be less than 100 if type is PERCENT.
* * Must be less than budget's amount if type is AMOUNT.
*
*
* string amount = 2 [(.yandex.cloud.required) = true];
* @return The bytes for amount.
*/
public com.google.protobuf.ByteString
getAmountBytes() {
java.lang.Object ref = amount_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
amount_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Amount of the rule.
* * Must be less than 100 if type is PERCENT.
* * Must be less than budget's amount if type is AMOUNT.
*
*
* string amount = 2 [(.yandex.cloud.required) = true];
* @param value The amount to set.
* @return This builder for chaining.
*/
public Builder setAmount(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
amount_ = value;
onChanged();
return this;
}
/**
*
* Amount of the rule.
* * Must be less than 100 if type is PERCENT.
* * Must be less than budget's amount if type is AMOUNT.
*
*
* string amount = 2 [(.yandex.cloud.required) = true];
* @return This builder for chaining.
*/
public Builder clearAmount() {
amount_ = getDefaultInstance().getAmount();
onChanged();
return this;
}
/**
*
* Amount of the rule.
* * Must be less than 100 if type is PERCENT.
* * Must be less than budget's amount if type is AMOUNT.
*
*
* string amount = 2 [(.yandex.cloud.required) = true];
* @param value The bytes for amount to set.
* @return This builder for chaining.
*/
public Builder setAmountBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
amount_ = value;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList notificationUserAccountIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureNotificationUserAccountIdsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
notificationUserAccountIds_ = new com.google.protobuf.LazyStringArrayList(notificationUserAccountIds_);
bitField0_ |= 0x00000001;
}
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the threshold exceeds.
*
*
* repeated string notification_user_account_ids = 3;
* @return A list containing the notificationUserAccountIds.
*/
public com.google.protobuf.ProtocolStringList
getNotificationUserAccountIdsList() {
return notificationUserAccountIds_.getUnmodifiableView();
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the threshold exceeds.
*
*
* repeated string notification_user_account_ids = 3;
* @return The count of notificationUserAccountIds.
*/
public int getNotificationUserAccountIdsCount() {
return notificationUserAccountIds_.size();
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the threshold exceeds.
*
*
* repeated string notification_user_account_ids = 3;
* @param index The index of the element to return.
* @return The notificationUserAccountIds at the given index.
*/
public java.lang.String getNotificationUserAccountIds(int index) {
return notificationUserAccountIds_.get(index);
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the threshold exceeds.
*
*
* repeated string notification_user_account_ids = 3;
* @param index The index of the value to return.
* @return The bytes of the notificationUserAccountIds at the given index.
*/
public com.google.protobuf.ByteString
getNotificationUserAccountIdsBytes(int index) {
return notificationUserAccountIds_.getByteString(index);
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the threshold exceeds.
*
*
* repeated string notification_user_account_ids = 3;
* @param index The index to set the value at.
* @param value The notificationUserAccountIds to set.
* @return This builder for chaining.
*/
public Builder setNotificationUserAccountIds(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureNotificationUserAccountIdsIsMutable();
notificationUserAccountIds_.set(index, value);
onChanged();
return this;
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the threshold exceeds.
*
*
* repeated string notification_user_account_ids = 3;
* @param value The notificationUserAccountIds to add.
* @return This builder for chaining.
*/
public Builder addNotificationUserAccountIds(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureNotificationUserAccountIdsIsMutable();
notificationUserAccountIds_.add(value);
onChanged();
return this;
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the threshold exceeds.
*
*
* repeated string notification_user_account_ids = 3;
* @param values The notificationUserAccountIds to add.
* @return This builder for chaining.
*/
public Builder addAllNotificationUserAccountIds(
java.lang.Iterable values) {
ensureNotificationUserAccountIdsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, notificationUserAccountIds_);
onChanged();
return this;
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the threshold exceeds.
*
*
* repeated string notification_user_account_ids = 3;
* @return This builder for chaining.
*/
public Builder clearNotificationUserAccountIds() {
notificationUserAccountIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* IDs of the [yandex.cloud.iam.v1.UserAccount].
* Specified users will be be notified if the threshold exceeds.
*
*
* repeated string notification_user_account_ids = 3;
* @param value The bytes of the notificationUserAccountIds to add.
* @return This builder for chaining.
*/
public Builder addNotificationUserAccountIdsBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureNotificationUserAccountIdsIsMutable();
notificationUserAccountIds_.add(value);
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:yandex.cloud.billing.v1.ThresholdRule)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.billing.v1.ThresholdRule)
private static final yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule();
}
public static yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ThresholdRule parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ThresholdRule(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.billing.v1.BudgetOuterClass.ThresholdRule getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_billing_v1_Budget_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_billing_v1_Budget_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_billing_v1_CostBudgetSpec_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_billing_v1_CostBudgetSpec_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_billing_v1_ExpenseBudgetSpec_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_billing_v1_ExpenseBudgetSpec_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_billing_v1_BalanceBudgetSpec_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_billing_v1_BalanceBudgetSpec_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_billing_v1_ConsumptionFilter_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_billing_v1_ConsumptionFilter_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_billing_v1_CloudFoldersConsumptionFilter_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_billing_v1_CloudFoldersConsumptionFilter_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_billing_v1_ThresholdRule_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_billing_v1_ThresholdRule_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n$yandex/cloud/billing/v1/budget.proto\022\027" +
"yandex.cloud.billing.v1\032\037google/protobuf" +
"/timestamp.proto\032\035yandex/cloud/validatio" +
"n.proto\"\206\003\n\006Budget\022\n\n\002id\030\001 \001(\t\022\014\n\004name\030\002" +
" \001(\t\022.\n\ncreated_at\030\003 \001(\0132\032.google.protob" +
"uf.Timestamp\022\032\n\022billing_account_id\030\004 \001(\t" +
"\0225\n\006status\030\005 \001(\0162%.yandex.cloud.billing." +
"v1.BudgetStatus\022>\n\013cost_budget\030\006 \001(\0132\'.y" +
"andex.cloud.billing.v1.CostBudgetSpecH\000\022" +
"D\n\016expense_budget\030\007 \001(\0132*.yandex.cloud.b" +
"illing.v1.ExpenseBudgetSpecH\000\022D\n\016balance" +
"_budget\030\010 \001(\0132*.yandex.cloud.billing.v1." +
"BalanceBudgetSpecH\000B\023\n\013budget_spec\022\004\300\3011\001" +
"\"\327\002\n\016CostBudgetSpec\022\024\n\006amount\030\001 \001(\tB\004\350\3071" +
"\001\022.\n\035notification_user_account_ids\030\002 \003(\t" +
"B\007\202\3101\003>=1\022?\n\017threshold_rules\030\003 \003(\0132&.yan" +
"dex.cloud.billing.v1.ThresholdRule\022:\n\006fi" +
"lter\030\004 \001(\0132*.yandex.cloud.billing.v1.Con" +
"sumptionFilter\022@\n\014reset_period\030\005 \001(\0162(.y" +
"andex.cloud.billing.v1.ResetPeriodTypeH\000" +
"\022\024\n\nstart_date\030\006 \001(\tH\000\022\026\n\010end_date\030\007 \001(\t" +
"B\004\350\3071\001B\022\n\nstart_type\022\004\300\3011\001\"\332\002\n\021ExpenseBu" +
"dgetSpec\022\024\n\006amount\030\001 \001(\tB\004\350\3071\001\022.\n\035notifi" +
"cation_user_account_ids\030\002 \003(\tB\007\202\3101\003>=1\022?" +
"\n\017threshold_rules\030\003 \003(\0132&.yandex.cloud.b" +
"illing.v1.ThresholdRule\022:\n\006filter\030\004 \001(\0132" +
"*.yandex.cloud.billing.v1.ConsumptionFil" +
"ter\022@\n\014reset_period\030\005 \001(\0162(.yandex.cloud" +
".billing.v1.ResetPeriodTypeH\000\022\024\n\nstart_d" +
"ate\030\006 \001(\tH\000\022\026\n\010end_date\030\007 \001(\tB\004\350\3071\001B\022\n\ns" +
"tart_type\022\004\300\3011\001\"\306\001\n\021BalanceBudgetSpec\022\024\n" +
"\006amount\030\001 \001(\tB\004\350\3071\001\022.\n\035notification_user" +
"_account_ids\030\002 \003(\tB\007\202\3101\003>=1\022?\n\017threshold" +
"_rules\030\003 \003(\0132&.yandex.cloud.billing.v1.T" +
"hresholdRule\022\022\n\nstart_date\030\004 \001(\t\022\026\n\010end_" +
"date\030\005 \001(\tB\004\350\3071\001\"\177\n\021ConsumptionFilter\022\023\n" +
"\013service_ids\030\001 \003(\t\022U\n\025cloud_folders_filt" +
"ers\030\002 \003(\01326.yandex.cloud.billing.v1.Clou" +
"dFoldersConsumptionFilter\"E\n\035CloudFolder" +
"sConsumptionFilter\022\020\n\010cloud_id\030\001 \001(\t\022\022\n\n" +
"folder_ids\030\002 \003(\t\"\210\001\n\rThresholdRule\022:\n\004ty" +
"pe\030\001 \001(\0162&.yandex.cloud.billing.v1.Thres" +
"holdTypeB\004\350\3071\001\022\024\n\006amount\030\002 \001(\tB\004\350\3071\001\022%\n\035" +
"notification_user_account_ids\030\003 \003(\t*U\n\014B" +
"udgetStatus\022\035\n\031BUDGET_STATUS_UNSPECIFIED" +
"\020\000\022\014\n\010CREATING\020\001\022\n\n\006ACTIVE\020\002\022\014\n\010FINISHED" +
"\020\003*\\\n\017ResetPeriodType\022!\n\035RESET_PERIOD_TY" +
"PE_UNSPECIFIED\020\000\022\013\n\007MONTHLY\020\001\022\013\n\007QUARTER" +
"\020\002\022\014\n\010ANNUALLY\020\003*H\n\rThresholdType\022\036\n\032THR" +
"ESHOLD_TYPE_UNSPECIFIED\020\000\022\013\n\007PERCENT\020\001\022\n" +
"\n\006AMOUNT\020\002Bb\n\033yandex.cloud.api.billing.v" +
"1ZCgithub.com/yandex-cloud/go-genproto/y" +
"andex/cloud/billing/v1;billingb\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
com.google.protobuf.TimestampProto.getDescriptor(),
yandex.cloud.api.Validation.getDescriptor(),
});
internal_static_yandex_cloud_billing_v1_Budget_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_yandex_cloud_billing_v1_Budget_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_billing_v1_Budget_descriptor,
new java.lang.String[] { "Id", "Name", "CreatedAt", "BillingAccountId", "Status", "CostBudget", "ExpenseBudget", "BalanceBudget", "BudgetSpec", });
internal_static_yandex_cloud_billing_v1_CostBudgetSpec_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_yandex_cloud_billing_v1_CostBudgetSpec_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_billing_v1_CostBudgetSpec_descriptor,
new java.lang.String[] { "Amount", "NotificationUserAccountIds", "ThresholdRules", "Filter", "ResetPeriod", "StartDate", "EndDate", "StartType", });
internal_static_yandex_cloud_billing_v1_ExpenseBudgetSpec_descriptor =
getDescriptor().getMessageTypes().get(2);
internal_static_yandex_cloud_billing_v1_ExpenseBudgetSpec_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_billing_v1_ExpenseBudgetSpec_descriptor,
new java.lang.String[] { "Amount", "NotificationUserAccountIds", "ThresholdRules", "Filter", "ResetPeriod", "StartDate", "EndDate", "StartType", });
internal_static_yandex_cloud_billing_v1_BalanceBudgetSpec_descriptor =
getDescriptor().getMessageTypes().get(3);
internal_static_yandex_cloud_billing_v1_BalanceBudgetSpec_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_billing_v1_BalanceBudgetSpec_descriptor,
new java.lang.String[] { "Amount", "NotificationUserAccountIds", "ThresholdRules", "StartDate", "EndDate", });
internal_static_yandex_cloud_billing_v1_ConsumptionFilter_descriptor =
getDescriptor().getMessageTypes().get(4);
internal_static_yandex_cloud_billing_v1_ConsumptionFilter_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_billing_v1_ConsumptionFilter_descriptor,
new java.lang.String[] { "ServiceIds", "CloudFoldersFilters", });
internal_static_yandex_cloud_billing_v1_CloudFoldersConsumptionFilter_descriptor =
getDescriptor().getMessageTypes().get(5);
internal_static_yandex_cloud_billing_v1_CloudFoldersConsumptionFilter_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_billing_v1_CloudFoldersConsumptionFilter_descriptor,
new java.lang.String[] { "CloudId", "FolderIds", });
internal_static_yandex_cloud_billing_v1_ThresholdRule_descriptor =
getDescriptor().getMessageTypes().get(6);
internal_static_yandex_cloud_billing_v1_ThresholdRule_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_billing_v1_ThresholdRule_descriptor,
new java.lang.String[] { "Type", "Amount", "NotificationUserAccountIds", });
com.google.protobuf.ExtensionRegistry registry =
com.google.protobuf.ExtensionRegistry.newInstance();
registry.add(yandex.cloud.api.Validation.exactlyOne);
registry.add(yandex.cloud.api.Validation.required);
registry.add(yandex.cloud.api.Validation.size);
com.google.protobuf.Descriptors.FileDescriptor
.internalUpdateFileDescriptor(descriptor, registry);
com.google.protobuf.TimestampProto.getDescriptor();
yandex.cloud.api.Validation.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy