Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/assuredworkloads/v1/assuredworkloads.proto
// Protobuf Java Version: 3.25.4
package com.google.cloud.assuredworkloads.v1;
/**
*
*
*
* A Workload object for managing highly regulated workloads of cloud
* customers.
*
*
* Protobuf type {@code google.cloud.assuredworkloads.v1.Workload}
*/
public final class Workload extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.assuredworkloads.v1.Workload)
WorkloadOrBuilder {
private static final long serialVersionUID = 0L;
// Use Workload.newBuilder() to construct.
private Workload(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Workload() {
name_ = "";
displayName_ = "";
resources_ = java.util.Collections.emptyList();
complianceRegime_ = 0;
billingAccount_ = "";
etag_ = "";
provisionedResourcesParent_ = "";
resourceSettings_ = java.util.Collections.emptyList();
kajEnrollmentState_ = 0;
compliantButDisallowedServices_ = com.google.protobuf.LazyStringArrayList.emptyList();
partner_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Workload();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Workload_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 10:
return internalGetLabels();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Workload_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.assuredworkloads.v1.Workload.class,
com.google.cloud.assuredworkloads.v1.Workload.Builder.class);
}
/**
*
*
*
*
* COMPLIANCE_REGIME_UNSPECIFIED = 0;
*/
public static final int COMPLIANCE_REGIME_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* Information protection as per DoD IL4 requirements.
*
*
* IL4 = 1;
*/
public static final int IL4_VALUE = 1;
/**
*
*
*
* Criminal Justice Information Services (CJIS) Security policies.
*
*
* CJIS = 2;
*/
public static final int CJIS_VALUE = 2;
/**
*
*
*
* FedRAMP High data protection controls
*
*
* FEDRAMP_HIGH = 3;
*/
public static final int FEDRAMP_HIGH_VALUE = 3;
/**
*
*
*
* FedRAMP Moderate data protection controls
*
*
* FEDRAMP_MODERATE = 4;
*/
public static final int FEDRAMP_MODERATE_VALUE = 4;
/**
*
*
*
* Assured Workloads For US Regions data protection controls
*
*
* US_REGIONAL_ACCESS = 5;
*/
public static final int US_REGIONAL_ACCESS_VALUE = 5;
/**
*
*
*
* Health Insurance Portability and Accountability Act controls
*
*
* HIPAA = 6;
*/
public static final int HIPAA_VALUE = 6;
/**
*
*
*
* Health Information Trust Alliance controls
*
*
* HITRUST = 7;
*/
public static final int HITRUST_VALUE = 7;
/**
*
*
*
* Assured Workloads For EU Regions and Support controls
*
*
* EU_REGIONS_AND_SUPPORT = 8;
*/
public static final int EU_REGIONS_AND_SUPPORT_VALUE = 8;
/**
*
*
*
* Assured Workloads For Canada Regions and Support controls
*
*
* CA_REGIONS_AND_SUPPORT = 9;
*/
public static final int CA_REGIONS_AND_SUPPORT_VALUE = 9;
/**
*
*
*
* International Traffic in Arms Regulations
*
*
* ITAR = 10;
*/
public static final int ITAR_VALUE = 10;
/**
*
*
*
* Assured Workloads for Australia Regions and Support controls
* Available for public preview consumption.
* Don't create production workloads.
*
*
* AU_REGIONS_AND_US_SUPPORT = 11;
*/
public static final int AU_REGIONS_AND_US_SUPPORT_VALUE = 11;
/**
*
*
*
* Assured Workloads for Partners
*
*
* ASSURED_WORKLOADS_FOR_PARTNERS = 12;
*/
public static final int ASSURED_WORKLOADS_FOR_PARTNERS_VALUE = 12;
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 ComplianceRegime 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 ComplianceRegime forNumber(int value) {
switch (value) {
case 0:
return COMPLIANCE_REGIME_UNSPECIFIED;
case 1:
return IL4;
case 2:
return CJIS;
case 3:
return FEDRAMP_HIGH;
case 4:
return FEDRAMP_MODERATE;
case 5:
return US_REGIONAL_ACCESS;
case 6:
return HIPAA;
case 7:
return HITRUST;
case 8:
return EU_REGIONS_AND_SUPPORT;
case 9:
return CA_REGIONS_AND_SUPPORT;
case 10:
return ITAR;
case 11:
return AU_REGIONS_AND_US_SUPPORT;
case 12:
return ASSURED_WORKLOADS_FOR_PARTNERS;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public ComplianceRegime findValueByNumber(int number) {
return ComplianceRegime.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 com.google.cloud.assuredworkloads.v1.Workload.getDescriptor().getEnumTypes().get(0);
}
private static final ComplianceRegime[] VALUES = values();
public static ComplianceRegime 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 ComplianceRegime(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.assuredworkloads.v1.Workload.ComplianceRegime)
}
/**
*
*
*
*
* KAJ_ENROLLMENT_STATE_UNSPECIFIED = 0;
*/
public static final int KAJ_ENROLLMENT_STATE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* Pending State for KAJ Enrollment.
*
*
* KAJ_ENROLLMENT_STATE_PENDING = 1;
*/
public static final int KAJ_ENROLLMENT_STATE_PENDING_VALUE = 1;
/**
*
*
*
* Complete State for KAJ Enrollment.
*
*
* KAJ_ENROLLMENT_STATE_COMPLETE = 2;
*/
public static final int KAJ_ENROLLMENT_STATE_COMPLETE_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 KajEnrollmentState 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 KajEnrollmentState forNumber(int value) {
switch (value) {
case 0:
return KAJ_ENROLLMENT_STATE_UNSPECIFIED;
case 1:
return KAJ_ENROLLMENT_STATE_PENDING;
case 2:
return KAJ_ENROLLMENT_STATE_COMPLETE;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public KajEnrollmentState findValueByNumber(int number) {
return KajEnrollmentState.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 com.google.cloud.assuredworkloads.v1.Workload.getDescriptor().getEnumTypes().get(1);
}
private static final KajEnrollmentState[] VALUES = values();
public static KajEnrollmentState 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 KajEnrollmentState(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.assuredworkloads.v1.Workload.KajEnrollmentState)
}
/**
*
*
*
*
* PARTNER_UNSPECIFIED = 0;
*/
public static final int PARTNER_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* S3NS regime/controls.
*
*
* LOCAL_CONTROLS_BY_S3NS = 1;
*/
public static final int LOCAL_CONTROLS_BY_S3NS_VALUE = 1;
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 Partner 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 Partner forNumber(int value) {
switch (value) {
case 0:
return PARTNER_UNSPECIFIED;
case 1:
return LOCAL_CONTROLS_BY_S3NS;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Partner findValueByNumber(int number) {
return Partner.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 com.google.cloud.assuredworkloads.v1.Workload.getDescriptor().getEnumTypes().get(2);
}
private static final Partner[] VALUES = values();
public static Partner 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 Partner(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.assuredworkloads.v1.Workload.Partner)
}
public interface ResourceInfoOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.assuredworkloads.v1.Workload.ResourceInfo)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Resource identifier.
* For a project this represents project_number.
*
*
* int64 resource_id = 1;
*
* @return The resourceId.
*/
long getResourceId();
/**
*
*
*
* Indicates the type of resource.
*
*
* .google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType resource_type = 2;
*
*
* @return The enum numeric value on the wire for resourceType.
*/
int getResourceTypeValue();
/**
*
*
*
* Consumer project.
* AssuredWorkloads Projects are no longer supported. This field will be
* ignored only in CreateWorkload requests. ListWorkloads and GetWorkload
* will continue to provide projects information.
* Use CONSUMER_FOLDER instead.
*
*
* RESOURCE_TYPE_UNSPECIFIED = 0;
*/
public static final int RESOURCE_TYPE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* Consumer project.
* AssuredWorkloads Projects are no longer supported. This field will be
* ignored only in CreateWorkload requests. ListWorkloads and GetWorkload
* will continue to provide projects information.
* Use CONSUMER_FOLDER instead.
*
*
* CONSUMER_PROJECT = 1 [deprecated = true];
*/
@java.lang.Deprecated public static final int CONSUMER_PROJECT_VALUE = 1;
/**
*
*
*
* Consumer Folder.
*
*
* CONSUMER_FOLDER = 4;
*/
public static final int CONSUMER_FOLDER_VALUE = 4;
/**
*
*
*
* Consumer project containing encryption keys.
*
*
* ENCRYPTION_KEYS_PROJECT = 2;
*/
public static final int ENCRYPTION_KEYS_PROJECT_VALUE = 2;
/**
*
*
*
* Keyring resource that hosts encryption keys.
*
*
* KEYRING = 3;
*/
public static final int KEYRING_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 ResourceType 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 ResourceType forNumber(int value) {
switch (value) {
case 0:
return RESOURCE_TYPE_UNSPECIFIED;
case 1:
return CONSUMER_PROJECT;
case 4:
return CONSUMER_FOLDER;
case 2:
return ENCRYPTION_KEYS_PROJECT;
case 3:
return KEYRING;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public ResourceType findValueByNumber(int number) {
return ResourceType.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 com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo.getDescriptor()
.getEnumTypes()
.get(0);
}
private static final ResourceType[] VALUES = values();
public static ResourceType 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 ResourceType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType)
}
public static final int RESOURCE_ID_FIELD_NUMBER = 1;
private long resourceId_ = 0L;
/**
*
*
*
* Resource identifier.
* For a project this represents project_number.
*
*
* int64 resource_id = 1;
*
* @return The resourceId.
*/
@java.lang.Override
public long getResourceId() {
return resourceId_;
}
public static final int RESOURCE_TYPE_FIELD_NUMBER = 2;
private int resourceType_ = 0;
/**
*
*
*
* Indicates the type of resource.
*
*
* .google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType resource_type = 2;
*
*
* @return The enum numeric value on the wire for resourceType.
*/
@java.lang.Override
public int getResourceTypeValue() {
return resourceType_;
}
/**
*
*
*
* Represent the resources that are children of this Workload.
*
*
* Protobuf type {@code google.cloud.assuredworkloads.v1.Workload.ResourceInfo}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.assuredworkloads.v1.Workload.ResourceInfo)
com.google.cloud.assuredworkloads.v1.Workload.ResourceInfoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Workload_ResourceInfo_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Workload_ResourceInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo.class,
com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo.Builder.class);
}
// Construct using com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
resourceId_ = 0L;
resourceType_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Workload_ResourceInfo_descriptor;
}
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo
getDefaultInstanceForType() {
return com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo build() {
com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo buildPartial() {
com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo result =
new com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.resourceId_ = resourceId_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.resourceType_ = resourceType_;
}
}
@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 com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo) {
return mergeFrom((com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo other) {
if (other
== com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo.getDefaultInstance())
return this;
if (other.getResourceId() != 0L) {
setResourceId(other.getResourceId());
}
if (other.resourceType_ != 0) {
setResourceTypeValue(other.getResourceTypeValue());
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8:
{
resourceId_ = input.readInt64();
bitField0_ |= 0x00000001;
break;
} // case 8
case 16:
{
resourceType_ = input.readEnum();
bitField0_ |= 0x00000002;
break;
} // case 16
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private long resourceId_;
/**
*
*
*
* Resource identifier.
* For a project this represents project_number.
*
*
* int64 resource_id = 1;
*
* @return The resourceId.
*/
@java.lang.Override
public long getResourceId() {
return resourceId_;
}
/**
*
*
*
* Resource identifier.
* For a project this represents project_number.
*
*
* int64 resource_id = 1;
*
* @param value The resourceId to set.
* @return This builder for chaining.
*/
public Builder setResourceId(long value) {
resourceId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Resource identifier.
* For a project this represents project_number.
*
*
* int64 resource_id = 1;
*
* @return This builder for chaining.
*/
public Builder clearResourceId() {
bitField0_ = (bitField0_ & ~0x00000001);
resourceId_ = 0L;
onChanged();
return this;
}
private int resourceType_ = 0;
/**
*
*
*
* Indicates the type of resource.
*
*
*
* .google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType resource_type = 2;
*
*
* @return The enum numeric value on the wire for resourceType.
*/
@java.lang.Override
public int getResourceTypeValue() {
return resourceType_;
}
/**
*
*
*
* Indicates the type of resource.
*
*
*
* .google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType resource_type = 2;
*
*
* @param value The enum numeric value on the wire for resourceType to set.
* @return This builder for chaining.
*/
public Builder setResourceTypeValue(int value) {
resourceType_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Indicates the type of resource.
*
*
*
* .google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType resource_type = 2;
*
*
* @return The resourceType.
*/
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType
getResourceType() {
com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType result =
com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType.forNumber(
resourceType_);
return result == null
? com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType.UNRECOGNIZED
: result;
}
/**
*
*
*
* Indicates the type of resource.
*
*
*
* .google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType resource_type = 2;
*
*
* @param value The resourceType to set.
* @return This builder for chaining.
*/
public Builder setResourceType(
com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
resourceType_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Indicates the type of resource.
*
*
*
* .google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType resource_type = 2;
*
*
* @return This builder for chaining.
*/
public Builder clearResourceType() {
bitField0_ = (bitField0_ & ~0x00000002);
resourceType_ = 0;
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:google.cloud.assuredworkloads.v1.Workload.ResourceInfo)
}
// @@protoc_insertion_point(class_scope:google.cloud.assuredworkloads.v1.Workload.ResourceInfo)
private static final com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo();
}
public static com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ResourceInfo parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
@java.lang.Deprecated
public interface KMSSettingsOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.assuredworkloads.v1.Workload.KMSSettings)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Required. Input only. Immutable. The time at which the Key Management Service will automatically create a
* new version of the crypto key and mark it as the primary.
*
* Required. Input only. Immutable. The time at which the Key Management Service will automatically create a
* new version of the crypto key and mark it as the primary.
*
* Required. Input only. Immutable. The time at which the Key Management Service will automatically create a
* new version of the crypto key and mark it as the primary.
*
* Required. Input only. Immutable. [next_rotation_time] will be advanced by this period when the Key
* Management Service automatically rotates a key. Must be at least 24 hours
* and at most 876,000 hours.
*
* Required. Input only. Immutable. [next_rotation_time] will be advanced by this period when the Key
* Management Service automatically rotates a key. Must be at least 24 hours
* and at most 876,000 hours.
*
* Required. Input only. Immutable. [next_rotation_time] will be advanced by this period when the Key
* Management Service automatically rotates a key. Must be at least 24 hours
* and at most 876,000 hours.
*
* Settings specific to the Key Management Service.
* This message is deprecated.
* In order to create a Keyring, callers should specify,
* ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field.
*
*
* Protobuf type {@code google.cloud.assuredworkloads.v1.Workload.KMSSettings}
*/
@java.lang.Deprecated
public static final class KMSSettings extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.assuredworkloads.v1.Workload.KMSSettings)
KMSSettingsOrBuilder {
private static final long serialVersionUID = 0L;
// Use KMSSettings.newBuilder() to construct.
private KMSSettings(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private KMSSettings() {}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new KMSSettings();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Workload_KMSSettings_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Workload_KMSSettings_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.assuredworkloads.v1.Workload.KMSSettings.class,
com.google.cloud.assuredworkloads.v1.Workload.KMSSettings.Builder.class);
}
private int bitField0_;
public static final int NEXT_ROTATION_TIME_FIELD_NUMBER = 1;
private com.google.protobuf.Timestamp nextRotationTime_;
/**
*
*
*
* Required. Input only. Immutable. The time at which the Key Management Service will automatically create a
* new version of the crypto key and mark it as the primary.
*
* Required. Input only. Immutable. The time at which the Key Management Service will automatically create a
* new version of the crypto key and mark it as the primary.
*
* Required. Input only. Immutable. The time at which the Key Management Service will automatically create a
* new version of the crypto key and mark it as the primary.
*
* Required. Input only. Immutable. [next_rotation_time] will be advanced by this period when the Key
* Management Service automatically rotates a key. Must be at least 24 hours
* and at most 876,000 hours.
*
* Required. Input only. Immutable. [next_rotation_time] will be advanced by this period when the Key
* Management Service automatically rotates a key. Must be at least 24 hours
* and at most 876,000 hours.
*
* Required. Input only. Immutable. [next_rotation_time] will be advanced by this period when the Key
* Management Service automatically rotates a key. Must be at least 24 hours
* and at most 876,000 hours.
*
* Settings specific to the Key Management Service.
* This message is deprecated.
* In order to create a Keyring, callers should specify,
* ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field.
*
*
* Protobuf type {@code google.cloud.assuredworkloads.v1.Workload.KMSSettings}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.assuredworkloads.v1.Workload.KMSSettings)
com.google.cloud.assuredworkloads.v1.Workload.KMSSettingsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Workload_KMSSettings_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Workload_KMSSettings_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.assuredworkloads.v1.Workload.KMSSettings.class,
com.google.cloud.assuredworkloads.v1.Workload.KMSSettings.Builder.class);
}
// Construct using com.google.cloud.assuredworkloads.v1.Workload.KMSSettings.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getNextRotationTimeFieldBuilder();
getRotationPeriodFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
nextRotationTime_ = null;
if (nextRotationTimeBuilder_ != null) {
nextRotationTimeBuilder_.dispose();
nextRotationTimeBuilder_ = null;
}
rotationPeriod_ = null;
if (rotationPeriodBuilder_ != null) {
rotationPeriodBuilder_.dispose();
rotationPeriodBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Workload_KMSSettings_descriptor;
}
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Workload.KMSSettings getDefaultInstanceForType() {
return com.google.cloud.assuredworkloads.v1.Workload.KMSSettings.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Workload.KMSSettings build() {
com.google.cloud.assuredworkloads.v1.Workload.KMSSettings result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Workload.KMSSettings buildPartial() {
com.google.cloud.assuredworkloads.v1.Workload.KMSSettings result =
new com.google.cloud.assuredworkloads.v1.Workload.KMSSettings(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.assuredworkloads.v1.Workload.KMSSettings result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.nextRotationTime_ =
nextRotationTimeBuilder_ == null
? nextRotationTime_
: nextRotationTimeBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.rotationPeriod_ =
rotationPeriodBuilder_ == null ? rotationPeriod_ : rotationPeriodBuilder_.build();
to_bitField0_ |= 0x00000002;
}
result.bitField0_ |= to_bitField0_;
}
@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 com.google.cloud.assuredworkloads.v1.Workload.KMSSettings) {
return mergeFrom((com.google.cloud.assuredworkloads.v1.Workload.KMSSettings) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.assuredworkloads.v1.Workload.KMSSettings other) {
if (other == com.google.cloud.assuredworkloads.v1.Workload.KMSSettings.getDefaultInstance())
return this;
if (other.hasNextRotationTime()) {
mergeNextRotationTime(other.getNextRotationTime());
}
if (other.hasRotationPeriod()) {
mergeRotationPeriod(other.getRotationPeriod());
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
input.readMessage(
getNextRotationTimeFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
input.readMessage(
getRotationPeriodFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 18
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private com.google.protobuf.Timestamp nextRotationTime_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
nextRotationTimeBuilder_;
/**
*
*
*
* Required. Input only. Immutable. The time at which the Key Management Service will automatically create a
* new version of the crypto key and mark it as the primary.
*
* Required. Input only. Immutable. The time at which the Key Management Service will automatically create a
* new version of the crypto key and mark it as the primary.
*
* Required. Input only. Immutable. The time at which the Key Management Service will automatically create a
* new version of the crypto key and mark it as the primary.
*
* Required. Input only. Immutable. The time at which the Key Management Service will automatically create a
* new version of the crypto key and mark it as the primary.
*
* Required. Input only. Immutable. The time at which the Key Management Service will automatically create a
* new version of the crypto key and mark it as the primary.
*
* Required. Input only. Immutable. The time at which the Key Management Service will automatically create a
* new version of the crypto key and mark it as the primary.
*
* Required. Input only. Immutable. The time at which the Key Management Service will automatically create a
* new version of the crypto key and mark it as the primary.
*
* Required. Input only. Immutable. The time at which the Key Management Service will automatically create a
* new version of the crypto key and mark it as the primary.
*
* Required. Input only. Immutable. The time at which the Key Management Service will automatically create a
* new version of the crypto key and mark it as the primary.
*
* Required. Input only. Immutable. [next_rotation_time] will be advanced by this period when the Key
* Management Service automatically rotates a key. Must be at least 24 hours
* and at most 876,000 hours.
*
* Required. Input only. Immutable. [next_rotation_time] will be advanced by this period when the Key
* Management Service automatically rotates a key. Must be at least 24 hours
* and at most 876,000 hours.
*
* Required. Input only. Immutable. [next_rotation_time] will be advanced by this period when the Key
* Management Service automatically rotates a key. Must be at least 24 hours
* and at most 876,000 hours.
*
* Required. Input only. Immutable. [next_rotation_time] will be advanced by this period when the Key
* Management Service automatically rotates a key. Must be at least 24 hours
* and at most 876,000 hours.
*
* Required. Input only. Immutable. [next_rotation_time] will be advanced by this period when the Key
* Management Service automatically rotates a key. Must be at least 24 hours
* and at most 876,000 hours.
*
* Required. Input only. Immutable. [next_rotation_time] will be advanced by this period when the Key
* Management Service automatically rotates a key. Must be at least 24 hours
* and at most 876,000 hours.
*
* Required. Input only. Immutable. [next_rotation_time] will be advanced by this period when the Key
* Management Service automatically rotates a key. Must be at least 24 hours
* and at most 876,000 hours.
*
* Required. Input only. Immutable. [next_rotation_time] will be advanced by this period when the Key
* Management Service automatically rotates a key. Must be at least 24 hours
* and at most 876,000 hours.
*
* Required. Input only. Immutable. [next_rotation_time] will be advanced by this period when the Key
* Management Service automatically rotates a key. Must be at least 24 hours
* and at most 876,000 hours.
*
*
*
* .google.protobuf.Duration rotation_period = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration,
com.google.protobuf.Duration.Builder,
com.google.protobuf.DurationOrBuilder>
getRotationPeriodFieldBuilder() {
if (rotationPeriodBuilder_ == null) {
rotationPeriodBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration,
com.google.protobuf.Duration.Builder,
com.google.protobuf.DurationOrBuilder>(
getRotationPeriod(), getParentForChildren(), isClean());
rotationPeriod_ = null;
}
return rotationPeriodBuilder_;
}
@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:google.cloud.assuredworkloads.v1.Workload.KMSSettings)
}
// @@protoc_insertion_point(class_scope:google.cloud.assuredworkloads.v1.Workload.KMSSettings)
private static final com.google.cloud.assuredworkloads.v1.Workload.KMSSettings DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.assuredworkloads.v1.Workload.KMSSettings();
}
public static com.google.cloud.assuredworkloads.v1.Workload.KMSSettings getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public KMSSettings parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Workload.KMSSettings getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ResourceSettingsOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.assuredworkloads.v1.Workload.ResourceSettings)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Resource identifier.
* For a project this represents project_id. If the project is already
* taken, the workload creation will fail.
* For KeyRing, this represents the keyring_id.
* For a folder, don't set this value as folder_id is assigned by Google.
*
* Resource identifier.
* For a project this represents project_id. If the project is already
* taken, the workload creation will fail.
* For KeyRing, this represents the keyring_id.
* For a folder, don't set this value as folder_id is assigned by Google.
*
*
* string resource_id = 1;
*
* @return The bytes for resourceId.
*/
com.google.protobuf.ByteString getResourceIdBytes();
/**
*
*
*
* Indicates the type of resource. This field should be specified to
* correspond the id to the right resource type (CONSUMER_FOLDER or
* ENCRYPTION_KEYS_PROJECT)
*
*
* .google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType resource_type = 2;
*
*
* @return The enum numeric value on the wire for resourceType.
*/
int getResourceTypeValue();
/**
*
*
*
* Indicates the type of resource. This field should be specified to
* correspond the id to the right resource type (CONSUMER_FOLDER or
* ENCRYPTION_KEYS_PROJECT)
*
* Represent the custom settings for the resources to be created.
*
*
* Protobuf type {@code google.cloud.assuredworkloads.v1.Workload.ResourceSettings}
*/
public static final class ResourceSettings extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.assuredworkloads.v1.Workload.ResourceSettings)
ResourceSettingsOrBuilder {
private static final long serialVersionUID = 0L;
// Use ResourceSettings.newBuilder() to construct.
private ResourceSettings(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ResourceSettings() {
resourceId_ = "";
resourceType_ = 0;
displayName_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new ResourceSettings();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Workload_ResourceSettings_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Workload_ResourceSettings_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.assuredworkloads.v1.Workload.ResourceSettings.class,
com.google.cloud.assuredworkloads.v1.Workload.ResourceSettings.Builder.class);
}
public static final int RESOURCE_ID_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object resourceId_ = "";
/**
*
*
*
* Resource identifier.
* For a project this represents project_id. If the project is already
* taken, the workload creation will fail.
* For KeyRing, this represents the keyring_id.
* For a folder, don't set this value as folder_id is assigned by Google.
*
* Resource identifier.
* For a project this represents project_id. If the project is already
* taken, the workload creation will fail.
* For KeyRing, this represents the keyring_id.
* For a folder, don't set this value as folder_id is assigned by Google.
*
*
* string resource_id = 1;
*
* @return The bytes for resourceId.
*/
@java.lang.Override
public com.google.protobuf.ByteString getResourceIdBytes() {
java.lang.Object ref = resourceId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
resourceId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int RESOURCE_TYPE_FIELD_NUMBER = 2;
private int resourceType_ = 0;
/**
*
*
*
* Indicates the type of resource. This field should be specified to
* correspond the id to the right resource type (CONSUMER_FOLDER or
* ENCRYPTION_KEYS_PROJECT)
*
*
* .google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType resource_type = 2;
*
*
* @return The enum numeric value on the wire for resourceType.
*/
@java.lang.Override
public int getResourceTypeValue() {
return resourceType_;
}
/**
*
*
*
* Indicates the type of resource. This field should be specified to
* correspond the id to the right resource type (CONSUMER_FOLDER or
* ENCRYPTION_KEYS_PROJECT)
*
*
* .google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType resource_type = 2;
*
*
* @return The resourceType.
*/
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType
getResourceType() {
com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType result =
com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType.forNumber(
resourceType_);
return result == null
? com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType.UNRECOGNIZED
: result;
}
public static final int DISPLAY_NAME_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object displayName_ = "";
/**
*
*
*
* User-assigned resource display name.
* If not empty it will be used to create a resource with the specified
* name.
*
* Represent the custom settings for the resources to be created.
*
*
* Protobuf type {@code google.cloud.assuredworkloads.v1.Workload.ResourceSettings}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.assuredworkloads.v1.Workload.ResourceSettings)
com.google.cloud.assuredworkloads.v1.Workload.ResourceSettingsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Workload_ResourceSettings_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Workload_ResourceSettings_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.assuredworkloads.v1.Workload.ResourceSettings.class,
com.google.cloud.assuredworkloads.v1.Workload.ResourceSettings.Builder.class);
}
// Construct using com.google.cloud.assuredworkloads.v1.Workload.ResourceSettings.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
resourceId_ = "";
resourceType_ = 0;
displayName_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Workload_ResourceSettings_descriptor;
}
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Workload.ResourceSettings
getDefaultInstanceForType() {
return com.google.cloud.assuredworkloads.v1.Workload.ResourceSettings.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Workload.ResourceSettings build() {
com.google.cloud.assuredworkloads.v1.Workload.ResourceSettings result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Workload.ResourceSettings buildPartial() {
com.google.cloud.assuredworkloads.v1.Workload.ResourceSettings result =
new com.google.cloud.assuredworkloads.v1.Workload.ResourceSettings(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.assuredworkloads.v1.Workload.ResourceSettings result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.resourceId_ = resourceId_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.resourceType_ = resourceType_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.displayName_ = displayName_;
}
}
@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 com.google.cloud.assuredworkloads.v1.Workload.ResourceSettings) {
return mergeFrom((com.google.cloud.assuredworkloads.v1.Workload.ResourceSettings) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.assuredworkloads.v1.Workload.ResourceSettings other) {
if (other
== com.google.cloud.assuredworkloads.v1.Workload.ResourceSettings.getDefaultInstance())
return this;
if (!other.getResourceId().isEmpty()) {
resourceId_ = other.resourceId_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.resourceType_ != 0) {
setResourceTypeValue(other.getResourceTypeValue());
}
if (!other.getDisplayName().isEmpty()) {
displayName_ = other.displayName_;
bitField0_ |= 0x00000004;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
resourceId_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 16:
{
resourceType_ = input.readEnum();
bitField0_ |= 0x00000002;
break;
} // case 16
case 26:
{
displayName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object resourceId_ = "";
/**
*
*
*
* Resource identifier.
* For a project this represents project_id. If the project is already
* taken, the workload creation will fail.
* For KeyRing, this represents the keyring_id.
* For a folder, don't set this value as folder_id is assigned by Google.
*
* Resource identifier.
* For a project this represents project_id. If the project is already
* taken, the workload creation will fail.
* For KeyRing, this represents the keyring_id.
* For a folder, don't set this value as folder_id is assigned by Google.
*
*
* string resource_id = 1;
*
* @return The bytes for resourceId.
*/
public com.google.protobuf.ByteString getResourceIdBytes() {
java.lang.Object ref = resourceId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
resourceId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Resource identifier.
* For a project this represents project_id. If the project is already
* taken, the workload creation will fail.
* For KeyRing, this represents the keyring_id.
* For a folder, don't set this value as folder_id is assigned by Google.
*
*
* string resource_id = 1;
*
* @param value The resourceId to set.
* @return This builder for chaining.
*/
public Builder setResourceId(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
resourceId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Resource identifier.
* For a project this represents project_id. If the project is already
* taken, the workload creation will fail.
* For KeyRing, this represents the keyring_id.
* For a folder, don't set this value as folder_id is assigned by Google.
*
* Resource identifier.
* For a project this represents project_id. If the project is already
* taken, the workload creation will fail.
* For KeyRing, this represents the keyring_id.
* For a folder, don't set this value as folder_id is assigned by Google.
*
*
* string resource_id = 1;
*
* @param value The bytes for resourceId to set.
* @return This builder for chaining.
*/
public Builder setResourceIdBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
resourceId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private int resourceType_ = 0;
/**
*
*
*
* Indicates the type of resource. This field should be specified to
* correspond the id to the right resource type (CONSUMER_FOLDER or
* ENCRYPTION_KEYS_PROJECT)
*
*
*
* .google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType resource_type = 2;
*
*
* @return The enum numeric value on the wire for resourceType.
*/
@java.lang.Override
public int getResourceTypeValue() {
return resourceType_;
}
/**
*
*
*
* Indicates the type of resource. This field should be specified to
* correspond the id to the right resource type (CONSUMER_FOLDER or
* ENCRYPTION_KEYS_PROJECT)
*
*
*
* .google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType resource_type = 2;
*
*
* @param value The enum numeric value on the wire for resourceType to set.
* @return This builder for chaining.
*/
public Builder setResourceTypeValue(int value) {
resourceType_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Indicates the type of resource. This field should be specified to
* correspond the id to the right resource type (CONSUMER_FOLDER or
* ENCRYPTION_KEYS_PROJECT)
*
*
*
* .google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType resource_type = 2;
*
*
* @return The resourceType.
*/
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType
getResourceType() {
com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType result =
com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType.forNumber(
resourceType_);
return result == null
? com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType.UNRECOGNIZED
: result;
}
/**
*
*
*
* Indicates the type of resource. This field should be specified to
* correspond the id to the right resource type (CONSUMER_FOLDER or
* ENCRYPTION_KEYS_PROJECT)
*
*
*
* .google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType resource_type = 2;
*
*
* @param value The resourceType to set.
* @return This builder for chaining.
*/
public Builder setResourceType(
com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
resourceType_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Indicates the type of resource. This field should be specified to
* correspond the id to the right resource type (CONSUMER_FOLDER or
* ENCRYPTION_KEYS_PROJECT)
*
* User-assigned resource display name.
* If not empty it will be used to create a resource with the specified
* name.
*
*
* string display_name = 3;
*
* @param value The bytes for displayName to set.
* @return This builder for chaining.
*/
public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
displayName_ = value;
bitField0_ |= 0x00000004;
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:google.cloud.assuredworkloads.v1.Workload.ResourceSettings)
}
// @@protoc_insertion_point(class_scope:google.cloud.assuredworkloads.v1.Workload.ResourceSettings)
private static final com.google.cloud.assuredworkloads.v1.Workload.ResourceSettings
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.assuredworkloads.v1.Workload.ResourceSettings();
}
public static com.google.cloud.assuredworkloads.v1.Workload.ResourceSettings
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ResourceSettings parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Workload.ResourceSettings
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface SaaEnrollmentResponseOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Indicates SAA enrollment status of a given workload.
*
*
*
* optional .google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupState setup_status = 1;
*
*
* @return Whether the setupStatus field is set.
*/
boolean hasSetupStatus();
/**
*
*
*
* Indicates SAA enrollment status of a given workload.
*
*
*
* optional .google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupState setup_status = 1;
*
*
* @return The enum numeric value on the wire for setupStatus.
*/
int getSetupStatusValue();
/**
*
*
*
* Indicates SAA enrollment status of a given workload.
*
*
*
* repeated .google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError setup_errors = 2;
*
*
* @return A list containing the setupErrors.
*/
java.util.List
getSetupErrorsList();
/**
*
*
*
* Indicates SAA enrollment setup error if any.
*
*
*
* repeated .google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError setup_errors = 2;
*
*
* @return The count of setupErrors.
*/
int getSetupErrorsCount();
/**
*
*
*
* Indicates SAA enrollment setup error if any.
*
*
*
* repeated .google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError setup_errors = 2;
*
*
* @param index The index of the element to return.
* @return The setupErrors at the given index.
*/
com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError getSetupErrors(
int index);
/**
*
*
*
* Indicates SAA enrollment setup error if any.
*
*
*
* repeated .google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError setup_errors = 2;
*
*
* @return A list containing the enum numeric values on the wire for setupErrors.
*/
java.util.List getSetupErrorsValueList();
/**
*
*
*
* Indicates SAA enrollment setup error if any.
*
*
*
* repeated .google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError setup_errors = 2;
*
*
* @param index The index of the value to return.
* @return The enum numeric value on the wire of setupErrors at the given index.
*/
int getSetupErrorsValue(int index);
}
/**
*
*
*
* Signed Access Approvals (SAA) enrollment response.
*
*
* Protobuf type {@code google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse}
*/
public static final class SaaEnrollmentResponse extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse)
SaaEnrollmentResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use SaaEnrollmentResponse.newBuilder() to construct.
private SaaEnrollmentResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SaaEnrollmentResponse() {
setupStatus_ = 0;
setupErrors_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new SaaEnrollmentResponse();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Workload_SaaEnrollmentResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Workload_SaaEnrollmentResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.class,
com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.Builder.class);
}
/**
*
*
*
*
* SETUP_STATE_UNSPECIFIED = 0;
*/
public static final int SETUP_STATE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* SAA enrollment pending.
*
*
* STATUS_PENDING = 1;
*/
public static final int STATUS_PENDING_VALUE = 1;
/**
*
*
*
* SAA enrollment comopleted.
*
*
* STATUS_COMPLETE = 2;
*/
public static final int STATUS_COMPLETE_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 SetupState 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 SetupState forNumber(int value) {
switch (value) {
case 0:
return SETUP_STATE_UNSPECIFIED;
case 1:
return STATUS_PENDING;
case 2:
return STATUS_COMPLETE;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public SetupState findValueByNumber(int number) {
return SetupState.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 com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.getDescriptor()
.getEnumTypes()
.get(0);
}
private static final SetupState[] VALUES = values();
public static SetupState 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 SetupState(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupState)
}
/**
*
*
*
*
* SETUP_ERROR_UNSPECIFIED = 0;
*/
public static final int SETUP_ERROR_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* Invalid states for all customers, to be redirected to AA UI for
* additional details.
*
*
* ERROR_INVALID_BASE_SETUP = 1;
*/
public static final int ERROR_INVALID_BASE_SETUP_VALUE = 1;
/**
*
*
*
* Returned when there is not an EKM key configured.
*
*
* ERROR_MISSING_EXTERNAL_SIGNING_KEY = 2;
*/
public static final int ERROR_MISSING_EXTERNAL_SIGNING_KEY_VALUE = 2;
/**
*
*
*
* Returned when there are no enrolled services or the customer is
* enrolled in CAA only for a subset of services.
*
*
* ERROR_NOT_ALL_SERVICES_ENROLLED = 3;
*/
public static final int ERROR_NOT_ALL_SERVICES_ENROLLED_VALUE = 3;
/**
*
*
*
* Returned when exception was encountered during evaluation of other
* criteria.
*
*
* ERROR_SETUP_CHECK_FAILED = 4;
*/
public static final int ERROR_SETUP_CHECK_FAILED_VALUE = 4;
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 SetupError 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 SetupError forNumber(int value) {
switch (value) {
case 0:
return SETUP_ERROR_UNSPECIFIED;
case 1:
return ERROR_INVALID_BASE_SETUP;
case 2:
return ERROR_MISSING_EXTERNAL_SIGNING_KEY;
case 3:
return ERROR_NOT_ALL_SERVICES_ENROLLED;
case 4:
return ERROR_SETUP_CHECK_FAILED;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public SetupError findValueByNumber(int number) {
return SetupError.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 com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.getDescriptor()
.getEnumTypes()
.get(1);
}
private static final SetupError[] VALUES = values();
public static SetupError 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 SetupError(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError)
}
private int bitField0_;
public static final int SETUP_STATUS_FIELD_NUMBER = 1;
private int setupStatus_ = 0;
/**
*
*
*
* Indicates SAA enrollment status of a given workload.
*
*
*
* optional .google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupState setup_status = 1;
*
*
* @return Whether the setupStatus field is set.
*/
@java.lang.Override
public boolean hasSetupStatus() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Indicates SAA enrollment status of a given workload.
*
*
*
* optional .google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupState setup_status = 1;
*
*
* @return The enum numeric value on the wire for setupStatus.
*/
@java.lang.Override
public int getSetupStatusValue() {
return setupStatus_;
}
/**
*
*
*
* Indicates SAA enrollment status of a given workload.
*
*
*
* optional .google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupState setup_status = 1;
*
*
* @return The setupStatus.
*/
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupState
getSetupStatus() {
com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupState result =
com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupState.forNumber(
setupStatus_);
return result == null
? com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupState
.UNRECOGNIZED
: result;
}
public static final int SETUP_ERRORS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List setupErrors_;
private static final com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer,
com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError>
setupErrors_converter_ =
new com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer,
com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError>() {
public com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError
convert(java.lang.Integer from) {
com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError
result =
com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse
.SetupError.forNumber(from);
return result == null
? com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError
.UNRECOGNIZED
: result;
}
};
/**
*
*
*
* Indicates SAA enrollment setup error if any.
*
*
*
* repeated .google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError setup_errors = 2;
*
*
* @return A list containing the setupErrors.
*/
@java.lang.Override
public java.util.List<
com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError>
getSetupErrorsList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer,
com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError>(
setupErrors_, setupErrors_converter_);
}
/**
*
*
*
* Indicates SAA enrollment setup error if any.
*
*
*
* repeated .google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError setup_errors = 2;
*
*
* @return The count of setupErrors.
*/
@java.lang.Override
public int getSetupErrorsCount() {
return setupErrors_.size();
}
/**
*
*
*
* Indicates SAA enrollment setup error if any.
*
*
*
* repeated .google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError setup_errors = 2;
*
*
* @param index The index of the element to return.
* @return The setupErrors at the given index.
*/
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError
getSetupErrors(int index) {
return setupErrors_converter_.convert(setupErrors_.get(index));
}
/**
*
*
*
* Indicates SAA enrollment setup error if any.
*
*
*
* repeated .google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError setup_errors = 2;
*
*
* @return A list containing the enum numeric values on the wire for setupErrors.
*/
@java.lang.Override
public java.util.List getSetupErrorsValueList() {
return setupErrors_;
}
/**
*
*
*
* Indicates SAA enrollment setup error if any.
*
*
*
* repeated .google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError setup_errors = 2;
*
*
* @param index The index of the value to return.
* @return The enum numeric value on the wire of setupErrors at the given index.
*/
@java.lang.Override
public int getSetupErrorsValue(int index) {
return setupErrors_.get(index);
}
private int setupErrorsMemoizedSerializedSize;
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 {
getSerializedSize();
if (((bitField0_ & 0x00000001) != 0)) {
output.writeEnum(1, setupStatus_);
}
if (getSetupErrorsList().size() > 0) {
output.writeUInt32NoTag(18);
output.writeUInt32NoTag(setupErrorsMemoizedSerializedSize);
}
for (int i = 0; i < setupErrors_.size(); i++) {
output.writeEnumNoTag(setupErrors_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, setupStatus_);
}
{
int dataSize = 0;
for (int i = 0; i < setupErrors_.size(); i++) {
dataSize +=
com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(setupErrors_.get(i));
}
size += dataSize;
if (!getSetupErrorsList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize);
}
setupErrorsMemoizedSerializedSize = dataSize;
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse)) {
return super.equals(obj);
}
com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse other =
(com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse) obj;
if (hasSetupStatus() != other.hasSetupStatus()) return false;
if (hasSetupStatus()) {
if (setupStatus_ != other.setupStatus_) return false;
}
if (!setupErrors_.equals(other.setupErrors_)) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasSetupStatus()) {
hash = (37 * hash) + SETUP_STATUS_FIELD_NUMBER;
hash = (53 * hash) + setupStatus_;
}
if (getSetupErrorsCount() > 0) {
hash = (37 * hash) + SETUP_ERRORS_FIELD_NUMBER;
hash = (53 * hash) + setupErrors_.hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse 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 com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse
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 com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse 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(
com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse 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;
}
/**
*
*
*
* Signed Access Approvals (SAA) enrollment response.
*
*
* Protobuf type {@code google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse)
com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Workload_SaaEnrollmentResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Workload_SaaEnrollmentResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.class,
com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.Builder.class);
}
// Construct using
// com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
setupStatus_ = 0;
setupErrors_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Workload_SaaEnrollmentResponse_descriptor;
}
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse
getDefaultInstanceForType() {
return com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse build() {
com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse buildPartial() {
com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse result =
new com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse result) {
if (((bitField0_ & 0x00000002) != 0)) {
setupErrors_ = java.util.Collections.unmodifiableList(setupErrors_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.setupErrors_ = setupErrors_;
}
private void buildPartial0(
com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.setupStatus_ = setupStatus_;
to_bitField0_ |= 0x00000001;
}
result.bitField0_ |= to_bitField0_;
}
@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 com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse) {
return mergeFrom(
(com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse other) {
if (other
== com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse
.getDefaultInstance()) return this;
if (other.hasSetupStatus()) {
setSetupStatus(other.getSetupStatus());
}
if (!other.setupErrors_.isEmpty()) {
if (setupErrors_.isEmpty()) {
setupErrors_ = other.setupErrors_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureSetupErrorsIsMutable();
setupErrors_.addAll(other.setupErrors_);
}
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8:
{
setupStatus_ = input.readEnum();
bitField0_ |= 0x00000001;
break;
} // case 8
case 16:
{
int tmpRaw = input.readEnum();
ensureSetupErrorsIsMutable();
setupErrors_.add(tmpRaw);
break;
} // case 16
case 18:
{
int length = input.readRawVarint32();
int oldLimit = input.pushLimit(length);
while (input.getBytesUntilLimit() > 0) {
int tmpRaw = input.readEnum();
ensureSetupErrorsIsMutable();
setupErrors_.add(tmpRaw);
}
input.popLimit(oldLimit);
break;
} // case 18
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private int setupStatus_ = 0;
/**
*
*
*
* Indicates SAA enrollment status of a given workload.
*
*
*
* optional .google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupState setup_status = 1;
*
*
* @return Whether the setupStatus field is set.
*/
@java.lang.Override
public boolean hasSetupStatus() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Indicates SAA enrollment status of a given workload.
*
*
*
* optional .google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupState setup_status = 1;
*
*
* @return The enum numeric value on the wire for setupStatus.
*/
@java.lang.Override
public int getSetupStatusValue() {
return setupStatus_;
}
/**
*
*
*
* Indicates SAA enrollment status of a given workload.
*
*
*
* optional .google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupState setup_status = 1;
*
*
* @param value The enum numeric value on the wire for setupStatus to set.
* @return This builder for chaining.
*/
public Builder setSetupStatusValue(int value) {
setupStatus_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Indicates SAA enrollment status of a given workload.
*
*
*
* optional .google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupState setup_status = 1;
*
*
* @return The setupStatus.
*/
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupState
getSetupStatus() {
com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupState result =
com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupState
.forNumber(setupStatus_);
return result == null
? com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupState
.UNRECOGNIZED
: result;
}
/**
*
*
*
* Indicates SAA enrollment status of a given workload.
*
*
*
* optional .google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupState setup_status = 1;
*
*
* @param value The setupStatus to set.
* @return This builder for chaining.
*/
public Builder setSetupStatus(
com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupState value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
setupStatus_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Indicates SAA enrollment status of a given workload.
*
*
*
* repeated .google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError setup_errors = 2;
*
*
* @return A list containing the setupErrors.
*/
public java.util.List<
com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError>
getSetupErrorsList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer,
com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError>(
setupErrors_, setupErrors_converter_);
}
/**
*
*
*
* Indicates SAA enrollment setup error if any.
*
*
*
* repeated .google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError setup_errors = 2;
*
*
* @return The count of setupErrors.
*/
public int getSetupErrorsCount() {
return setupErrors_.size();
}
/**
*
*
*
* Indicates SAA enrollment setup error if any.
*
*
*
* repeated .google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError setup_errors = 2;
*
*
* @param index The index of the element to return.
* @return The setupErrors at the given index.
*/
public com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError
getSetupErrors(int index) {
return setupErrors_converter_.convert(setupErrors_.get(index));
}
/**
*
*
*
* Indicates SAA enrollment setup error if any.
*
*
*
* repeated .google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError setup_errors = 2;
*
*
* @param index The index to set the value at.
* @param value The setupErrors to set.
* @return This builder for chaining.
*/
public Builder setSetupErrors(
int index,
com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError value) {
if (value == null) {
throw new NullPointerException();
}
ensureSetupErrorsIsMutable();
setupErrors_.set(index, value.getNumber());
onChanged();
return this;
}
/**
*
*
*
* Indicates SAA enrollment setup error if any.
*
*
*
* repeated .google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError setup_errors = 2;
*
*
* @param value The setupErrors to add.
* @return This builder for chaining.
*/
public Builder addSetupErrors(
com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError value) {
if (value == null) {
throw new NullPointerException();
}
ensureSetupErrorsIsMutable();
setupErrors_.add(value.getNumber());
onChanged();
return this;
}
/**
*
*
*
* Indicates SAA enrollment setup error if any.
*
*
*
* repeated .google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError setup_errors = 2;
*
*
* @param values The setupErrors to add.
* @return This builder for chaining.
*/
public Builder addAllSetupErrors(
java.lang.Iterable<
? extends
com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse
.SetupError>
values) {
ensureSetupErrorsIsMutable();
for (com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError value :
values) {
setupErrors_.add(value.getNumber());
}
onChanged();
return this;
}
/**
*
*
*
*
*
* repeated .google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError setup_errors = 2;
*
*
* @return A list containing the enum numeric values on the wire for setupErrors.
*/
public java.util.List getSetupErrorsValueList() {
return java.util.Collections.unmodifiableList(setupErrors_);
}
/**
*
*
*
* Indicates SAA enrollment setup error if any.
*
*
*
* repeated .google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError setup_errors = 2;
*
*
* @param index The index of the value to return.
* @return The enum numeric value on the wire of setupErrors at the given index.
*/
public int getSetupErrorsValue(int index) {
return setupErrors_.get(index);
}
/**
*
*
*
* Indicates SAA enrollment setup error if any.
*
*
*
* repeated .google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError setup_errors = 2;
*
*
* @param index The index to set the value at.
* @param value The enum numeric value on the wire for setupErrors to set.
* @return This builder for chaining.
*/
public Builder setSetupErrorsValue(int index, int value) {
ensureSetupErrorsIsMutable();
setupErrors_.set(index, value);
onChanged();
return this;
}
/**
*
*
*
* Indicates SAA enrollment setup error if any.
*
*
*
* repeated .google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError setup_errors = 2;
*
*
* @param value The enum numeric value on the wire for setupErrors to add.
* @return This builder for chaining.
*/
public Builder addSetupErrorsValue(int value) {
ensureSetupErrorsIsMutable();
setupErrors_.add(value);
onChanged();
return this;
}
/**
*
*
*
* Indicates SAA enrollment setup error if any.
*
*
*
* repeated .google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse.SetupError setup_errors = 2;
*
*
* @param values The enum numeric values on the wire for setupErrors to add.
* @return This builder for chaining.
*/
public Builder addAllSetupErrorsValue(java.lang.Iterable values) {
ensureSetupErrorsIsMutable();
for (int value : values) {
setupErrors_.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:google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse)
}
// @@protoc_insertion_point(class_scope:google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse)
private static final com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse();
}
public static com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SaaEnrollmentResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
*
*
* Optional. The resource name of the workload.
* Format:
* organizations/{organization}/locations/{location}/workloads/{workload}
*
* Read-only.
*
* Optional. The resource name of the workload.
* Format:
* organizations/{organization}/locations/{location}/workloads/{workload}
*
* Read-only.
*
*
* string name = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @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 DISPLAY_NAME_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object displayName_ = "";
/**
*
*
*
* Required. The user-assigned display name of the Workload.
* When present it must be between 4 to 30 characters.
* Allowed characters are: lowercase and uppercase letters, numbers,
* hyphen, and spaces.
*
* Example: My Workload
*
* Required. The user-assigned display name of the Workload.
* When present it must be between 4 to 30 characters.
* Allowed characters are: lowercase and uppercase letters, numbers,
* hyphen, and spaces.
*
* Example: My Workload
*
*
* string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for displayName.
*/
@java.lang.Override
public com.google.protobuf.ByteString getDisplayNameBytes() {
java.lang.Object ref = displayName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
displayName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int RESOURCES_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private java.util.List resources_;
/**
*
*
*
* Output only. The resources associated with this workload.
* These resources will be created when creating the workload.
* If any of the projects already exist, the workload creation will fail.
* Always read only.
*
* Output only. The resources associated with this workload.
* These resources will be created when creating the workload.
* If any of the projects already exist, the workload creation will fail.
* Always read only.
*
* Output only. The resources associated with this workload.
* These resources will be created when creating the workload.
* If any of the projects already exist, the workload creation will fail.
* Always read only.
*
* Output only. The resources associated with this workload.
* These resources will be created when creating the workload.
* If any of the projects already exist, the workload creation will fail.
* Always read only.
*
* Output only. The resources associated with this workload.
* These resources will be created when creating the workload.
* If any of the projects already exist, the workload creation will fail.
* Always read only.
*
*
*
* repeated .google.cloud.assuredworkloads.v1.Workload.ResourceInfo resources = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Workload.ResourceInfoOrBuilder getResourcesOrBuilder(
int index) {
return resources_.get(index);
}
public static final int COMPLIANCE_REGIME_FIELD_NUMBER = 4;
private int complianceRegime_ = 0;
/**
*
*
*
* Required. Immutable. Compliance Regime associated with this workload.
*
*
*
* .google.cloud.assuredworkloads.v1.Workload.ComplianceRegime compliance_regime = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
*
*
* @return The enum numeric value on the wire for complianceRegime.
*/
@java.lang.Override
public int getComplianceRegimeValue() {
return complianceRegime_;
}
/**
*
*
*
* Required. Immutable. Compliance Regime associated with this workload.
*
*
*
* .google.cloud.assuredworkloads.v1.Workload.ComplianceRegime compliance_regime = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
*
*
* @return The complianceRegime.
*/
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Workload.ComplianceRegime getComplianceRegime() {
com.google.cloud.assuredworkloads.v1.Workload.ComplianceRegime result =
com.google.cloud.assuredworkloads.v1.Workload.ComplianceRegime.forNumber(complianceRegime_);
return result == null
? com.google.cloud.assuredworkloads.v1.Workload.ComplianceRegime.UNRECOGNIZED
: result;
}
public static final int CREATE_TIME_FIELD_NUMBER = 5;
private com.google.protobuf.Timestamp createTime_;
/**
*
*
*
* Output only. Immutable. The Workload creation timestamp.
*
*
*
* .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];
*
*
* @return Whether the createTime field is set.
*/
@java.lang.Override
public boolean hasCreateTime() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Output only. Immutable. The Workload creation timestamp.
*
* Optional. The billing account used for the resources which are
* direct children of workload. This billing account is initially associated
* with the resources created as part of Workload creation.
* After the initial creation of these resources, the customer can change
* the assigned billing account.
* The resource name has the form
* `billingAccounts/{billing_account_id}`. For example,
* `billingAccounts/012345-567890-ABCDEF`.
*
* Optional. The billing account used for the resources which are
* direct children of workload. This billing account is initially associated
* with the resources created as part of Workload creation.
* After the initial creation of these resources, the customer can change
* the assigned billing account.
* The resource name has the form
* `billingAccounts/{billing_account_id}`. For example,
* `billingAccounts/012345-567890-ABCDEF`.
*
*
* string billing_account = 6 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for billingAccount.
*/
@java.lang.Override
public com.google.protobuf.ByteString getBillingAccountBytes() {
java.lang.Object ref = billingAccount_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
billingAccount_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ETAG_FIELD_NUMBER = 9;
@SuppressWarnings("serial")
private volatile java.lang.Object etag_ = "";
/**
*
*
*
* Optional. ETag of the workload, it is calculated on the basis
* of the Workload contents. It will be used in Update & Delete operations.
*
*
* map<string, string> labels = 10 [(.google.api.field_behavior) = OPTIONAL];
*/
@java.lang.Override
public java.lang.String getLabelsOrThrow(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map map = internalGetLabels().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int PROVISIONED_RESOURCES_PARENT_FIELD_NUMBER = 13;
@SuppressWarnings("serial")
private volatile java.lang.Object provisionedResourcesParent_ = "";
/**
*
*
*
* Input only. The parent resource for the resources managed by this Assured Workload. May
* be either empty or a folder resource which is a child of the
* Workload parent. If not specified all resources are created under the
* parent organization.
* Format:
* folders/{folder_id}
*
* Input only. The parent resource for the resources managed by this Assured Workload. May
* be either empty or a folder resource which is a child of the
* Workload parent. If not specified all resources are created under the
* parent organization.
* Format:
* folders/{folder_id}
*
*
* string provisioned_resources_parent = 13 [(.google.api.field_behavior) = INPUT_ONLY];
*
*
* @return The bytes for provisionedResourcesParent.
*/
@java.lang.Override
public com.google.protobuf.ByteString getProvisionedResourcesParentBytes() {
java.lang.Object ref = provisionedResourcesParent_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
provisionedResourcesParent_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int KMS_SETTINGS_FIELD_NUMBER = 14;
private com.google.cloud.assuredworkloads.v1.Workload.KMSSettings kmsSettings_;
/**
*
*
*
* Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS
* CMEK key is provisioned.
* This field is deprecated as of Feb 28, 2022.
* In order to create a Keyring, callers should specify,
* ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field.
*
*
*
* .google.cloud.assuredworkloads.v1.Workload.KMSSettings kms_settings = 14 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY];
*
*
* @deprecated google.cloud.assuredworkloads.v1.Workload.kms_settings is deprecated. See
* google/cloud/assuredworkloads/v1/assuredworkloads.proto;l=484
* @return Whether the kmsSettings field is set.
*/
@java.lang.Override
@java.lang.Deprecated
public boolean hasKmsSettings() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS
* CMEK key is provisioned.
* This field is deprecated as of Feb 28, 2022.
* In order to create a Keyring, callers should specify,
* ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field.
*
* Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS
* CMEK key is provisioned.
* This field is deprecated as of Feb 28, 2022.
* In order to create a Keyring, callers should specify,
* ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field.
*
* Input only. Resource properties that are used to customize workload resources.
* These properties (such as custom project id) will be used to create
* workload resources if possible. This field is optional.
*
* Input only. Resource properties that are used to customize workload resources.
* These properties (such as custom project id) will be used to create
* workload resources if possible. This field is optional.
*
* Input only. Resource properties that are used to customize workload resources.
* These properties (such as custom project id) will be used to create
* workload resources if possible. This field is optional.
*
* Input only. Resource properties that are used to customize workload resources.
* These properties (such as custom project id) will be used to create
* workload resources if possible. This field is optional.
*
* Input only. Resource properties that are used to customize workload resources.
* These properties (such as custom project id) will be used to create
* workload resources if possible. This field is optional.
*
*
*
* repeated .google.cloud.assuredworkloads.v1.Workload.ResourceSettings resource_settings = 15 [(.google.api.field_behavior) = INPUT_ONLY];
*
*/
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Workload.ResourceSettingsOrBuilder
getResourceSettingsOrBuilder(int index) {
return resourceSettings_.get(index);
}
public static final int KAJ_ENROLLMENT_STATE_FIELD_NUMBER = 17;
private int kajEnrollmentState_ = 0;
/**
*
*
*
* Output only. Represents the KAJ enrollment state of the given workload.
*
*
*
* .google.cloud.assuredworkloads.v1.Workload.KajEnrollmentState kaj_enrollment_state = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The enum numeric value on the wire for kajEnrollmentState.
*/
@java.lang.Override
public int getKajEnrollmentStateValue() {
return kajEnrollmentState_;
}
/**
*
*
*
* Output only. Represents the KAJ enrollment state of the given workload.
*
*
*
* .google.cloud.assuredworkloads.v1.Workload.KajEnrollmentState kaj_enrollment_state = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The kajEnrollmentState.
*/
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Workload.KajEnrollmentState getKajEnrollmentState() {
com.google.cloud.assuredworkloads.v1.Workload.KajEnrollmentState result =
com.google.cloud.assuredworkloads.v1.Workload.KajEnrollmentState.forNumber(
kajEnrollmentState_);
return result == null
? com.google.cloud.assuredworkloads.v1.Workload.KajEnrollmentState.UNRECOGNIZED
: result;
}
public static final int ENABLE_SOVEREIGN_CONTROLS_FIELD_NUMBER = 18;
private boolean enableSovereignControls_ = false;
/**
*
*
*
* Optional. Indicates the sovereignty status of the given workload.
* Currently meant to be used by Europe/Canada customers.
*
*
* bool enable_sovereign_controls = 18 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The enableSovereignControls.
*/
@java.lang.Override
public boolean getEnableSovereignControls() {
return enableSovereignControls_;
}
public static final int SAA_ENROLLMENT_RESPONSE_FIELD_NUMBER = 20;
private com.google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse
saaEnrollmentResponse_;
/**
*
*
*
* Output only. Represents the SAA enrollment response of the given workload.
* SAA enrollment response is queried during GetWorkload call.
* In failure cases, user friendly error message is shown in SAA details page.
*
*
*
* .google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse saa_enrollment_response = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the saaEnrollmentResponse field is set.
*/
@java.lang.Override
public boolean hasSaaEnrollmentResponse() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* Output only. Represents the SAA enrollment response of the given workload.
* SAA enrollment response is queried during GetWorkload call.
* In failure cases, user friendly error message is shown in SAA details page.
*
* Output only. Represents the SAA enrollment response of the given workload.
* SAA enrollment response is queried during GetWorkload call.
* In failure cases, user friendly error message is shown in SAA details page.
*
* Output only. Urls for services which are compliant for this Assured Workload, but which
* are currently disallowed by the ResourceUsageRestriction org policy.
* Invoke RestrictAllowedResources endpoint to allow your project developers
* to use these services in their environment."
*
*
*
* repeated string compliant_but_disallowed_services = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return A list containing the compliantButDisallowedServices.
*/
public com.google.protobuf.ProtocolStringList getCompliantButDisallowedServicesList() {
return compliantButDisallowedServices_;
}
/**
*
*
*
* Output only. Urls for services which are compliant for this Assured Workload, but which
* are currently disallowed by the ResourceUsageRestriction org policy.
* Invoke RestrictAllowedResources endpoint to allow your project developers
* to use these services in their environment."
*
*
*
* repeated string compliant_but_disallowed_services = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The count of compliantButDisallowedServices.
*/
public int getCompliantButDisallowedServicesCount() {
return compliantButDisallowedServices_.size();
}
/**
*
*
*
* Output only. Urls for services which are compliant for this Assured Workload, but which
* are currently disallowed by the ResourceUsageRestriction org policy.
* Invoke RestrictAllowedResources endpoint to allow your project developers
* to use these services in their environment."
*
*
*
* repeated string compliant_but_disallowed_services = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param index The index of the element to return.
* @return The compliantButDisallowedServices at the given index.
*/
public java.lang.String getCompliantButDisallowedServices(int index) {
return compliantButDisallowedServices_.get(index);
}
/**
*
*
*
* Output only. Urls for services which are compliant for this Assured Workload, but which
* are currently disallowed by the ResourceUsageRestriction org policy.
* Invoke RestrictAllowedResources endpoint to allow your project developers
* to use these services in their environment."
*
*
*
* repeated string compliant_but_disallowed_services = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param index The index of the value to return.
* @return The bytes of the compliantButDisallowedServices at the given index.
*/
public com.google.protobuf.ByteString getCompliantButDisallowedServicesBytes(int index) {
return compliantButDisallowedServices_.getByteString(index);
}
public static final int PARTNER_FIELD_NUMBER = 25;
private int partner_ = 0;
/**
*
*
*
* Optional. Compliance Regime associated with this workload.
*
*
*
* .google.cloud.assuredworkloads.v1.Workload.Partner partner = 25 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for partner.
*/
@java.lang.Override
public int getPartnerValue() {
return partner_;
}
/**
*
*
*
* Optional. Compliance Regime associated with this workload.
*
*
*
* .google.cloud.assuredworkloads.v1.Workload.Partner partner = 25 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The partner.
*/
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Workload.Partner getPartner() {
com.google.cloud.assuredworkloads.v1.Workload.Partner result =
com.google.cloud.assuredworkloads.v1.Workload.Partner.forNumber(partner_);
return result == null
? com.google.cloud.assuredworkloads.v1.Workload.Partner.UNRECOGNIZED
: result;
}
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(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_);
}
for (int i = 0; i < resources_.size(); i++) {
output.writeMessage(3, resources_.get(i));
}
if (complianceRegime_
!= com.google.cloud.assuredworkloads.v1.Workload.ComplianceRegime
.COMPLIANCE_REGIME_UNSPECIFIED
.getNumber()) {
output.writeEnum(4, complianceRegime_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(5, getCreateTime());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(billingAccount_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, billingAccount_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 9, etag_);
}
com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 10);
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(provisionedResourcesParent_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 13, provisionedResourcesParent_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(14, getKmsSettings());
}
for (int i = 0; i < resourceSettings_.size(); i++) {
output.writeMessage(15, resourceSettings_.get(i));
}
if (kajEnrollmentState_
!= com.google.cloud.assuredworkloads.v1.Workload.KajEnrollmentState
.KAJ_ENROLLMENT_STATE_UNSPECIFIED
.getNumber()) {
output.writeEnum(17, kajEnrollmentState_);
}
if (enableSovereignControls_ != false) {
output.writeBool(18, enableSovereignControls_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(20, getSaaEnrollmentResponse());
}
for (int i = 0; i < compliantButDisallowedServices_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(
output, 24, compliantButDisallowedServices_.getRaw(i));
}
if (partner_
!= com.google.cloud.assuredworkloads.v1.Workload.Partner.PARTNER_UNSPECIFIED.getNumber()) {
output.writeEnum(25, partner_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_);
}
for (int i = 0; i < resources_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, resources_.get(i));
}
if (complianceRegime_
!= com.google.cloud.assuredworkloads.v1.Workload.ComplianceRegime
.COMPLIANCE_REGIME_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, complianceRegime_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(billingAccount_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, billingAccount_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, etag_);
}
for (java.util.Map.Entry entry :
internalGetLabels().getMap().entrySet()) {
com.google.protobuf.MapEntry labels__ =
LabelsDefaultEntryHolder.defaultEntry
.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, labels__);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(provisionedResourcesParent_)) {
size +=
com.google.protobuf.GeneratedMessageV3.computeStringSize(13, provisionedResourcesParent_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getKmsSettings());
}
for (int i = 0; i < resourceSettings_.size(); i++) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(15, resourceSettings_.get(i));
}
if (kajEnrollmentState_
!= com.google.cloud.assuredworkloads.v1.Workload.KajEnrollmentState
.KAJ_ENROLLMENT_STATE_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(17, kajEnrollmentState_);
}
if (enableSovereignControls_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(18, enableSovereignControls_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(20, getSaaEnrollmentResponse());
}
{
int dataSize = 0;
for (int i = 0; i < compliantButDisallowedServices_.size(); i++) {
dataSize += computeStringSizeNoTag(compliantButDisallowedServices_.getRaw(i));
}
size += dataSize;
size += 2 * getCompliantButDisallowedServicesList().size();
}
if (partner_
!= com.google.cloud.assuredworkloads.v1.Workload.Partner.PARTNER_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(25, partner_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.assuredworkloads.v1.Workload)) {
return super.equals(obj);
}
com.google.cloud.assuredworkloads.v1.Workload other =
(com.google.cloud.assuredworkloads.v1.Workload) obj;
if (!getName().equals(other.getName())) return false;
if (!getDisplayName().equals(other.getDisplayName())) return false;
if (!getResourcesList().equals(other.getResourcesList())) return false;
if (complianceRegime_ != other.complianceRegime_) return false;
if (hasCreateTime() != other.hasCreateTime()) return false;
if (hasCreateTime()) {
if (!getCreateTime().equals(other.getCreateTime())) return false;
}
if (!getBillingAccount().equals(other.getBillingAccount())) return false;
if (!getEtag().equals(other.getEtag())) return false;
if (!internalGetLabels().equals(other.internalGetLabels())) return false;
if (!getProvisionedResourcesParent().equals(other.getProvisionedResourcesParent()))
return false;
if (hasKmsSettings() != other.hasKmsSettings()) return false;
if (hasKmsSettings()) {
if (!getKmsSettings().equals(other.getKmsSettings())) return false;
}
if (!getResourceSettingsList().equals(other.getResourceSettingsList())) return false;
if (kajEnrollmentState_ != other.kajEnrollmentState_) return false;
if (getEnableSovereignControls() != other.getEnableSovereignControls()) return false;
if (hasSaaEnrollmentResponse() != other.hasSaaEnrollmentResponse()) return false;
if (hasSaaEnrollmentResponse()) {
if (!getSaaEnrollmentResponse().equals(other.getSaaEnrollmentResponse())) return false;
}
if (!getCompliantButDisallowedServicesList()
.equals(other.getCompliantButDisallowedServicesList())) return false;
if (partner_ != other.partner_) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) 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) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER;
hash = (53 * hash) + getDisplayName().hashCode();
if (getResourcesCount() > 0) {
hash = (37 * hash) + RESOURCES_FIELD_NUMBER;
hash = (53 * hash) + getResourcesList().hashCode();
}
hash = (37 * hash) + COMPLIANCE_REGIME_FIELD_NUMBER;
hash = (53 * hash) + complianceRegime_;
if (hasCreateTime()) {
hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER;
hash = (53 * hash) + getCreateTime().hashCode();
}
hash = (37 * hash) + BILLING_ACCOUNT_FIELD_NUMBER;
hash = (53 * hash) + getBillingAccount().hashCode();
hash = (37 * hash) + ETAG_FIELD_NUMBER;
hash = (53 * hash) + getEtag().hashCode();
if (!internalGetLabels().getMap().isEmpty()) {
hash = (37 * hash) + LABELS_FIELD_NUMBER;
hash = (53 * hash) + internalGetLabels().hashCode();
}
hash = (37 * hash) + PROVISIONED_RESOURCES_PARENT_FIELD_NUMBER;
hash = (53 * hash) + getProvisionedResourcesParent().hashCode();
if (hasKmsSettings()) {
hash = (37 * hash) + KMS_SETTINGS_FIELD_NUMBER;
hash = (53 * hash) + getKmsSettings().hashCode();
}
if (getResourceSettingsCount() > 0) {
hash = (37 * hash) + RESOURCE_SETTINGS_FIELD_NUMBER;
hash = (53 * hash) + getResourceSettingsList().hashCode();
}
hash = (37 * hash) + KAJ_ENROLLMENT_STATE_FIELD_NUMBER;
hash = (53 * hash) + kajEnrollmentState_;
hash = (37 * hash) + ENABLE_SOVEREIGN_CONTROLS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableSovereignControls());
if (hasSaaEnrollmentResponse()) {
hash = (37 * hash) + SAA_ENROLLMENT_RESPONSE_FIELD_NUMBER;
hash = (53 * hash) + getSaaEnrollmentResponse().hashCode();
}
if (getCompliantButDisallowedServicesCount() > 0) {
hash = (37 * hash) + COMPLIANT_BUT_DISALLOWED_SERVICES_FIELD_NUMBER;
hash = (53 * hash) + getCompliantButDisallowedServicesList().hashCode();
}
hash = (37 * hash) + PARTNER_FIELD_NUMBER;
hash = (53 * hash) + partner_;
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.assuredworkloads.v1.Workload parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.assuredworkloads.v1.Workload parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.assuredworkloads.v1.Workload parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.assuredworkloads.v1.Workload parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.assuredworkloads.v1.Workload parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.assuredworkloads.v1.Workload parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.assuredworkloads.v1.Workload parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.assuredworkloads.v1.Workload 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 com.google.cloud.assuredworkloads.v1.Workload parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.assuredworkloads.v1.Workload 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 com.google.cloud.assuredworkloads.v1.Workload parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.assuredworkloads.v1.Workload 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(com.google.cloud.assuredworkloads.v1.Workload 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 Workload object for managing highly regulated workloads of cloud
* customers.
*
*
* Protobuf type {@code google.cloud.assuredworkloads.v1.Workload}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.assuredworkloads.v1.Workload)
com.google.cloud.assuredworkloads.v1.WorkloadOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Workload_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 10:
return internalGetLabels();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
int number) {
switch (number) {
case 10:
return internalGetMutableLabels();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Workload_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.assuredworkloads.v1.Workload.class,
com.google.cloud.assuredworkloads.v1.Workload.Builder.class);
}
// Construct using com.google.cloud.assuredworkloads.v1.Workload.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getResourcesFieldBuilder();
getCreateTimeFieldBuilder();
getKmsSettingsFieldBuilder();
getResourceSettingsFieldBuilder();
getSaaEnrollmentResponseFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
displayName_ = "";
if (resourcesBuilder_ == null) {
resources_ = java.util.Collections.emptyList();
} else {
resources_ = null;
resourcesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
complianceRegime_ = 0;
createTime_ = null;
if (createTimeBuilder_ != null) {
createTimeBuilder_.dispose();
createTimeBuilder_ = null;
}
billingAccount_ = "";
etag_ = "";
internalGetMutableLabels().clear();
provisionedResourcesParent_ = "";
kmsSettings_ = null;
if (kmsSettingsBuilder_ != null) {
kmsSettingsBuilder_.dispose();
kmsSettingsBuilder_ = null;
}
if (resourceSettingsBuilder_ == null) {
resourceSettings_ = java.util.Collections.emptyList();
} else {
resourceSettings_ = null;
resourceSettingsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000400);
kajEnrollmentState_ = 0;
enableSovereignControls_ = false;
saaEnrollmentResponse_ = null;
if (saaEnrollmentResponseBuilder_ != null) {
saaEnrollmentResponseBuilder_.dispose();
saaEnrollmentResponseBuilder_ = null;
}
compliantButDisallowedServices_ = com.google.protobuf.LazyStringArrayList.emptyList();
partner_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Workload_descriptor;
}
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Workload getDefaultInstanceForType() {
return com.google.cloud.assuredworkloads.v1.Workload.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Workload build() {
com.google.cloud.assuredworkloads.v1.Workload result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Workload buildPartial() {
com.google.cloud.assuredworkloads.v1.Workload result =
new com.google.cloud.assuredworkloads.v1.Workload(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.google.cloud.assuredworkloads.v1.Workload result) {
if (resourcesBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)) {
resources_ = java.util.Collections.unmodifiableList(resources_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.resources_ = resources_;
} else {
result.resources_ = resourcesBuilder_.build();
}
if (resourceSettingsBuilder_ == null) {
if (((bitField0_ & 0x00000400) != 0)) {
resourceSettings_ = java.util.Collections.unmodifiableList(resourceSettings_);
bitField0_ = (bitField0_ & ~0x00000400);
}
result.resourceSettings_ = resourceSettings_;
} else {
result.resourceSettings_ = resourceSettingsBuilder_.build();
}
}
private void buildPartial0(com.google.cloud.assuredworkloads.v1.Workload result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.displayName_ = displayName_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.complianceRegime_ = complianceRegime_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000010) != 0)) {
result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.billingAccount_ = billingAccount_;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.etag_ = etag_;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.labels_ = internalGetLabels();
result.labels_.makeImmutable();
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.provisionedResourcesParent_ = provisionedResourcesParent_;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
result.kmsSettings_ =
kmsSettingsBuilder_ == null ? kmsSettings_ : kmsSettingsBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000800) != 0)) {
result.kajEnrollmentState_ = kajEnrollmentState_;
}
if (((from_bitField0_ & 0x00001000) != 0)) {
result.enableSovereignControls_ = enableSovereignControls_;
}
if (((from_bitField0_ & 0x00002000) != 0)) {
result.saaEnrollmentResponse_ =
saaEnrollmentResponseBuilder_ == null
? saaEnrollmentResponse_
: saaEnrollmentResponseBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00004000) != 0)) {
compliantButDisallowedServices_.makeImmutable();
result.compliantButDisallowedServices_ = compliantButDisallowedServices_;
}
if (((from_bitField0_ & 0x00008000) != 0)) {
result.partner_ = partner_;
}
result.bitField0_ |= to_bitField0_;
}
@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 com.google.cloud.assuredworkloads.v1.Workload) {
return mergeFrom((com.google.cloud.assuredworkloads.v1.Workload) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.assuredworkloads.v1.Workload other) {
if (other == com.google.cloud.assuredworkloads.v1.Workload.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getDisplayName().isEmpty()) {
displayName_ = other.displayName_;
bitField0_ |= 0x00000002;
onChanged();
}
if (resourcesBuilder_ == null) {
if (!other.resources_.isEmpty()) {
if (resources_.isEmpty()) {
resources_ = other.resources_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureResourcesIsMutable();
resources_.addAll(other.resources_);
}
onChanged();
}
} else {
if (!other.resources_.isEmpty()) {
if (resourcesBuilder_.isEmpty()) {
resourcesBuilder_.dispose();
resourcesBuilder_ = null;
resources_ = other.resources_;
bitField0_ = (bitField0_ & ~0x00000004);
resourcesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getResourcesFieldBuilder()
: null;
} else {
resourcesBuilder_.addAllMessages(other.resources_);
}
}
}
if (other.complianceRegime_ != 0) {
setComplianceRegimeValue(other.getComplianceRegimeValue());
}
if (other.hasCreateTime()) {
mergeCreateTime(other.getCreateTime());
}
if (!other.getBillingAccount().isEmpty()) {
billingAccount_ = other.billingAccount_;
bitField0_ |= 0x00000020;
onChanged();
}
if (!other.getEtag().isEmpty()) {
etag_ = other.etag_;
bitField0_ |= 0x00000040;
onChanged();
}
internalGetMutableLabels().mergeFrom(other.internalGetLabels());
bitField0_ |= 0x00000080;
if (!other.getProvisionedResourcesParent().isEmpty()) {
provisionedResourcesParent_ = other.provisionedResourcesParent_;
bitField0_ |= 0x00000100;
onChanged();
}
if (other.hasKmsSettings()) {
mergeKmsSettings(other.getKmsSettings());
}
if (resourceSettingsBuilder_ == null) {
if (!other.resourceSettings_.isEmpty()) {
if (resourceSettings_.isEmpty()) {
resourceSettings_ = other.resourceSettings_;
bitField0_ = (bitField0_ & ~0x00000400);
} else {
ensureResourceSettingsIsMutable();
resourceSettings_.addAll(other.resourceSettings_);
}
onChanged();
}
} else {
if (!other.resourceSettings_.isEmpty()) {
if (resourceSettingsBuilder_.isEmpty()) {
resourceSettingsBuilder_.dispose();
resourceSettingsBuilder_ = null;
resourceSettings_ = other.resourceSettings_;
bitField0_ = (bitField0_ & ~0x00000400);
resourceSettingsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getResourceSettingsFieldBuilder()
: null;
} else {
resourceSettingsBuilder_.addAllMessages(other.resourceSettings_);
}
}
}
if (other.kajEnrollmentState_ != 0) {
setKajEnrollmentStateValue(other.getKajEnrollmentStateValue());
}
if (other.getEnableSovereignControls() != false) {
setEnableSovereignControls(other.getEnableSovereignControls());
}
if (other.hasSaaEnrollmentResponse()) {
mergeSaaEnrollmentResponse(other.getSaaEnrollmentResponse());
}
if (!other.compliantButDisallowedServices_.isEmpty()) {
if (compliantButDisallowedServices_.isEmpty()) {
compliantButDisallowedServices_ = other.compliantButDisallowedServices_;
bitField0_ |= 0x00004000;
} else {
ensureCompliantButDisallowedServicesIsMutable();
compliantButDisallowedServices_.addAll(other.compliantButDisallowedServices_);
}
onChanged();
}
if (other.partner_ != 0) {
setPartnerValue(other.getPartnerValue());
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
displayName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo m =
input.readMessage(
com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo.parser(),
extensionRegistry);
if (resourcesBuilder_ == null) {
ensureResourcesIsMutable();
resources_.add(m);
} else {
resourcesBuilder_.addMessage(m);
}
break;
} // case 26
case 32:
{
complianceRegime_ = input.readEnum();
bitField0_ |= 0x00000008;
break;
} // case 32
case 42:
{
input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 42
case 50:
{
billingAccount_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000020;
break;
} // case 50
case 74:
{
etag_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000040;
break;
} // case 74
case 82:
{
com.google.protobuf.MapEntry labels__ =
input.readMessage(
LabelsDefaultEntryHolder.defaultEntry.getParserForType(),
extensionRegistry);
internalGetMutableLabels()
.getMutableMap()
.put(labels__.getKey(), labels__.getValue());
bitField0_ |= 0x00000080;
break;
} // case 82
case 106:
{
provisionedResourcesParent_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000100;
break;
} // case 106
case 114:
{
input.readMessage(getKmsSettingsFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000200;
break;
} // case 114
case 122:
{
com.google.cloud.assuredworkloads.v1.Workload.ResourceSettings m =
input.readMessage(
com.google.cloud.assuredworkloads.v1.Workload.ResourceSettings.parser(),
extensionRegistry);
if (resourceSettingsBuilder_ == null) {
ensureResourceSettingsIsMutable();
resourceSettings_.add(m);
} else {
resourceSettingsBuilder_.addMessage(m);
}
break;
} // case 122
case 136:
{
kajEnrollmentState_ = input.readEnum();
bitField0_ |= 0x00000800;
break;
} // case 136
case 144:
{
enableSovereignControls_ = input.readBool();
bitField0_ |= 0x00001000;
break;
} // case 144
case 162:
{
input.readMessage(
getSaaEnrollmentResponseFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00002000;
break;
} // case 162
case 194:
{
java.lang.String s = input.readStringRequireUtf8();
ensureCompliantButDisallowedServicesIsMutable();
compliantButDisallowedServices_.add(s);
break;
} // case 194
case 200:
{
partner_ = input.readEnum();
bitField0_ |= 0x00008000;
break;
} // case 200
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
*
*
* Optional. The resource name of the workload.
* Format:
* organizations/{organization}/locations/{location}/workloads/{workload}
*
* Read-only.
*
* Optional. The resource name of the workload.
* Format:
* organizations/{organization}/locations/{location}/workloads/{workload}
*
* Read-only.
*
*
* string name = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @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;
}
}
/**
*
*
*
* Optional. The resource name of the workload.
* Format:
* organizations/{organization}/locations/{location}/workloads/{workload}
*
* Read-only.
*
*
* string name = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @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;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Optional. The resource name of the workload.
* Format:
* organizations/{organization}/locations/{location}/workloads/{workload}
*
* Read-only.
*
*
* string name = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Optional. The resource name of the workload.
* Format:
* organizations/{organization}/locations/{location}/workloads/{workload}
*
* Read-only.
*
*
* string name = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @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;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object displayName_ = "";
/**
*
*
*
* Required. The user-assigned display name of the Workload.
* When present it must be between 4 to 30 characters.
* Allowed characters are: lowercase and uppercase letters, numbers,
* hyphen, and spaces.
*
* Example: My Workload
*
* Required. The user-assigned display name of the Workload.
* When present it must be between 4 to 30 characters.
* Allowed characters are: lowercase and uppercase letters, numbers,
* hyphen, and spaces.
*
* Example: My Workload
*
* Required. The user-assigned display name of the Workload.
* When present it must be between 4 to 30 characters.
* Allowed characters are: lowercase and uppercase letters, numbers,
* hyphen, and spaces.
*
* Example: My Workload
*
*
* string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The displayName to set.
* @return This builder for chaining.
*/
public Builder setDisplayName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
displayName_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Required. The user-assigned display name of the Workload.
* When present it must be between 4 to 30 characters.
* Allowed characters are: lowercase and uppercase letters, numbers,
* hyphen, and spaces.
*
* Example: My Workload
*
* Required. The user-assigned display name of the Workload.
* When present it must be between 4 to 30 characters.
* Allowed characters are: lowercase and uppercase letters, numbers,
* hyphen, and spaces.
*
* Example: My Workload
*
*
* string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for displayName to set.
* @return This builder for chaining.
*/
public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
displayName_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.util.List resources_ =
java.util.Collections.emptyList();
private void ensureResourcesIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
resources_ =
new java.util.ArrayList(
resources_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo,
com.google.cloud.assuredworkloads.v1.Workload.ResourceInfo.Builder,
com.google.cloud.assuredworkloads.v1.Workload.ResourceInfoOrBuilder>
resourcesBuilder_;
/**
*
*
*
* Output only. The resources associated with this workload.
* These resources will be created when creating the workload.
* If any of the projects already exist, the workload creation will fail.
* Always read only.
*
* Output only. The resources associated with this workload.
* These resources will be created when creating the workload.
* If any of the projects already exist, the workload creation will fail.
* Always read only.
*
* Output only. The resources associated with this workload.
* These resources will be created when creating the workload.
* If any of the projects already exist, the workload creation will fail.
* Always read only.
*
* Output only. The resources associated with this workload.
* These resources will be created when creating the workload.
* If any of the projects already exist, the workload creation will fail.
* Always read only.
*
* Output only. The resources associated with this workload.
* These resources will be created when creating the workload.
* If any of the projects already exist, the workload creation will fail.
* Always read only.
*
* Output only. The resources associated with this workload.
* These resources will be created when creating the workload.
* If any of the projects already exist, the workload creation will fail.
* Always read only.
*
* Output only. The resources associated with this workload.
* These resources will be created when creating the workload.
* If any of the projects already exist, the workload creation will fail.
* Always read only.
*
* Output only. The resources associated with this workload.
* These resources will be created when creating the workload.
* If any of the projects already exist, the workload creation will fail.
* Always read only.
*
* Output only. The resources associated with this workload.
* These resources will be created when creating the workload.
* If any of the projects already exist, the workload creation will fail.
* Always read only.
*
* Output only. The resources associated with this workload.
* These resources will be created when creating the workload.
* If any of the projects already exist, the workload creation will fail.
* Always read only.
*
* Output only. The resources associated with this workload.
* These resources will be created when creating the workload.
* If any of the projects already exist, the workload creation will fail.
* Always read only.
*
* Output only. The resources associated with this workload.
* These resources will be created when creating the workload.
* If any of the projects already exist, the workload creation will fail.
* Always read only.
*
* Output only. The resources associated with this workload.
* These resources will be created when creating the workload.
* If any of the projects already exist, the workload creation will fail.
* Always read only.
*
* Output only. The resources associated with this workload.
* These resources will be created when creating the workload.
* If any of the projects already exist, the workload creation will fail.
* Always read only.
*
* Output only. The resources associated with this workload.
* These resources will be created when creating the workload.
* If any of the projects already exist, the workload creation will fail.
* Always read only.
*
* Output only. The resources associated with this workload.
* These resources will be created when creating the workload.
* If any of the projects already exist, the workload creation will fail.
* Always read only.
*
* Output only. The resources associated with this workload.
* These resources will be created when creating the workload.
* If any of the projects already exist, the workload creation will fail.
* Always read only.
*
* Output only. The resources associated with this workload.
* These resources will be created when creating the workload.
* If any of the projects already exist, the workload creation will fail.
* Always read only.
*
* Optional. The billing account used for the resources which are
* direct children of workload. This billing account is initially associated
* with the resources created as part of Workload creation.
* After the initial creation of these resources, the customer can change
* the assigned billing account.
* The resource name has the form
* `billingAccounts/{billing_account_id}`. For example,
* `billingAccounts/012345-567890-ABCDEF`.
*
* Optional. The billing account used for the resources which are
* direct children of workload. This billing account is initially associated
* with the resources created as part of Workload creation.
* After the initial creation of these resources, the customer can change
* the assigned billing account.
* The resource name has the form
* `billingAccounts/{billing_account_id}`. For example,
* `billingAccounts/012345-567890-ABCDEF`.
*
* Optional. The billing account used for the resources which are
* direct children of workload. This billing account is initially associated
* with the resources created as part of Workload creation.
* After the initial creation of these resources, the customer can change
* the assigned billing account.
* The resource name has the form
* `billingAccounts/{billing_account_id}`. For example,
* `billingAccounts/012345-567890-ABCDEF`.
*
*
* string billing_account = 6 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The billingAccount to set.
* @return This builder for chaining.
*/
public Builder setBillingAccount(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
billingAccount_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* Optional. The billing account used for the resources which are
* direct children of workload. This billing account is initially associated
* with the resources created as part of Workload creation.
* After the initial creation of these resources, the customer can change
* the assigned billing account.
* The resource name has the form
* `billingAccounts/{billing_account_id}`. For example,
* `billingAccounts/012345-567890-ABCDEF`.
*
* Optional. The billing account used for the resources which are
* direct children of workload. This billing account is initially associated
* with the resources created as part of Workload creation.
* After the initial creation of these resources, the customer can change
* the assigned billing account.
* The resource name has the form
* `billingAccounts/{billing_account_id}`. For example,
* `billingAccounts/012345-567890-ABCDEF`.
*
*
* string billing_account = 6 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for billingAccount to set.
* @return This builder for chaining.
*/
public Builder setBillingAccountBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
billingAccount_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
private java.lang.Object etag_ = "";
/**
*
*
*
* Optional. ETag of the workload, it is calculated on the basis
* of the Workload contents. It will be used in Update & Delete operations.
*
* Input only. The parent resource for the resources managed by this Assured Workload. May
* be either empty or a folder resource which is a child of the
* Workload parent. If not specified all resources are created under the
* parent organization.
* Format:
* folders/{folder_id}
*
* Input only. The parent resource for the resources managed by this Assured Workload. May
* be either empty or a folder resource which is a child of the
* Workload parent. If not specified all resources are created under the
* parent organization.
* Format:
* folders/{folder_id}
*
* Input only. The parent resource for the resources managed by this Assured Workload. May
* be either empty or a folder resource which is a child of the
* Workload parent. If not specified all resources are created under the
* parent organization.
* Format:
* folders/{folder_id}
*
*
* string provisioned_resources_parent = 13 [(.google.api.field_behavior) = INPUT_ONLY];
*
*
* @param value The provisionedResourcesParent to set.
* @return This builder for chaining.
*/
public Builder setProvisionedResourcesParent(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
provisionedResourcesParent_ = value;
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*
*
* Input only. The parent resource for the resources managed by this Assured Workload. May
* be either empty or a folder resource which is a child of the
* Workload parent. If not specified all resources are created under the
* parent organization.
* Format:
* folders/{folder_id}
*
* Input only. The parent resource for the resources managed by this Assured Workload. May
* be either empty or a folder resource which is a child of the
* Workload parent. If not specified all resources are created under the
* parent organization.
* Format:
* folders/{folder_id}
*
*
* string provisioned_resources_parent = 13 [(.google.api.field_behavior) = INPUT_ONLY];
*
*
* @param value The bytes for provisionedResourcesParent to set.
* @return This builder for chaining.
*/
public Builder setProvisionedResourcesParentBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
provisionedResourcesParent_ = value;
bitField0_ |= 0x00000100;
onChanged();
return this;
}
private com.google.cloud.assuredworkloads.v1.Workload.KMSSettings kmsSettings_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.assuredworkloads.v1.Workload.KMSSettings,
com.google.cloud.assuredworkloads.v1.Workload.KMSSettings.Builder,
com.google.cloud.assuredworkloads.v1.Workload.KMSSettingsOrBuilder>
kmsSettingsBuilder_;
/**
*
*
*
* Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS
* CMEK key is provisioned.
* This field is deprecated as of Feb 28, 2022.
* In order to create a Keyring, callers should specify,
* ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field.
*
*
*
* .google.cloud.assuredworkloads.v1.Workload.KMSSettings kms_settings = 14 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY];
*
*
* @deprecated google.cloud.assuredworkloads.v1.Workload.kms_settings is deprecated. See
* google/cloud/assuredworkloads/v1/assuredworkloads.proto;l=484
* @return Whether the kmsSettings field is set.
*/
@java.lang.Deprecated
public boolean hasKmsSettings() {
return ((bitField0_ & 0x00000200) != 0);
}
/**
*
*
*
* Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS
* CMEK key is provisioned.
* This field is deprecated as of Feb 28, 2022.
* In order to create a Keyring, callers should specify,
* ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field.
*
* Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS
* CMEK key is provisioned.
* This field is deprecated as of Feb 28, 2022.
* In order to create a Keyring, callers should specify,
* ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field.
*
* Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS
* CMEK key is provisioned.
* This field is deprecated as of Feb 28, 2022.
* In order to create a Keyring, callers should specify,
* ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field.
*
* Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS
* CMEK key is provisioned.
* This field is deprecated as of Feb 28, 2022.
* In order to create a Keyring, callers should specify,
* ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field.
*
* Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS
* CMEK key is provisioned.
* This field is deprecated as of Feb 28, 2022.
* In order to create a Keyring, callers should specify,
* ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field.
*
* Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS
* CMEK key is provisioned.
* This field is deprecated as of Feb 28, 2022.
* In order to create a Keyring, callers should specify,
* ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field.
*
* Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS
* CMEK key is provisioned.
* This field is deprecated as of Feb 28, 2022.
* In order to create a Keyring, callers should specify,
* ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field.
*
* Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS
* CMEK key is provisioned.
* This field is deprecated as of Feb 28, 2022.
* In order to create a Keyring, callers should specify,
* ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field.
*
* Input only. Resource properties that are used to customize workload resources.
* These properties (such as custom project id) will be used to create
* workload resources if possible. This field is optional.
*
* Input only. Resource properties that are used to customize workload resources.
* These properties (such as custom project id) will be used to create
* workload resources if possible. This field is optional.
*
* Input only. Resource properties that are used to customize workload resources.
* These properties (such as custom project id) will be used to create
* workload resources if possible. This field is optional.
*
* Input only. Resource properties that are used to customize workload resources.
* These properties (such as custom project id) will be used to create
* workload resources if possible. This field is optional.
*
* Input only. Resource properties that are used to customize workload resources.
* These properties (such as custom project id) will be used to create
* workload resources if possible. This field is optional.
*
* Input only. Resource properties that are used to customize workload resources.
* These properties (such as custom project id) will be used to create
* workload resources if possible. This field is optional.
*
* Input only. Resource properties that are used to customize workload resources.
* These properties (such as custom project id) will be used to create
* workload resources if possible. This field is optional.
*
* Input only. Resource properties that are used to customize workload resources.
* These properties (such as custom project id) will be used to create
* workload resources if possible. This field is optional.
*
* Input only. Resource properties that are used to customize workload resources.
* These properties (such as custom project id) will be used to create
* workload resources if possible. This field is optional.
*
* Input only. Resource properties that are used to customize workload resources.
* These properties (such as custom project id) will be used to create
* workload resources if possible. This field is optional.
*
* Input only. Resource properties that are used to customize workload resources.
* These properties (such as custom project id) will be used to create
* workload resources if possible. This field is optional.
*
* Input only. Resource properties that are used to customize workload resources.
* These properties (such as custom project id) will be used to create
* workload resources if possible. This field is optional.
*
* Input only. Resource properties that are used to customize workload resources.
* These properties (such as custom project id) will be used to create
* workload resources if possible. This field is optional.
*
* Input only. Resource properties that are used to customize workload resources.
* These properties (such as custom project id) will be used to create
* workload resources if possible. This field is optional.
*
* Input only. Resource properties that are used to customize workload resources.
* These properties (such as custom project id) will be used to create
* workload resources if possible. This field is optional.
*
* Input only. Resource properties that are used to customize workload resources.
* These properties (such as custom project id) will be used to create
* workload resources if possible. This field is optional.
*
* Input only. Resource properties that are used to customize workload resources.
* These properties (such as custom project id) will be used to create
* workload resources if possible. This field is optional.
*
* Input only. Resource properties that are used to customize workload resources.
* These properties (such as custom project id) will be used to create
* workload resources if possible. This field is optional.
*
* Output only. Represents the SAA enrollment response of the given workload.
* SAA enrollment response is queried during GetWorkload call.
* In failure cases, user friendly error message is shown in SAA details page.
*
*
*
* .google.cloud.assuredworkloads.v1.Workload.SaaEnrollmentResponse saa_enrollment_response = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the saaEnrollmentResponse field is set.
*/
public boolean hasSaaEnrollmentResponse() {
return ((bitField0_ & 0x00002000) != 0);
}
/**
*
*
*
* Output only. Represents the SAA enrollment response of the given workload.
* SAA enrollment response is queried during GetWorkload call.
* In failure cases, user friendly error message is shown in SAA details page.
*
* Output only. Represents the SAA enrollment response of the given workload.
* SAA enrollment response is queried during GetWorkload call.
* In failure cases, user friendly error message is shown in SAA details page.
*
* Output only. Represents the SAA enrollment response of the given workload.
* SAA enrollment response is queried during GetWorkload call.
* In failure cases, user friendly error message is shown in SAA details page.
*
* Output only. Represents the SAA enrollment response of the given workload.
* SAA enrollment response is queried during GetWorkload call.
* In failure cases, user friendly error message is shown in SAA details page.
*
* Output only. Represents the SAA enrollment response of the given workload.
* SAA enrollment response is queried during GetWorkload call.
* In failure cases, user friendly error message is shown in SAA details page.
*
* Output only. Represents the SAA enrollment response of the given workload.
* SAA enrollment response is queried during GetWorkload call.
* In failure cases, user friendly error message is shown in SAA details page.
*
* Output only. Represents the SAA enrollment response of the given workload.
* SAA enrollment response is queried during GetWorkload call.
* In failure cases, user friendly error message is shown in SAA details page.
*
* Output only. Represents the SAA enrollment response of the given workload.
* SAA enrollment response is queried during GetWorkload call.
* In failure cases, user friendly error message is shown in SAA details page.
*
* Output only. Urls for services which are compliant for this Assured Workload, but which
* are currently disallowed by the ResourceUsageRestriction org policy.
* Invoke RestrictAllowedResources endpoint to allow your project developers
* to use these services in their environment."
*
*
*
* repeated string compliant_but_disallowed_services = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return A list containing the compliantButDisallowedServices.
*/
public com.google.protobuf.ProtocolStringList getCompliantButDisallowedServicesList() {
compliantButDisallowedServices_.makeImmutable();
return compliantButDisallowedServices_;
}
/**
*
*
*
* Output only. Urls for services which are compliant for this Assured Workload, but which
* are currently disallowed by the ResourceUsageRestriction org policy.
* Invoke RestrictAllowedResources endpoint to allow your project developers
* to use these services in their environment."
*
*
*
* repeated string compliant_but_disallowed_services = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The count of compliantButDisallowedServices.
*/
public int getCompliantButDisallowedServicesCount() {
return compliantButDisallowedServices_.size();
}
/**
*
*
*
* Output only. Urls for services which are compliant for this Assured Workload, but which
* are currently disallowed by the ResourceUsageRestriction org policy.
* Invoke RestrictAllowedResources endpoint to allow your project developers
* to use these services in their environment."
*
*
*
* repeated string compliant_but_disallowed_services = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param index The index of the element to return.
* @return The compliantButDisallowedServices at the given index.
*/
public java.lang.String getCompliantButDisallowedServices(int index) {
return compliantButDisallowedServices_.get(index);
}
/**
*
*
*
* Output only. Urls for services which are compliant for this Assured Workload, but which
* are currently disallowed by the ResourceUsageRestriction org policy.
* Invoke RestrictAllowedResources endpoint to allow your project developers
* to use these services in their environment."
*
*
*
* repeated string compliant_but_disallowed_services = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param index The index of the value to return.
* @return The bytes of the compliantButDisallowedServices at the given index.
*/
public com.google.protobuf.ByteString getCompliantButDisallowedServicesBytes(int index) {
return compliantButDisallowedServices_.getByteString(index);
}
/**
*
*
*
* Output only. Urls for services which are compliant for this Assured Workload, but which
* are currently disallowed by the ResourceUsageRestriction org policy.
* Invoke RestrictAllowedResources endpoint to allow your project developers
* to use these services in their environment."
*
*
*
* repeated string compliant_but_disallowed_services = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param index The index to set the value at.
* @param value The compliantButDisallowedServices to set.
* @return This builder for chaining.
*/
public Builder setCompliantButDisallowedServices(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureCompliantButDisallowedServicesIsMutable();
compliantButDisallowedServices_.set(index, value);
bitField0_ |= 0x00004000;
onChanged();
return this;
}
/**
*
*
*
* Output only. Urls for services which are compliant for this Assured Workload, but which
* are currently disallowed by the ResourceUsageRestriction org policy.
* Invoke RestrictAllowedResources endpoint to allow your project developers
* to use these services in their environment."
*
*
*
* repeated string compliant_but_disallowed_services = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The compliantButDisallowedServices to add.
* @return This builder for chaining.
*/
public Builder addCompliantButDisallowedServices(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureCompliantButDisallowedServicesIsMutable();
compliantButDisallowedServices_.add(value);
bitField0_ |= 0x00004000;
onChanged();
return this;
}
/**
*
*
*
* Output only. Urls for services which are compliant for this Assured Workload, but which
* are currently disallowed by the ResourceUsageRestriction org policy.
* Invoke RestrictAllowedResources endpoint to allow your project developers
* to use these services in their environment."
*
*
*
* repeated string compliant_but_disallowed_services = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param values The compliantButDisallowedServices to add.
* @return This builder for chaining.
*/
public Builder addAllCompliantButDisallowedServices(
java.lang.Iterable values) {
ensureCompliantButDisallowedServicesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, compliantButDisallowedServices_);
bitField0_ |= 0x00004000;
onChanged();
return this;
}
/**
*
*
*
* Output only. Urls for services which are compliant for this Assured Workload, but which
* are currently disallowed by the ResourceUsageRestriction org policy.
* Invoke RestrictAllowedResources endpoint to allow your project developers
* to use these services in their environment."
*
* Output only. Urls for services which are compliant for this Assured Workload, but which
* are currently disallowed by the ResourceUsageRestriction org policy.
* Invoke RestrictAllowedResources endpoint to allow your project developers
* to use these services in their environment."
*
*
*
* repeated string compliant_but_disallowed_services = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The bytes of the compliantButDisallowedServices to add.
* @return This builder for chaining.
*/
public Builder addCompliantButDisallowedServicesBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureCompliantButDisallowedServicesIsMutable();
compliantButDisallowedServices_.add(value);
bitField0_ |= 0x00004000;
onChanged();
return this;
}
private int partner_ = 0;
/**
*
*
*
* Optional. Compliance Regime associated with this workload.
*
*
*
* .google.cloud.assuredworkloads.v1.Workload.Partner partner = 25 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for partner.
*/
@java.lang.Override
public int getPartnerValue() {
return partner_;
}
/**
*
*
*
* Optional. Compliance Regime associated with this workload.
*
*
*
* .google.cloud.assuredworkloads.v1.Workload.Partner partner = 25 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The enum numeric value on the wire for partner to set.
* @return This builder for chaining.
*/
public Builder setPartnerValue(int value) {
partner_ = value;
bitField0_ |= 0x00008000;
onChanged();
return this;
}
/**
*
*
*
* Optional. Compliance Regime associated with this workload.
*
*
*
* .google.cloud.assuredworkloads.v1.Workload.Partner partner = 25 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The partner.
*/
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Workload.Partner getPartner() {
com.google.cloud.assuredworkloads.v1.Workload.Partner result =
com.google.cloud.assuredworkloads.v1.Workload.Partner.forNumber(partner_);
return result == null
? com.google.cloud.assuredworkloads.v1.Workload.Partner.UNRECOGNIZED
: result;
}
/**
*
*
*
* Optional. Compliance Regime associated with this workload.
*
*
*
* .google.cloud.assuredworkloads.v1.Workload.Partner partner = 25 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The partner to set.
* @return This builder for chaining.
*/
public Builder setPartner(com.google.cloud.assuredworkloads.v1.Workload.Partner value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00008000;
partner_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Optional. Compliance Regime associated with this workload.
*
*
*
* .google.cloud.assuredworkloads.v1.Workload.Partner partner = 25 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return This builder for chaining.
*/
public Builder clearPartner() {
bitField0_ = (bitField0_ & ~0x00008000);
partner_ = 0;
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:google.cloud.assuredworkloads.v1.Workload)
}
// @@protoc_insertion_point(class_scope:google.cloud.assuredworkloads.v1.Workload)
private static final com.google.cloud.assuredworkloads.v1.Workload DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.assuredworkloads.v1.Workload();
}
public static com.google.cloud.assuredworkloads.v1.Workload getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Workload parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Workload getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}