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;
/**
*
*
*
* Workload monitoring Violation.
*
*
* Protobuf type {@code google.cloud.assuredworkloads.v1.Violation}
*/
public final class Violation extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.assuredworkloads.v1.Violation)
ViolationOrBuilder {
private static final long serialVersionUID = 0L;
// Use Violation.newBuilder() to construct.
private Violation(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Violation() {
name_ = "";
description_ = "";
category_ = "";
state_ = 0;
orgPolicyConstraint_ = "";
auditLogLink_ = "";
nonCompliantOrgPolicy_ = "";
exceptionAuditLogLink_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Violation();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Violation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Violation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.assuredworkloads.v1.Violation.class,
com.google.cloud.assuredworkloads.v1.Violation.Builder.class);
}
/**
*
*
*
* Violation State Values
*
*
* Protobuf enum {@code google.cloud.assuredworkloads.v1.Violation.State}
*/
public enum State implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
*
* STATE_UNSPECIFIED = 0;
*/
public static final int STATE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* Violation is resolved.
*
*
* RESOLVED = 2;
*/
public static final int RESOLVED_VALUE = 2;
/**
*
*
*
* Violation is Unresolved
*
*
* UNRESOLVED = 3;
*/
public static final int UNRESOLVED_VALUE = 3;
/**
*
*
*
* Violation is Exception
*
*
* EXCEPTION = 4;
*/
public static final int EXCEPTION_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 State 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 State forNumber(int value) {
switch (value) {
case 0:
return STATE_UNSPECIFIED;
case 2:
return RESOLVED;
case 3:
return UNRESOLVED;
case 4:
return EXCEPTION;
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 State findValueByNumber(int number) {
return State.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.Violation.getDescriptor().getEnumTypes().get(0);
}
private static final State[] VALUES = values();
public static State 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 State(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.assuredworkloads.v1.Violation.State)
}
public interface RemediationOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.assuredworkloads.v1.Violation.Remediation)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Required. Remediation instructions to resolve violations
*
*
*
* .google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions instructions = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return Whether the instructions field is set.
*/
boolean hasInstructions();
/**
*
*
*
* Required. Remediation instructions to resolve violations
*
* Values that can resolve the violation
* For example: for list org policy violations, this will either be the list
* of allowed or denied values
*
*
* repeated string compliant_values = 2;
*
* @return A list containing the compliantValues.
*/
java.util.List getCompliantValuesList();
/**
*
*
*
* Values that can resolve the violation
* For example: for list org policy violations, this will either be the list
* of allowed or denied values
*
*
* repeated string compliant_values = 2;
*
* @return The count of compliantValues.
*/
int getCompliantValuesCount();
/**
*
*
*
* Values that can resolve the violation
* For example: for list org policy violations, this will either be the list
* of allowed or denied values
*
*
* repeated string compliant_values = 2;
*
* @param index The index of the element to return.
* @return The compliantValues at the given index.
*/
java.lang.String getCompliantValues(int index);
/**
*
*
*
* Values that can resolve the violation
* For example: for list org policy violations, this will either be the list
* of allowed or denied values
*
*
* repeated string compliant_values = 2;
*
* @param index The index of the value to return.
* @return The bytes of the compliantValues at the given index.
*/
com.google.protobuf.ByteString getCompliantValuesBytes(int index);
/**
*
*
*
* Output only. Reemediation type based on the type of org policy values violated
*
*
*
* .google.cloud.assuredworkloads.v1.Violation.Remediation.RemediationType remediation_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The enum numeric value on the wire for remediationType.
*/
int getRemediationTypeValue();
/**
*
*
*
* Output only. Reemediation type based on the type of org policy values violated
*
* Represents remediation guidance to resolve compliance violation for
* AssuredWorkload
*
*
* Protobuf type {@code google.cloud.assuredworkloads.v1.Violation.Remediation}
*/
public static final class Remediation extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.assuredworkloads.v1.Violation.Remediation)
RemediationOrBuilder {
private static final long serialVersionUID = 0L;
// Use Remediation.newBuilder() to construct.
private Remediation(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Remediation() {
compliantValues_ = com.google.protobuf.LazyStringArrayList.emptyList();
remediationType_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Remediation();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Violation_Remediation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Violation_Remediation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.assuredworkloads.v1.Violation.Remediation.class,
com.google.cloud.assuredworkloads.v1.Violation.Remediation.Builder.class);
}
/**
*
*
*
* Classifying remediation into various types based on the kind of
* violation. For example, violations caused due to changes in boolean org
* policy requires different remediation instructions compared to violation
* caused due to changes in allowed values of list org policy.
*
*
* REMEDIATION_TYPE_UNSPECIFIED = 0;
*/
public static final int REMEDIATION_TYPE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* Remediation type for boolean org policy
*
*
* REMEDIATION_BOOLEAN_ORG_POLICY_VIOLATION = 1;
*/
public static final int REMEDIATION_BOOLEAN_ORG_POLICY_VIOLATION_VALUE = 1;
/**
*
*
*
* Remediation type for list org policy which have allowed values in the
* monitoring rule
*
*
* REMEDIATION_LIST_ALLOWED_VALUES_ORG_POLICY_VIOLATION = 2;
*/
public static final int REMEDIATION_LIST_ALLOWED_VALUES_ORG_POLICY_VIOLATION_VALUE = 2;
/**
*
*
*
* Remediation type for list org policy which have denied values in the
* monitoring rule
*
*
* REMEDIATION_LIST_DENIED_VALUES_ORG_POLICY_VIOLATION = 3;
*/
public static final int REMEDIATION_LIST_DENIED_VALUES_ORG_POLICY_VIOLATION_VALUE = 3;
/**
*
*
*
* Remediation type for gcp.restrictCmekCryptoKeyProjects
*
*
* REMEDIATION_RESTRICT_CMEK_CRYPTO_KEY_PROJECTS_ORG_POLICY_VIOLATION = 4;
*/
public static final int
REMEDIATION_RESTRICT_CMEK_CRYPTO_KEY_PROJECTS_ORG_POLICY_VIOLATION_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 RemediationType 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 RemediationType forNumber(int value) {
switch (value) {
case 0:
return REMEDIATION_TYPE_UNSPECIFIED;
case 1:
return REMEDIATION_BOOLEAN_ORG_POLICY_VIOLATION;
case 2:
return REMEDIATION_LIST_ALLOWED_VALUES_ORG_POLICY_VIOLATION;
case 3:
return REMEDIATION_LIST_DENIED_VALUES_ORG_POLICY_VIOLATION;
case 4:
return REMEDIATION_RESTRICT_CMEK_CRYPTO_KEY_PROJECTS_ORG_POLICY_VIOLATION;
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 RemediationType findValueByNumber(int number) {
return RemediationType.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.Violation.Remediation.getDescriptor()
.getEnumTypes()
.get(0);
}
private static final RemediationType[] VALUES = values();
public static RemediationType 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 RemediationType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.assuredworkloads.v1.Violation.Remediation.RemediationType)
}
public interface InstructionsOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Remediation instructions to resolve violation via gcloud cli
*
*
*
* .google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud gcloud_instructions = 1;
*
*
* @return Whether the gcloudInstructions field is set.
*/
boolean hasGcloudInstructions();
/**
*
*
*
* Remediation instructions to resolve violation via gcloud cli
*
*
* Protobuf type {@code google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions}
*/
public static final class Instructions extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions)
InstructionsOrBuilder {
private static final long serialVersionUID = 0L;
// Use Instructions.newBuilder() to construct.
private Instructions(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Instructions() {}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Instructions();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Violation_Remediation_Instructions_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Violation_Remediation_Instructions_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.class,
com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Builder
.class);
}
public interface GcloudOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Gcloud command to resolve violation
*
*
* repeated string gcloud_commands = 1;
*
* @return A list containing the gcloudCommands.
*/
java.util.List getGcloudCommandsList();
/**
*
*
*
* Gcloud command to resolve violation
*
*
* repeated string gcloud_commands = 1;
*
* @return The count of gcloudCommands.
*/
int getGcloudCommandsCount();
/**
*
*
*
* Gcloud command to resolve violation
*
*
* repeated string gcloud_commands = 1;
*
* @param index The index of the element to return.
* @return The gcloudCommands at the given index.
*/
java.lang.String getGcloudCommands(int index);
/**
*
*
*
* Gcloud command to resolve violation
*
*
* repeated string gcloud_commands = 1;
*
* @param index The index of the value to return.
* @return The bytes of the gcloudCommands at the given index.
*/
com.google.protobuf.ByteString getGcloudCommandsBytes(int index);
/**
*
*
*
* Steps to resolve violation via gcloud cli
*
*
* repeated string steps = 2;
*
* @return A list containing the steps.
*/
java.util.List getStepsList();
/**
*
*
*
* Steps to resolve violation via gcloud cli
*
*
* repeated string steps = 2;
*
* @return The count of steps.
*/
int getStepsCount();
/**
*
*
*
* Steps to resolve violation via gcloud cli
*
*
* repeated string steps = 2;
*
* @param index The index of the element to return.
* @return The steps at the given index.
*/
java.lang.String getSteps(int index);
/**
*
*
*
* Steps to resolve violation via gcloud cli
*
*
* repeated string steps = 2;
*
* @param index The index of the value to return.
* @return The bytes of the steps at the given index.
*/
com.google.protobuf.ByteString getStepsBytes(int index);
/**
*
*
*
* Additional urls for more information about steps
*
*
* repeated string additional_links = 3;
*
* @return A list containing the additionalLinks.
*/
java.util.List getAdditionalLinksList();
/**
*
*
*
* Additional urls for more information about steps
*
*
* repeated string additional_links = 3;
*
* @return The count of additionalLinks.
*/
int getAdditionalLinksCount();
/**
*
*
*
* Additional urls for more information about steps
*
*
* repeated string additional_links = 3;
*
* @param index The index of the element to return.
* @return The additionalLinks at the given index.
*/
java.lang.String getAdditionalLinks(int index);
/**
*
*
*
* Additional urls for more information about steps
*
*
* repeated string additional_links = 3;
*
* @param index The index of the value to return.
* @return The bytes of the additionalLinks at the given index.
*/
com.google.protobuf.ByteString getAdditionalLinksBytes(int index);
}
/**
*
*
*
* Remediation instructions to resolve violation via gcloud cli
*
*
* Protobuf type {@code
* google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud}
*/
public static final class Gcloud extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud)
GcloudOrBuilder {
private static final long serialVersionUID = 0L;
// Use Gcloud.newBuilder() to construct.
private Gcloud(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Gcloud() {
gcloudCommands_ = com.google.protobuf.LazyStringArrayList.emptyList();
steps_ = com.google.protobuf.LazyStringArrayList.emptyList();
additionalLinks_ = com.google.protobuf.LazyStringArrayList.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Gcloud();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Violation_Remediation_Instructions_Gcloud_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Violation_Remediation_Instructions_Gcloud_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud
.class,
com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud
.Builder.class);
}
public static final int GCLOUD_COMMANDS_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList gcloudCommands_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* Gcloud command to resolve violation
*
*
* repeated string gcloud_commands = 1;
*
* @return A list containing the gcloudCommands.
*/
public com.google.protobuf.ProtocolStringList getGcloudCommandsList() {
return gcloudCommands_;
}
/**
*
*
*
* Gcloud command to resolve violation
*
*
* repeated string gcloud_commands = 1;
*
* @return The count of gcloudCommands.
*/
public int getGcloudCommandsCount() {
return gcloudCommands_.size();
}
/**
*
*
*
* Gcloud command to resolve violation
*
*
* repeated string gcloud_commands = 1;
*
* @param index The index of the element to return.
* @return The gcloudCommands at the given index.
*/
public java.lang.String getGcloudCommands(int index) {
return gcloudCommands_.get(index);
}
/**
*
*
*
* Gcloud command to resolve violation
*
*
* repeated string gcloud_commands = 1;
*
* @param index The index of the value to return.
* @return The bytes of the gcloudCommands at the given index.
*/
public com.google.protobuf.ByteString getGcloudCommandsBytes(int index) {
return gcloudCommands_.getByteString(index);
}
public static final int STEPS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList steps_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* Steps to resolve violation via gcloud cli
*
*
* repeated string steps = 2;
*
* @return A list containing the steps.
*/
public com.google.protobuf.ProtocolStringList getStepsList() {
return steps_;
}
/**
*
*
*
* Steps to resolve violation via gcloud cli
*
*
* repeated string steps = 2;
*
* @return The count of steps.
*/
public int getStepsCount() {
return steps_.size();
}
/**
*
*
*
* Steps to resolve violation via gcloud cli
*
*
* repeated string steps = 2;
*
* @param index The index of the element to return.
* @return The steps at the given index.
*/
public java.lang.String getSteps(int index) {
return steps_.get(index);
}
/**
*
*
*
* Steps to resolve violation via gcloud cli
*
*
* repeated string steps = 2;
*
* @param index The index of the value to return.
* @return The bytes of the steps at the given index.
*/
public com.google.protobuf.ByteString getStepsBytes(int index) {
return steps_.getByteString(index);
}
public static final int ADDITIONAL_LINKS_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList additionalLinks_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* Additional urls for more information about steps
*
*
* repeated string additional_links = 3;
*
* @return A list containing the additionalLinks.
*/
public com.google.protobuf.ProtocolStringList getAdditionalLinksList() {
return additionalLinks_;
}
/**
*
*
*
* Additional urls for more information about steps
*
*
* repeated string additional_links = 3;
*
* @return The count of additionalLinks.
*/
public int getAdditionalLinksCount() {
return additionalLinks_.size();
}
/**
*
*
*
* Additional urls for more information about steps
*
*
* repeated string additional_links = 3;
*
* @param index The index of the element to return.
* @return The additionalLinks at the given index.
*/
public java.lang.String getAdditionalLinks(int index) {
return additionalLinks_.get(index);
}
/**
*
*
*
* Additional urls for more information about steps
*
*
* repeated string additional_links = 3;
*
* @param index The index of the value to return.
* @return The bytes of the additionalLinks at the given index.
*/
public com.google.protobuf.ByteString getAdditionalLinksBytes(int index) {
return additionalLinks_.getByteString(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < gcloudCommands_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(
output, 1, gcloudCommands_.getRaw(i));
}
for (int i = 0; i < steps_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, steps_.getRaw(i));
}
for (int i = 0; i < additionalLinks_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(
output, 3, additionalLinks_.getRaw(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < gcloudCommands_.size(); i++) {
dataSize += computeStringSizeNoTag(gcloudCommands_.getRaw(i));
}
size += dataSize;
size += 1 * getGcloudCommandsList().size();
}
{
int dataSize = 0;
for (int i = 0; i < steps_.size(); i++) {
dataSize += computeStringSizeNoTag(steps_.getRaw(i));
}
size += dataSize;
size += 1 * getStepsList().size();
}
{
int dataSize = 0;
for (int i = 0; i < additionalLinks_.size(); i++) {
dataSize += computeStringSizeNoTag(additionalLinks_.getRaw(i));
}
size += dataSize;
size += 1 * getAdditionalLinksList().size();
}
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.Violation.Remediation.Instructions.Gcloud)) {
return super.equals(obj);
}
com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud other =
(com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud) obj;
if (!getGcloudCommandsList().equals(other.getGcloudCommandsList())) return false;
if (!getStepsList().equals(other.getStepsList())) return false;
if (!getAdditionalLinksList().equals(other.getAdditionalLinksList())) 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 (getGcloudCommandsCount() > 0) {
hash = (37 * hash) + GCLOUD_COMMANDS_FIELD_NUMBER;
hash = (53 * hash) + getGcloudCommandsList().hashCode();
}
if (getStepsCount() > 0) {
hash = (37 * hash) + STEPS_FIELD_NUMBER;
hash = (53 * hash) + getStepsList().hashCode();
}
if (getAdditionalLinksCount() > 0) {
hash = (37 * hash) + ADDITIONAL_LINKS_FIELD_NUMBER;
hash = (53 * hash) + getAdditionalLinksList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud
parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud
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.Violation.Remediation.Instructions.Gcloud
parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud
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.Violation.Remediation.Instructions.Gcloud
parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud
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.Violation.Remediation.Instructions.Gcloud
parseFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud
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.Violation.Remediation.Instructions.Gcloud
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input);
}
public static com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud
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.Violation.Remediation.Instructions.Gcloud
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.Violation.Remediation.Instructions.Gcloud
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.Violation.Remediation.Instructions.Gcloud
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;
}
/**
*
*
*
* Remediation instructions to resolve violation via gcloud cli
*
*
* Protobuf type {@code
* google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud)
com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions
.GcloudOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Violation_Remediation_Instructions_Gcloud_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Violation_Remediation_Instructions_Gcloud_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud
.class,
com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud
.Builder.class);
}
// Construct using
// com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
gcloudCommands_ = com.google.protobuf.LazyStringArrayList.emptyList();
steps_ = com.google.protobuf.LazyStringArrayList.emptyList();
additionalLinks_ = com.google.protobuf.LazyStringArrayList.emptyList();
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_Violation_Remediation_Instructions_Gcloud_descriptor;
}
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud
getDefaultInstanceForType() {
return com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud
build() {
com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud
buildPartial() {
com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud result =
new com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud(
this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud
result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
gcloudCommands_.makeImmutable();
result.gcloudCommands_ = gcloudCommands_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
steps_.makeImmutable();
result.steps_ = steps_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
additionalLinks_.makeImmutable();
result.additionalLinks_ = additionalLinks_;
}
}
@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.Violation.Remediation.Instructions.Gcloud) {
return mergeFrom(
(com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud)
other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud
other) {
if (other
== com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud
.getDefaultInstance()) return this;
if (!other.gcloudCommands_.isEmpty()) {
if (gcloudCommands_.isEmpty()) {
gcloudCommands_ = other.gcloudCommands_;
bitField0_ |= 0x00000001;
} else {
ensureGcloudCommandsIsMutable();
gcloudCommands_.addAll(other.gcloudCommands_);
}
onChanged();
}
if (!other.steps_.isEmpty()) {
if (steps_.isEmpty()) {
steps_ = other.steps_;
bitField0_ |= 0x00000002;
} else {
ensureStepsIsMutable();
steps_.addAll(other.steps_);
}
onChanged();
}
if (!other.additionalLinks_.isEmpty()) {
if (additionalLinks_.isEmpty()) {
additionalLinks_ = other.additionalLinks_;
bitField0_ |= 0x00000004;
} else {
ensureAdditionalLinksIsMutable();
additionalLinks_.addAll(other.additionalLinks_);
}
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:
{
java.lang.String s = input.readStringRequireUtf8();
ensureGcloudCommandsIsMutable();
gcloudCommands_.add(s);
break;
} // case 10
case 18:
{
java.lang.String s = input.readStringRequireUtf8();
ensureStepsIsMutable();
steps_.add(s);
break;
} // case 18
case 26:
{
java.lang.String s = input.readStringRequireUtf8();
ensureAdditionalLinksIsMutable();
additionalLinks_.add(s);
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 com.google.protobuf.LazyStringArrayList gcloudCommands_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureGcloudCommandsIsMutable() {
if (!gcloudCommands_.isModifiable()) {
gcloudCommands_ = new com.google.protobuf.LazyStringArrayList(gcloudCommands_);
}
bitField0_ |= 0x00000001;
}
/**
*
*
*
* Gcloud command to resolve violation
*
*
* repeated string gcloud_commands = 1;
*
* @return A list containing the gcloudCommands.
*/
public com.google.protobuf.ProtocolStringList getGcloudCommandsList() {
gcloudCommands_.makeImmutable();
return gcloudCommands_;
}
/**
*
*
*
* Gcloud command to resolve violation
*
*
* repeated string gcloud_commands = 1;
*
* @return The count of gcloudCommands.
*/
public int getGcloudCommandsCount() {
return gcloudCommands_.size();
}
/**
*
*
*
* Gcloud command to resolve violation
*
*
* repeated string gcloud_commands = 1;
*
* @param index The index of the element to return.
* @return The gcloudCommands at the given index.
*/
public java.lang.String getGcloudCommands(int index) {
return gcloudCommands_.get(index);
}
/**
*
*
*
* Gcloud command to resolve violation
*
*
* repeated string gcloud_commands = 1;
*
* @param index The index of the value to return.
* @return The bytes of the gcloudCommands at the given index.
*/
public com.google.protobuf.ByteString getGcloudCommandsBytes(int index) {
return gcloudCommands_.getByteString(index);
}
/**
*
*
*
* Gcloud command to resolve violation
*
*
* repeated string gcloud_commands = 1;
*
* @param index The index to set the value at.
* @param value The gcloudCommands to set.
* @return This builder for chaining.
*/
public Builder setGcloudCommands(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureGcloudCommandsIsMutable();
gcloudCommands_.set(index, value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Gcloud command to resolve violation
*
*
* repeated string gcloud_commands = 1;
*
* @param value The gcloudCommands to add.
* @return This builder for chaining.
*/
public Builder addGcloudCommands(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureGcloudCommandsIsMutable();
gcloudCommands_.add(value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Gcloud command to resolve violation
*
*
* repeated string gcloud_commands = 1;
*
* @param values The gcloudCommands to add.
* @return This builder for chaining.
*/
public Builder addAllGcloudCommands(java.lang.Iterable values) {
ensureGcloudCommandsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, gcloudCommands_);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
*
* repeated string gcloud_commands = 1;
*
* @param value The bytes of the gcloudCommands to add.
* @return This builder for chaining.
*/
public Builder addGcloudCommandsBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureGcloudCommandsIsMutable();
gcloudCommands_.add(value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList steps_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureStepsIsMutable() {
if (!steps_.isModifiable()) {
steps_ = new com.google.protobuf.LazyStringArrayList(steps_);
}
bitField0_ |= 0x00000002;
}
/**
*
*
*
* Steps to resolve violation via gcloud cli
*
*
* repeated string steps = 2;
*
* @return A list containing the steps.
*/
public com.google.protobuf.ProtocolStringList getStepsList() {
steps_.makeImmutable();
return steps_;
}
/**
*
*
*
* Steps to resolve violation via gcloud cli
*
*
* repeated string steps = 2;
*
* @return The count of steps.
*/
public int getStepsCount() {
return steps_.size();
}
/**
*
*
*
* Steps to resolve violation via gcloud cli
*
*
* repeated string steps = 2;
*
* @param index The index of the element to return.
* @return The steps at the given index.
*/
public java.lang.String getSteps(int index) {
return steps_.get(index);
}
/**
*
*
*
* Steps to resolve violation via gcloud cli
*
*
* repeated string steps = 2;
*
* @param index The index of the value to return.
* @return The bytes of the steps at the given index.
*/
public com.google.protobuf.ByteString getStepsBytes(int index) {
return steps_.getByteString(index);
}
/**
*
*
*
* Steps to resolve violation via gcloud cli
*
*
* repeated string steps = 2;
*
* @param index The index to set the value at.
* @param value The steps to set.
* @return This builder for chaining.
*/
public Builder setSteps(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureStepsIsMutable();
steps_.set(index, value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Steps to resolve violation via gcloud cli
*
*
* repeated string steps = 2;
*
* @param value The steps to add.
* @return This builder for chaining.
*/
public Builder addSteps(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureStepsIsMutable();
steps_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Steps to resolve violation via gcloud cli
*
*
* repeated string steps = 2;
*
* @param values The steps to add.
* @return This builder for chaining.
*/
public Builder addAllSteps(java.lang.Iterable values) {
ensureStepsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, steps_);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
*
* repeated string steps = 2;
*
* @param value The bytes of the steps to add.
* @return This builder for chaining.
*/
public Builder addStepsBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureStepsIsMutable();
steps_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList additionalLinks_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureAdditionalLinksIsMutable() {
if (!additionalLinks_.isModifiable()) {
additionalLinks_ = new com.google.protobuf.LazyStringArrayList(additionalLinks_);
}
bitField0_ |= 0x00000004;
}
/**
*
*
*
* Additional urls for more information about steps
*
*
* repeated string additional_links = 3;
*
* @return A list containing the additionalLinks.
*/
public com.google.protobuf.ProtocolStringList getAdditionalLinksList() {
additionalLinks_.makeImmutable();
return additionalLinks_;
}
/**
*
*
*
* Additional urls for more information about steps
*
*
* repeated string additional_links = 3;
*
* @return The count of additionalLinks.
*/
public int getAdditionalLinksCount() {
return additionalLinks_.size();
}
/**
*
*
*
* Additional urls for more information about steps
*
*
* repeated string additional_links = 3;
*
* @param index The index of the element to return.
* @return The additionalLinks at the given index.
*/
public java.lang.String getAdditionalLinks(int index) {
return additionalLinks_.get(index);
}
/**
*
*
*
* Additional urls for more information about steps
*
*
* repeated string additional_links = 3;
*
* @param index The index of the value to return.
* @return The bytes of the additionalLinks at the given index.
*/
public com.google.protobuf.ByteString getAdditionalLinksBytes(int index) {
return additionalLinks_.getByteString(index);
}
/**
*
*
*
* Additional urls for more information about steps
*
*
* repeated string additional_links = 3;
*
* @param index The index to set the value at.
* @param value The additionalLinks to set.
* @return This builder for chaining.
*/
public Builder setAdditionalLinks(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureAdditionalLinksIsMutable();
additionalLinks_.set(index, value);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Additional urls for more information about steps
*
*
* repeated string additional_links = 3;
*
* @param value The additionalLinks to add.
* @return This builder for chaining.
*/
public Builder addAdditionalLinks(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureAdditionalLinksIsMutable();
additionalLinks_.add(value);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Additional urls for more information about steps
*
*
* repeated string additional_links = 3;
*
* @param values The additionalLinks to add.
* @return This builder for chaining.
*/
public Builder addAllAdditionalLinks(java.lang.Iterable values) {
ensureAdditionalLinksIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, additionalLinks_);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Additional urls for more information about steps
*
* Additional urls for more information about steps
*
*
* repeated string additional_links = 3;
*
* @param value The bytes of the additionalLinks to add.
* @return This builder for chaining.
*/
public Builder addAdditionalLinksBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureAdditionalLinksIsMutable();
additionalLinks_.add(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.Violation.Remediation.Instructions.Gcloud)
}
// @@protoc_insertion_point(class_scope:google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud)
private static final com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions
.Gcloud
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud();
}
public static com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Gcloud
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Gcloud 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.Violation.Remediation.Instructions.Gcloud
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ConsoleOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Console)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Link to console page where violations can be resolved
*
*
* repeated string console_uris = 1;
*
* @return A list containing the consoleUris.
*/
java.util.List getConsoleUrisList();
/**
*
*
*
* Link to console page where violations can be resolved
*
*
* repeated string console_uris = 1;
*
* @return The count of consoleUris.
*/
int getConsoleUrisCount();
/**
*
*
*
* Link to console page where violations can be resolved
*
*
* repeated string console_uris = 1;
*
* @param index The index of the element to return.
* @return The consoleUris at the given index.
*/
java.lang.String getConsoleUris(int index);
/**
*
*
*
* Link to console page where violations can be resolved
*
*
* repeated string console_uris = 1;
*
* @param index The index of the value to return.
* @return The bytes of the consoleUris at the given index.
*/
com.google.protobuf.ByteString getConsoleUrisBytes(int index);
/**
*
*
*
* Steps to resolve violation via cloud console
*
*
* repeated string steps = 2;
*
* @return A list containing the steps.
*/
java.util.List getStepsList();
/**
*
*
*
* Steps to resolve violation via cloud console
*
*
* repeated string steps = 2;
*
* @return The count of steps.
*/
int getStepsCount();
/**
*
*
*
* Steps to resolve violation via cloud console
*
*
* repeated string steps = 2;
*
* @param index The index of the element to return.
* @return The steps at the given index.
*/
java.lang.String getSteps(int index);
/**
*
*
*
* Steps to resolve violation via cloud console
*
*
* repeated string steps = 2;
*
* @param index The index of the value to return.
* @return The bytes of the steps at the given index.
*/
com.google.protobuf.ByteString getStepsBytes(int index);
/**
*
*
*
* Additional urls for more information about steps
*
*
* repeated string additional_links = 3;
*
* @return A list containing the additionalLinks.
*/
java.util.List getAdditionalLinksList();
/**
*
*
*
* Additional urls for more information about steps
*
*
* repeated string additional_links = 3;
*
* @return The count of additionalLinks.
*/
int getAdditionalLinksCount();
/**
*
*
*
* Additional urls for more information about steps
*
*
* repeated string additional_links = 3;
*
* @param index The index of the element to return.
* @return The additionalLinks at the given index.
*/
java.lang.String getAdditionalLinks(int index);
/**
*
*
*
* Additional urls for more information about steps
*
*
* repeated string additional_links = 3;
*
* @param index The index of the value to return.
* @return The bytes of the additionalLinks at the given index.
*/
com.google.protobuf.ByteString getAdditionalLinksBytes(int index);
}
/**
*
*
*
* Remediation instructions to resolve violation via cloud console
*
*
* Protobuf type {@code
* google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Console}
*/
public static final class Console extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Console)
ConsoleOrBuilder {
private static final long serialVersionUID = 0L;
// Use Console.newBuilder() to construct.
private Console(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Console() {
consoleUris_ = com.google.protobuf.LazyStringArrayList.emptyList();
steps_ = com.google.protobuf.LazyStringArrayList.emptyList();
additionalLinks_ = com.google.protobuf.LazyStringArrayList.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Console();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Violation_Remediation_Instructions_Console_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Violation_Remediation_Instructions_Console_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Console
.class,
com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Console
.Builder.class);
}
public static final int CONSOLE_URIS_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList consoleUris_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* Link to console page where violations can be resolved
*
*
* repeated string console_uris = 1;
*
* @return A list containing the consoleUris.
*/
public com.google.protobuf.ProtocolStringList getConsoleUrisList() {
return consoleUris_;
}
/**
*
*
*
* Link to console page where violations can be resolved
*
*
* repeated string console_uris = 1;
*
* @return The count of consoleUris.
*/
public int getConsoleUrisCount() {
return consoleUris_.size();
}
/**
*
*
*
* Link to console page where violations can be resolved
*
*
* repeated string console_uris = 1;
*
* @param index The index of the element to return.
* @return The consoleUris at the given index.
*/
public java.lang.String getConsoleUris(int index) {
return consoleUris_.get(index);
}
/**
*
*
*
* Link to console page where violations can be resolved
*
*
* repeated string console_uris = 1;
*
* @param index The index of the value to return.
* @return The bytes of the consoleUris at the given index.
*/
public com.google.protobuf.ByteString getConsoleUrisBytes(int index) {
return consoleUris_.getByteString(index);
}
public static final int STEPS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList steps_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* Steps to resolve violation via cloud console
*
*
* repeated string steps = 2;
*
* @return A list containing the steps.
*/
public com.google.protobuf.ProtocolStringList getStepsList() {
return steps_;
}
/**
*
*
*
* Steps to resolve violation via cloud console
*
*
* repeated string steps = 2;
*
* @return The count of steps.
*/
public int getStepsCount() {
return steps_.size();
}
/**
*
*
*
* Steps to resolve violation via cloud console
*
*
* repeated string steps = 2;
*
* @param index The index of the element to return.
* @return The steps at the given index.
*/
public java.lang.String getSteps(int index) {
return steps_.get(index);
}
/**
*
*
*
* Steps to resolve violation via cloud console
*
*
* repeated string steps = 2;
*
* @param index The index of the value to return.
* @return The bytes of the steps at the given index.
*/
public com.google.protobuf.ByteString getStepsBytes(int index) {
return steps_.getByteString(index);
}
public static final int ADDITIONAL_LINKS_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList additionalLinks_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* Additional urls for more information about steps
*
*
* repeated string additional_links = 3;
*
* @return A list containing the additionalLinks.
*/
public com.google.protobuf.ProtocolStringList getAdditionalLinksList() {
return additionalLinks_;
}
/**
*
*
*
* Additional urls for more information about steps
*
*
* repeated string additional_links = 3;
*
* @return The count of additionalLinks.
*/
public int getAdditionalLinksCount() {
return additionalLinks_.size();
}
/**
*
*
*
* Additional urls for more information about steps
*
*
* repeated string additional_links = 3;
*
* @param index The index of the element to return.
* @return The additionalLinks at the given index.
*/
public java.lang.String getAdditionalLinks(int index) {
return additionalLinks_.get(index);
}
/**
*
*
*
* Additional urls for more information about steps
*
*
* repeated string additional_links = 3;
*
* @param index The index of the value to return.
* @return The bytes of the additionalLinks at the given index.
*/
public com.google.protobuf.ByteString getAdditionalLinksBytes(int index) {
return additionalLinks_.getByteString(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < consoleUris_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, consoleUris_.getRaw(i));
}
for (int i = 0; i < steps_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, steps_.getRaw(i));
}
for (int i = 0; i < additionalLinks_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(
output, 3, additionalLinks_.getRaw(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < consoleUris_.size(); i++) {
dataSize += computeStringSizeNoTag(consoleUris_.getRaw(i));
}
size += dataSize;
size += 1 * getConsoleUrisList().size();
}
{
int dataSize = 0;
for (int i = 0; i < steps_.size(); i++) {
dataSize += computeStringSizeNoTag(steps_.getRaw(i));
}
size += dataSize;
size += 1 * getStepsList().size();
}
{
int dataSize = 0;
for (int i = 0; i < additionalLinks_.size(); i++) {
dataSize += computeStringSizeNoTag(additionalLinks_.getRaw(i));
}
size += dataSize;
size += 1 * getAdditionalLinksList().size();
}
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.Violation.Remediation.Instructions.Console)) {
return super.equals(obj);
}
com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Console other =
(com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Console) obj;
if (!getConsoleUrisList().equals(other.getConsoleUrisList())) return false;
if (!getStepsList().equals(other.getStepsList())) return false;
if (!getAdditionalLinksList().equals(other.getAdditionalLinksList())) 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 (getConsoleUrisCount() > 0) {
hash = (37 * hash) + CONSOLE_URIS_FIELD_NUMBER;
hash = (53 * hash) + getConsoleUrisList().hashCode();
}
if (getStepsCount() > 0) {
hash = (37 * hash) + STEPS_FIELD_NUMBER;
hash = (53 * hash) + getStepsList().hashCode();
}
if (getAdditionalLinksCount() > 0) {
hash = (37 * hash) + ADDITIONAL_LINKS_FIELD_NUMBER;
hash = (53 * hash) + getAdditionalLinksList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions
.Console
parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions
.Console
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.Violation.Remediation.Instructions
.Console
parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions
.Console
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.Violation.Remediation.Instructions
.Console
parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions
.Console
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.Violation.Remediation.Instructions
.Console
parseFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions
.Console
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.Violation.Remediation.Instructions
.Console
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input);
}
public static com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions
.Console
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.Violation.Remediation.Instructions
.Console
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.Violation.Remediation.Instructions
.Console
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.Violation.Remediation.Instructions.Console
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;
}
/**
*
*
*
* Remediation instructions to resolve violation via cloud console
*
*
* Protobuf type {@code
* google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Console}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Console)
com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions
.ConsoleOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Violation_Remediation_Instructions_Console_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Violation_Remediation_Instructions_Console_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Console
.class,
com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Console
.Builder.class);
}
// Construct using
// com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Console.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
consoleUris_ = com.google.protobuf.LazyStringArrayList.emptyList();
steps_ = com.google.protobuf.LazyStringArrayList.emptyList();
additionalLinks_ = com.google.protobuf.LazyStringArrayList.emptyList();
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_Violation_Remediation_Instructions_Console_descriptor;
}
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Console
getDefaultInstanceForType() {
return com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Console
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Console
build() {
com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Console result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Console
buildPartial() {
com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Console result =
new com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Console(
this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Console
result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
consoleUris_.makeImmutable();
result.consoleUris_ = consoleUris_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
steps_.makeImmutable();
result.steps_ = steps_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
additionalLinks_.makeImmutable();
result.additionalLinks_ = additionalLinks_;
}
}
@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.Violation.Remediation.Instructions.Console) {
return mergeFrom(
(com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Console)
other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Console
other) {
if (other
== com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Console
.getDefaultInstance()) return this;
if (!other.consoleUris_.isEmpty()) {
if (consoleUris_.isEmpty()) {
consoleUris_ = other.consoleUris_;
bitField0_ |= 0x00000001;
} else {
ensureConsoleUrisIsMutable();
consoleUris_.addAll(other.consoleUris_);
}
onChanged();
}
if (!other.steps_.isEmpty()) {
if (steps_.isEmpty()) {
steps_ = other.steps_;
bitField0_ |= 0x00000002;
} else {
ensureStepsIsMutable();
steps_.addAll(other.steps_);
}
onChanged();
}
if (!other.additionalLinks_.isEmpty()) {
if (additionalLinks_.isEmpty()) {
additionalLinks_ = other.additionalLinks_;
bitField0_ |= 0x00000004;
} else {
ensureAdditionalLinksIsMutable();
additionalLinks_.addAll(other.additionalLinks_);
}
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:
{
java.lang.String s = input.readStringRequireUtf8();
ensureConsoleUrisIsMutable();
consoleUris_.add(s);
break;
} // case 10
case 18:
{
java.lang.String s = input.readStringRequireUtf8();
ensureStepsIsMutable();
steps_.add(s);
break;
} // case 18
case 26:
{
java.lang.String s = input.readStringRequireUtf8();
ensureAdditionalLinksIsMutable();
additionalLinks_.add(s);
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 com.google.protobuf.LazyStringArrayList consoleUris_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureConsoleUrisIsMutable() {
if (!consoleUris_.isModifiable()) {
consoleUris_ = new com.google.protobuf.LazyStringArrayList(consoleUris_);
}
bitField0_ |= 0x00000001;
}
/**
*
*
*
* Link to console page where violations can be resolved
*
*
* repeated string console_uris = 1;
*
* @return A list containing the consoleUris.
*/
public com.google.protobuf.ProtocolStringList getConsoleUrisList() {
consoleUris_.makeImmutable();
return consoleUris_;
}
/**
*
*
*
* Link to console page where violations can be resolved
*
*
* repeated string console_uris = 1;
*
* @return The count of consoleUris.
*/
public int getConsoleUrisCount() {
return consoleUris_.size();
}
/**
*
*
*
* Link to console page where violations can be resolved
*
*
* repeated string console_uris = 1;
*
* @param index The index of the element to return.
* @return The consoleUris at the given index.
*/
public java.lang.String getConsoleUris(int index) {
return consoleUris_.get(index);
}
/**
*
*
*
* Link to console page where violations can be resolved
*
*
* repeated string console_uris = 1;
*
* @param index The index of the value to return.
* @return The bytes of the consoleUris at the given index.
*/
public com.google.protobuf.ByteString getConsoleUrisBytes(int index) {
return consoleUris_.getByteString(index);
}
/**
*
*
*
* Link to console page where violations can be resolved
*
*
* repeated string console_uris = 1;
*
* @param index The index to set the value at.
* @param value The consoleUris to set.
* @return This builder for chaining.
*/
public Builder setConsoleUris(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureConsoleUrisIsMutable();
consoleUris_.set(index, value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Link to console page where violations can be resolved
*
*
* repeated string console_uris = 1;
*
* @param value The consoleUris to add.
* @return This builder for chaining.
*/
public Builder addConsoleUris(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureConsoleUrisIsMutable();
consoleUris_.add(value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Link to console page where violations can be resolved
*
*
* repeated string console_uris = 1;
*
* @param values The consoleUris to add.
* @return This builder for chaining.
*/
public Builder addAllConsoleUris(java.lang.Iterable values) {
ensureConsoleUrisIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, consoleUris_);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Link to console page where violations can be resolved
*
* Link to console page where violations can be resolved
*
*
* repeated string console_uris = 1;
*
* @param value The bytes of the consoleUris to add.
* @return This builder for chaining.
*/
public Builder addConsoleUrisBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureConsoleUrisIsMutable();
consoleUris_.add(value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList steps_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureStepsIsMutable() {
if (!steps_.isModifiable()) {
steps_ = new com.google.protobuf.LazyStringArrayList(steps_);
}
bitField0_ |= 0x00000002;
}
/**
*
*
*
* Steps to resolve violation via cloud console
*
*
* repeated string steps = 2;
*
* @return A list containing the steps.
*/
public com.google.protobuf.ProtocolStringList getStepsList() {
steps_.makeImmutable();
return steps_;
}
/**
*
*
*
* Steps to resolve violation via cloud console
*
*
* repeated string steps = 2;
*
* @return The count of steps.
*/
public int getStepsCount() {
return steps_.size();
}
/**
*
*
*
* Steps to resolve violation via cloud console
*
*
* repeated string steps = 2;
*
* @param index The index of the element to return.
* @return The steps at the given index.
*/
public java.lang.String getSteps(int index) {
return steps_.get(index);
}
/**
*
*
*
* Steps to resolve violation via cloud console
*
*
* repeated string steps = 2;
*
* @param index The index of the value to return.
* @return The bytes of the steps at the given index.
*/
public com.google.protobuf.ByteString getStepsBytes(int index) {
return steps_.getByteString(index);
}
/**
*
*
*
* Steps to resolve violation via cloud console
*
*
* repeated string steps = 2;
*
* @param index The index to set the value at.
* @param value The steps to set.
* @return This builder for chaining.
*/
public Builder setSteps(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureStepsIsMutable();
steps_.set(index, value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Steps to resolve violation via cloud console
*
*
* repeated string steps = 2;
*
* @param value The steps to add.
* @return This builder for chaining.
*/
public Builder addSteps(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureStepsIsMutable();
steps_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Steps to resolve violation via cloud console
*
*
* repeated string steps = 2;
*
* @param values The steps to add.
* @return This builder for chaining.
*/
public Builder addAllSteps(java.lang.Iterable values) {
ensureStepsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, steps_);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
*
* repeated string steps = 2;
*
* @param value The bytes of the steps to add.
* @return This builder for chaining.
*/
public Builder addStepsBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureStepsIsMutable();
steps_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList additionalLinks_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureAdditionalLinksIsMutable() {
if (!additionalLinks_.isModifiable()) {
additionalLinks_ = new com.google.protobuf.LazyStringArrayList(additionalLinks_);
}
bitField0_ |= 0x00000004;
}
/**
*
*
*
* Additional urls for more information about steps
*
*
* repeated string additional_links = 3;
*
* @return A list containing the additionalLinks.
*/
public com.google.protobuf.ProtocolStringList getAdditionalLinksList() {
additionalLinks_.makeImmutable();
return additionalLinks_;
}
/**
*
*
*
* Additional urls for more information about steps
*
*
* repeated string additional_links = 3;
*
* @return The count of additionalLinks.
*/
public int getAdditionalLinksCount() {
return additionalLinks_.size();
}
/**
*
*
*
* Additional urls for more information about steps
*
*
* repeated string additional_links = 3;
*
* @param index The index of the element to return.
* @return The additionalLinks at the given index.
*/
public java.lang.String getAdditionalLinks(int index) {
return additionalLinks_.get(index);
}
/**
*
*
*
* Additional urls for more information about steps
*
*
* repeated string additional_links = 3;
*
* @param index The index of the value to return.
* @return The bytes of the additionalLinks at the given index.
*/
public com.google.protobuf.ByteString getAdditionalLinksBytes(int index) {
return additionalLinks_.getByteString(index);
}
/**
*
*
*
* Additional urls for more information about steps
*
*
* repeated string additional_links = 3;
*
* @param index The index to set the value at.
* @param value The additionalLinks to set.
* @return This builder for chaining.
*/
public Builder setAdditionalLinks(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureAdditionalLinksIsMutable();
additionalLinks_.set(index, value);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Additional urls for more information about steps
*
*
* repeated string additional_links = 3;
*
* @param value The additionalLinks to add.
* @return This builder for chaining.
*/
public Builder addAdditionalLinks(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureAdditionalLinksIsMutable();
additionalLinks_.add(value);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Additional urls for more information about steps
*
*
* repeated string additional_links = 3;
*
* @param values The additionalLinks to add.
* @return This builder for chaining.
*/
public Builder addAllAdditionalLinks(java.lang.Iterable values) {
ensureAdditionalLinksIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, additionalLinks_);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Additional urls for more information about steps
*
* Values that can resolve the violation
* For example: for list org policy violations, this will either be the list
* of allowed or denied values
*
*
* repeated string compliant_values = 2;
*
* @return A list containing the compliantValues.
*/
public com.google.protobuf.ProtocolStringList getCompliantValuesList() {
return compliantValues_;
}
/**
*
*
*
* Values that can resolve the violation
* For example: for list org policy violations, this will either be the list
* of allowed or denied values
*
*
* repeated string compliant_values = 2;
*
* @return The count of compliantValues.
*/
public int getCompliantValuesCount() {
return compliantValues_.size();
}
/**
*
*
*
* Values that can resolve the violation
* For example: for list org policy violations, this will either be the list
* of allowed or denied values
*
*
* repeated string compliant_values = 2;
*
* @param index The index of the element to return.
* @return The compliantValues at the given index.
*/
public java.lang.String getCompliantValues(int index) {
return compliantValues_.get(index);
}
/**
*
*
*
* Values that can resolve the violation
* For example: for list org policy violations, this will either be the list
* of allowed or denied values
*
*
* repeated string compliant_values = 2;
*
* @param index The index of the value to return.
* @return The bytes of the compliantValues at the given index.
*/
public com.google.protobuf.ByteString getCompliantValuesBytes(int index) {
return compliantValues_.getByteString(index);
}
public static final int REMEDIATION_TYPE_FIELD_NUMBER = 3;
private int remediationType_ = 0;
/**
*
*
*
* Output only. Reemediation type based on the type of org policy values violated
*
*
*
* .google.cloud.assuredworkloads.v1.Violation.Remediation.RemediationType remediation_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The enum numeric value on the wire for remediationType.
*/
@java.lang.Override
public int getRemediationTypeValue() {
return remediationType_;
}
/**
*
*
*
* Output only. Reemediation type based on the type of org policy values violated
*
*
*
* .google.cloud.assuredworkloads.v1.Violation.Remediation.RemediationType remediation_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The remediationType.
*/
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Violation.Remediation.RemediationType
getRemediationType() {
com.google.cloud.assuredworkloads.v1.Violation.Remediation.RemediationType result =
com.google.cloud.assuredworkloads.v1.Violation.Remediation.RemediationType.forNumber(
remediationType_);
return result == null
? com.google.cloud.assuredworkloads.v1.Violation.Remediation.RemediationType.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 (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getInstructions());
}
for (int i = 0; i < compliantValues_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, compliantValues_.getRaw(i));
}
if (remediationType_
!= com.google.cloud.assuredworkloads.v1.Violation.Remediation.RemediationType
.REMEDIATION_TYPE_UNSPECIFIED
.getNumber()) {
output.writeEnum(3, remediationType_);
}
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.computeMessageSize(1, getInstructions());
}
{
int dataSize = 0;
for (int i = 0; i < compliantValues_.size(); i++) {
dataSize += computeStringSizeNoTag(compliantValues_.getRaw(i));
}
size += dataSize;
size += 1 * getCompliantValuesList().size();
}
if (remediationType_
!= com.google.cloud.assuredworkloads.v1.Violation.Remediation.RemediationType
.REMEDIATION_TYPE_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, remediationType_);
}
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.Violation.Remediation)) {
return super.equals(obj);
}
com.google.cloud.assuredworkloads.v1.Violation.Remediation other =
(com.google.cloud.assuredworkloads.v1.Violation.Remediation) obj;
if (hasInstructions() != other.hasInstructions()) return false;
if (hasInstructions()) {
if (!getInstructions().equals(other.getInstructions())) return false;
}
if (!getCompliantValuesList().equals(other.getCompliantValuesList())) return false;
if (remediationType_ != other.remediationType_) 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 (hasInstructions()) {
hash = (37 * hash) + INSTRUCTIONS_FIELD_NUMBER;
hash = (53 * hash) + getInstructions().hashCode();
}
if (getCompliantValuesCount() > 0) {
hash = (37 * hash) + COMPLIANT_VALUES_FIELD_NUMBER;
hash = (53 * hash) + getCompliantValuesList().hashCode();
}
hash = (37 * hash) + REMEDIATION_TYPE_FIELD_NUMBER;
hash = (53 * hash) + remediationType_;
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.assuredworkloads.v1.Violation.Remediation parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.assuredworkloads.v1.Violation.Remediation 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.Violation.Remediation parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.assuredworkloads.v1.Violation.Remediation 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.Violation.Remediation parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.assuredworkloads.v1.Violation.Remediation 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.Violation.Remediation parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.assuredworkloads.v1.Violation.Remediation 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.Violation.Remediation parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.assuredworkloads.v1.Violation.Remediation 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.Violation.Remediation 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.Violation.Remediation 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.Violation.Remediation 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;
}
/**
*
*
*
* Represents remediation guidance to resolve compliance violation for
* AssuredWorkload
*
*
* Protobuf type {@code google.cloud.assuredworkloads.v1.Violation.Remediation}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.assuredworkloads.v1.Violation.Remediation)
com.google.cloud.assuredworkloads.v1.Violation.RemediationOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Violation_Remediation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Violation_Remediation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.assuredworkloads.v1.Violation.Remediation.class,
com.google.cloud.assuredworkloads.v1.Violation.Remediation.Builder.class);
}
// Construct using com.google.cloud.assuredworkloads.v1.Violation.Remediation.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getInstructionsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
instructions_ = null;
if (instructionsBuilder_ != null) {
instructionsBuilder_.dispose();
instructionsBuilder_ = null;
}
compliantValues_ = com.google.protobuf.LazyStringArrayList.emptyList();
remediationType_ = 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_Violation_Remediation_descriptor;
}
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Violation.Remediation
getDefaultInstanceForType() {
return com.google.cloud.assuredworkloads.v1.Violation.Remediation.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Violation.Remediation build() {
com.google.cloud.assuredworkloads.v1.Violation.Remediation result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Violation.Remediation buildPartial() {
com.google.cloud.assuredworkloads.v1.Violation.Remediation result =
new com.google.cloud.assuredworkloads.v1.Violation.Remediation(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.assuredworkloads.v1.Violation.Remediation result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.instructions_ =
instructionsBuilder_ == null ? instructions_ : instructionsBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
compliantValues_.makeImmutable();
result.compliantValues_ = compliantValues_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.remediationType_ = remediationType_;
}
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.Violation.Remediation) {
return mergeFrom((com.google.cloud.assuredworkloads.v1.Violation.Remediation) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.assuredworkloads.v1.Violation.Remediation other) {
if (other
== com.google.cloud.assuredworkloads.v1.Violation.Remediation.getDefaultInstance())
return this;
if (other.hasInstructions()) {
mergeInstructions(other.getInstructions());
}
if (!other.compliantValues_.isEmpty()) {
if (compliantValues_.isEmpty()) {
compliantValues_ = other.compliantValues_;
bitField0_ |= 0x00000002;
} else {
ensureCompliantValuesIsMutable();
compliantValues_.addAll(other.compliantValues_);
}
onChanged();
}
if (other.remediationType_ != 0) {
setRemediationTypeValue(other.getRemediationTypeValue());
}
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(getInstructionsFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
java.lang.String s = input.readStringRequireUtf8();
ensureCompliantValuesIsMutable();
compliantValues_.add(s);
break;
} // case 18
case 24:
{
remediationType_ = input.readEnum();
bitField0_ |= 0x00000004;
break;
} // case 24
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.cloud.assuredworkloads.v1.Violation.Remediation.Instructions instructions_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions,
com.google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions.Builder,
com.google.cloud.assuredworkloads.v1.Violation.Remediation.InstructionsOrBuilder>
instructionsBuilder_;
/**
*
*
*
* Required. Remediation instructions to resolve violations
*
*
*
* .google.cloud.assuredworkloads.v1.Violation.Remediation.Instructions instructions = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return Whether the instructions field is set.
*/
public boolean hasInstructions() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Required. Remediation instructions to resolve violations
*
* Values that can resolve the violation
* For example: for list org policy violations, this will either be the list
* of allowed or denied values
*
*
* repeated string compliant_values = 2;
*
* @return A list containing the compliantValues.
*/
public com.google.protobuf.ProtocolStringList getCompliantValuesList() {
compliantValues_.makeImmutable();
return compliantValues_;
}
/**
*
*
*
* Values that can resolve the violation
* For example: for list org policy violations, this will either be the list
* of allowed or denied values
*
*
* repeated string compliant_values = 2;
*
* @return The count of compliantValues.
*/
public int getCompliantValuesCount() {
return compliantValues_.size();
}
/**
*
*
*
* Values that can resolve the violation
* For example: for list org policy violations, this will either be the list
* of allowed or denied values
*
*
* repeated string compliant_values = 2;
*
* @param index The index of the element to return.
* @return The compliantValues at the given index.
*/
public java.lang.String getCompliantValues(int index) {
return compliantValues_.get(index);
}
/**
*
*
*
* Values that can resolve the violation
* For example: for list org policy violations, this will either be the list
* of allowed or denied values
*
*
* repeated string compliant_values = 2;
*
* @param index The index of the value to return.
* @return The bytes of the compliantValues at the given index.
*/
public com.google.protobuf.ByteString getCompliantValuesBytes(int index) {
return compliantValues_.getByteString(index);
}
/**
*
*
*
* Values that can resolve the violation
* For example: for list org policy violations, this will either be the list
* of allowed or denied values
*
*
* repeated string compliant_values = 2;
*
* @param index The index to set the value at.
* @param value The compliantValues to set.
* @return This builder for chaining.
*/
public Builder setCompliantValues(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureCompliantValuesIsMutable();
compliantValues_.set(index, value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Values that can resolve the violation
* For example: for list org policy violations, this will either be the list
* of allowed or denied values
*
*
* repeated string compliant_values = 2;
*
* @param value The compliantValues to add.
* @return This builder for chaining.
*/
public Builder addCompliantValues(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureCompliantValuesIsMutable();
compliantValues_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Values that can resolve the violation
* For example: for list org policy violations, this will either be the list
* of allowed or denied values
*
*
* repeated string compliant_values = 2;
*
* @param values The compliantValues to add.
* @return This builder for chaining.
*/
public Builder addAllCompliantValues(java.lang.Iterable values) {
ensureCompliantValuesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, compliantValues_);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Values that can resolve the violation
* For example: for list org policy violations, this will either be the list
* of allowed or denied values
*
* Output only. Reemediation type based on the type of org policy values violated
*
*
*
* .google.cloud.assuredworkloads.v1.Violation.Remediation.RemediationType remediation_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The remediationType to set.
* @return This builder for chaining.
*/
public Builder setRemediationType(
com.google.cloud.assuredworkloads.v1.Violation.Remediation.RemediationType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
remediationType_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Output only. Reemediation type based on the type of org policy values violated
*
*
*
* .google.cloud.assuredworkloads.v1.Violation.Remediation.RemediationType remediation_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return This builder for chaining.
*/
public Builder clearRemediationType() {
bitField0_ = (bitField0_ & ~0x00000004);
remediationType_ = 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.Violation.Remediation)
}
// @@protoc_insertion_point(class_scope:google.cloud.assuredworkloads.v1.Violation.Remediation)
private static final com.google.cloud.assuredworkloads.v1.Violation.Remediation
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.assuredworkloads.v1.Violation.Remediation();
}
public static com.google.cloud.assuredworkloads.v1.Violation.Remediation getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Remediation 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.Violation.Remediation getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
*
*
* Output only. Immutable. Name of the Violation.
* Format:
* organizations/{organization}/locations/{location}/workloads/{workload_id}/violations/{violations_id}
*
* Output only. Immutable. Name of the Violation.
* Format:
* organizations/{organization}/locations/{location}/workloads/{workload_id}/violations/{violations_id}
*
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];
*
*
* @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 DESCRIPTION_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object description_ = "";
/**
*
*
*
* Output only. Description for the Violation.
* e.g. OrgPolicy gcp.resourceLocations has non compliant value.
*
* Output only. Category under which this violation is mapped.
* e.g. Location, Service Usage, Access, Encryption, etc.
*
*
* string category = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for category.
*/
@java.lang.Override
public com.google.protobuf.ByteString getCategoryBytes() {
java.lang.Object ref = category_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
category_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int STATE_FIELD_NUMBER = 7;
private int state_ = 0;
/**
*
*
*
* Output only. State of the violation
*
*
*
* .google.cloud.assuredworkloads.v1.Violation.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The enum numeric value on the wire for state.
*/
@java.lang.Override
public int getStateValue() {
return state_;
}
/**
*
*
*
* Output only. State of the violation
*
*
*
* .google.cloud.assuredworkloads.v1.Violation.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The state.
*/
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Violation.State getState() {
com.google.cloud.assuredworkloads.v1.Violation.State result =
com.google.cloud.assuredworkloads.v1.Violation.State.forNumber(state_);
return result == null
? com.google.cloud.assuredworkloads.v1.Violation.State.UNRECOGNIZED
: result;
}
public static final int ORG_POLICY_CONSTRAINT_FIELD_NUMBER = 8;
@SuppressWarnings("serial")
private volatile java.lang.Object orgPolicyConstraint_ = "";
/**
*
*
*
* Output only. Immutable. The org-policy-constraint that was incorrectly changed, which resulted in
* this violation.
*
* Output only. Immutable. Audit Log Link for violated resource
* Format:
* https://console.cloud.google.com/logs/query;query={logName}{protoPayload.resourceName}{timeRange}{folder}
*
*
*
* string audit_log_link = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];
*
*
* @return The bytes for auditLogLink.
*/
@java.lang.Override
public com.google.protobuf.ByteString getAuditLogLinkBytes() {
java.lang.Object ref = auditLogLink_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
auditLogLink_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int NON_COMPLIANT_ORG_POLICY_FIELD_NUMBER = 12;
@SuppressWarnings("serial")
private volatile java.lang.Object nonCompliantOrgPolicy_ = "";
/**
*
*
*
* Output only. Immutable. Name of the OrgPolicy which was modified with non-compliant change and
* resulted this violation.
* Format:
* projects/{project_number}/policies/{constraint_name}
* folders/{folder_id}/policies/{constraint_name}
* organizations/{organization_id}/policies/{constraint_name}
*
* Output only. Immutable. Name of the OrgPolicy which was modified with non-compliant change and
* resulted this violation.
* Format:
* projects/{project_number}/policies/{constraint_name}
* folders/{folder_id}/policies/{constraint_name}
* organizations/{organization_id}/policies/{constraint_name}
*
*
*
* string non_compliant_org_policy = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];
*
*
* @return The bytes for nonCompliantOrgPolicy.
*/
@java.lang.Override
public com.google.protobuf.ByteString getNonCompliantOrgPolicyBytes() {
java.lang.Object ref = nonCompliantOrgPolicy_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
nonCompliantOrgPolicy_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int REMEDIATION_FIELD_NUMBER = 13;
private com.google.cloud.assuredworkloads.v1.Violation.Remediation remediation_;
/**
*
*
*
* Output only. Compliance violation remediation
*
*
*
* .google.cloud.assuredworkloads.v1.Violation.Remediation remediation = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the remediation field is set.
*/
@java.lang.Override
public boolean hasRemediation() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* Output only. Immutable. Audit Log link to find business justification provided for violation
* exception. Format:
* https://console.cloud.google.com/logs/query;query={logName}{protoPayload.resourceName}{protoPayload.methodName}{timeRange}{organization}
*
* Output only. Immutable. Audit Log link to find business justification provided for violation
* exception. Format:
* https://console.cloud.google.com/logs/query;query={logName}{protoPayload.resourceName}{protoPayload.methodName}{timeRange}{organization}
*
*
*
* string exception_audit_log_link = 16 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];
*
*
* @return The bytes for exceptionAuditLogLink.
*/
@java.lang.Override
public com.google.protobuf.ByteString getExceptionAuditLogLinkBytes() {
java.lang.Object ref = exceptionAuditLogLink_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
exceptionAuditLogLink_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(3, getBeginTime());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(4, getUpdateTime());
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(5, getResolveTime());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(category_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, category_);
}
if (state_
!= com.google.cloud.assuredworkloads.v1.Violation.State.STATE_UNSPECIFIED.getNumber()) {
output.writeEnum(7, state_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orgPolicyConstraint_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 8, orgPolicyConstraint_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(auditLogLink_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 11, auditLogLink_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nonCompliantOrgPolicy_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 12, nonCompliantOrgPolicy_);
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeMessage(13, getRemediation());
}
if (acknowledged_ != false) {
output.writeBool(14, acknowledged_);
}
if (((bitField0_ & 0x00000010) != 0)) {
output.writeMessage(15, getAcknowledgementTime());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(exceptionAuditLogLink_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 16, exceptionAuditLogLink_);
}
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(description_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBeginTime());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime());
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getResolveTime());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(category_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, category_);
}
if (state_
!= com.google.cloud.assuredworkloads.v1.Violation.State.STATE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, state_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orgPolicyConstraint_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, orgPolicyConstraint_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(auditLogLink_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, auditLogLink_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nonCompliantOrgPolicy_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, nonCompliantOrgPolicy_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getRemediation());
}
if (acknowledged_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(14, acknowledged_);
}
if (((bitField0_ & 0x00000010) != 0)) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(15, getAcknowledgementTime());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(exceptionAuditLogLink_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, exceptionAuditLogLink_);
}
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.Violation)) {
return super.equals(obj);
}
com.google.cloud.assuredworkloads.v1.Violation other =
(com.google.cloud.assuredworkloads.v1.Violation) obj;
if (!getName().equals(other.getName())) return false;
if (!getDescription().equals(other.getDescription())) return false;
if (hasBeginTime() != other.hasBeginTime()) return false;
if (hasBeginTime()) {
if (!getBeginTime().equals(other.getBeginTime())) return false;
}
if (hasUpdateTime() != other.hasUpdateTime()) return false;
if (hasUpdateTime()) {
if (!getUpdateTime().equals(other.getUpdateTime())) return false;
}
if (hasResolveTime() != other.hasResolveTime()) return false;
if (hasResolveTime()) {
if (!getResolveTime().equals(other.getResolveTime())) return false;
}
if (!getCategory().equals(other.getCategory())) return false;
if (state_ != other.state_) return false;
if (!getOrgPolicyConstraint().equals(other.getOrgPolicyConstraint())) return false;
if (!getAuditLogLink().equals(other.getAuditLogLink())) return false;
if (!getNonCompliantOrgPolicy().equals(other.getNonCompliantOrgPolicy())) return false;
if (hasRemediation() != other.hasRemediation()) return false;
if (hasRemediation()) {
if (!getRemediation().equals(other.getRemediation())) return false;
}
if (getAcknowledged() != other.getAcknowledged()) return false;
if (hasAcknowledgementTime() != other.hasAcknowledgementTime()) return false;
if (hasAcknowledgementTime()) {
if (!getAcknowledgementTime().equals(other.getAcknowledgementTime())) return false;
}
if (!getExceptionAuditLogLink().equals(other.getExceptionAuditLogLink())) 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) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
if (hasBeginTime()) {
hash = (37 * hash) + BEGIN_TIME_FIELD_NUMBER;
hash = (53 * hash) + getBeginTime().hashCode();
}
if (hasUpdateTime()) {
hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER;
hash = (53 * hash) + getUpdateTime().hashCode();
}
if (hasResolveTime()) {
hash = (37 * hash) + RESOLVE_TIME_FIELD_NUMBER;
hash = (53 * hash) + getResolveTime().hashCode();
}
hash = (37 * hash) + CATEGORY_FIELD_NUMBER;
hash = (53 * hash) + getCategory().hashCode();
hash = (37 * hash) + STATE_FIELD_NUMBER;
hash = (53 * hash) + state_;
hash = (37 * hash) + ORG_POLICY_CONSTRAINT_FIELD_NUMBER;
hash = (53 * hash) + getOrgPolicyConstraint().hashCode();
hash = (37 * hash) + AUDIT_LOG_LINK_FIELD_NUMBER;
hash = (53 * hash) + getAuditLogLink().hashCode();
hash = (37 * hash) + NON_COMPLIANT_ORG_POLICY_FIELD_NUMBER;
hash = (53 * hash) + getNonCompliantOrgPolicy().hashCode();
if (hasRemediation()) {
hash = (37 * hash) + REMEDIATION_FIELD_NUMBER;
hash = (53 * hash) + getRemediation().hashCode();
}
hash = (37 * hash) + ACKNOWLEDGED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAcknowledged());
if (hasAcknowledgementTime()) {
hash = (37 * hash) + ACKNOWLEDGEMENT_TIME_FIELD_NUMBER;
hash = (53 * hash) + getAcknowledgementTime().hashCode();
}
hash = (37 * hash) + EXCEPTION_AUDIT_LOG_LINK_FIELD_NUMBER;
hash = (53 * hash) + getExceptionAuditLogLink().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.assuredworkloads.v1.Violation parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.assuredworkloads.v1.Violation 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.Violation parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.assuredworkloads.v1.Violation 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.Violation parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.assuredworkloads.v1.Violation 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.Violation parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.assuredworkloads.v1.Violation 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.Violation parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.assuredworkloads.v1.Violation 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.Violation 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.Violation 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.Violation 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;
}
/**
*
*
*
* Workload monitoring Violation.
*
*
* Protobuf type {@code google.cloud.assuredworkloads.v1.Violation}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.assuredworkloads.v1.Violation)
com.google.cloud.assuredworkloads.v1.ViolationOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Violation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.assuredworkloads.v1.AssuredworkloadsProto
.internal_static_google_cloud_assuredworkloads_v1_Violation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.assuredworkloads.v1.Violation.class,
com.google.cloud.assuredworkloads.v1.Violation.Builder.class);
}
// Construct using com.google.cloud.assuredworkloads.v1.Violation.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getBeginTimeFieldBuilder();
getUpdateTimeFieldBuilder();
getResolveTimeFieldBuilder();
getRemediationFieldBuilder();
getAcknowledgementTimeFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
description_ = "";
beginTime_ = null;
if (beginTimeBuilder_ != null) {
beginTimeBuilder_.dispose();
beginTimeBuilder_ = null;
}
updateTime_ = null;
if (updateTimeBuilder_ != null) {
updateTimeBuilder_.dispose();
updateTimeBuilder_ = null;
}
resolveTime_ = null;
if (resolveTimeBuilder_ != null) {
resolveTimeBuilder_.dispose();
resolveTimeBuilder_ = null;
}
category_ = "";
state_ = 0;
orgPolicyConstraint_ = "";
auditLogLink_ = "";
nonCompliantOrgPolicy_ = "";
remediation_ = null;
if (remediationBuilder_ != null) {
remediationBuilder_.dispose();
remediationBuilder_ = null;
}
acknowledged_ = false;
acknowledgementTime_ = null;
if (acknowledgementTimeBuilder_ != null) {
acknowledgementTimeBuilder_.dispose();
acknowledgementTimeBuilder_ = null;
}
exceptionAuditLogLink_ = "";
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_Violation_descriptor;
}
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Violation getDefaultInstanceForType() {
return com.google.cloud.assuredworkloads.v1.Violation.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Violation build() {
com.google.cloud.assuredworkloads.v1.Violation result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Violation buildPartial() {
com.google.cloud.assuredworkloads.v1.Violation result =
new com.google.cloud.assuredworkloads.v1.Violation(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.assuredworkloads.v1.Violation result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.description_ = description_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000004) != 0)) {
result.beginTime_ = beginTimeBuilder_ == null ? beginTime_ : beginTimeBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.resolveTime_ =
resolveTimeBuilder_ == null ? resolveTime_ : resolveTimeBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.category_ = category_;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.state_ = state_;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.orgPolicyConstraint_ = orgPolicyConstraint_;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.auditLogLink_ = auditLogLink_;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
result.nonCompliantOrgPolicy_ = nonCompliantOrgPolicy_;
}
if (((from_bitField0_ & 0x00000400) != 0)) {
result.remediation_ =
remediationBuilder_ == null ? remediation_ : remediationBuilder_.build();
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000800) != 0)) {
result.acknowledged_ = acknowledged_;
}
if (((from_bitField0_ & 0x00001000) != 0)) {
result.acknowledgementTime_ =
acknowledgementTimeBuilder_ == null
? acknowledgementTime_
: acknowledgementTimeBuilder_.build();
to_bitField0_ |= 0x00000010;
}
if (((from_bitField0_ & 0x00002000) != 0)) {
result.exceptionAuditLogLink_ = exceptionAuditLogLink_;
}
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.Violation) {
return mergeFrom((com.google.cloud.assuredworkloads.v1.Violation) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.assuredworkloads.v1.Violation other) {
if (other == com.google.cloud.assuredworkloads.v1.Violation.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.hasBeginTime()) {
mergeBeginTime(other.getBeginTime());
}
if (other.hasUpdateTime()) {
mergeUpdateTime(other.getUpdateTime());
}
if (other.hasResolveTime()) {
mergeResolveTime(other.getResolveTime());
}
if (!other.getCategory().isEmpty()) {
category_ = other.category_;
bitField0_ |= 0x00000020;
onChanged();
}
if (other.state_ != 0) {
setStateValue(other.getStateValue());
}
if (!other.getOrgPolicyConstraint().isEmpty()) {
orgPolicyConstraint_ = other.orgPolicyConstraint_;
bitField0_ |= 0x00000080;
onChanged();
}
if (!other.getAuditLogLink().isEmpty()) {
auditLogLink_ = other.auditLogLink_;
bitField0_ |= 0x00000100;
onChanged();
}
if (!other.getNonCompliantOrgPolicy().isEmpty()) {
nonCompliantOrgPolicy_ = other.nonCompliantOrgPolicy_;
bitField0_ |= 0x00000200;
onChanged();
}
if (other.hasRemediation()) {
mergeRemediation(other.getRemediation());
}
if (other.getAcknowledged() != false) {
setAcknowledged(other.getAcknowledged());
}
if (other.hasAcknowledgementTime()) {
mergeAcknowledgementTime(other.getAcknowledgementTime());
}
if (!other.getExceptionAuditLogLink().isEmpty()) {
exceptionAuditLogLink_ = other.exceptionAuditLogLink_;
bitField0_ |= 0x00002000;
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:
{
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
description_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
input.readMessage(getBeginTimeFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 26
case 34:
{
input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
case 42:
{
input.readMessage(getResolveTimeFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 42
case 50:
{
category_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000020;
break;
} // case 50
case 56:
{
state_ = input.readEnum();
bitField0_ |= 0x00000040;
break;
} // case 56
case 66:
{
orgPolicyConstraint_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000080;
break;
} // case 66
case 90:
{
auditLogLink_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000100;
break;
} // case 90
case 98:
{
nonCompliantOrgPolicy_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000200;
break;
} // case 98
case 106:
{
input.readMessage(getRemediationFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000400;
break;
} // case 106
case 112:
{
acknowledged_ = input.readBool();
bitField0_ |= 0x00000800;
break;
} // case 112
case 122:
{
input.readMessage(
getAcknowledgementTimeFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00001000;
break;
} // case 122
case 130:
{
exceptionAuditLogLink_ = input.readStringRequireUtf8();
bitField0_ |= 0x00002000;
break;
} // case 130
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_ = "";
/**
*
*
*
* Output only. Immutable. Name of the Violation.
* Format:
* organizations/{organization}/locations/{location}/workloads/{workload_id}/violations/{violations_id}
*
* Output only. Immutable. Name of the Violation.
* Format:
* organizations/{organization}/locations/{location}/workloads/{workload_id}/violations/{violations_id}
*
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];
*
*
* @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;
}
}
/**
*
*
*
* Output only. Immutable. Name of the Violation.
* Format:
* organizations/{organization}/locations/{location}/workloads/{workload_id}/violations/{violations_id}
*
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];
*
*
* @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;
}
/**
*
*
*
* Output only. Immutable. Name of the Violation.
* Format:
* organizations/{organization}/locations/{location}/workloads/{workload_id}/violations/{violations_id}
*
* Output only. Immutable. Name of the Violation.
* Format:
* organizations/{organization}/locations/{location}/workloads/{workload_id}/violations/{violations_id}
*
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];
*
*
* @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 description_ = "";
/**
*
*
*
* Output only. Description for the Violation.
* e.g. OrgPolicy gcp.resourceLocations has non compliant value.
*
* Output only. Category under which this violation is mapped.
* e.g. Location, Service Usage, Access, Encryption, etc.
*
*
* string category = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The bytes for category to set.
* @return This builder for chaining.
*/
public Builder setCategoryBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
category_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
private int state_ = 0;
/**
*
*
*
* Output only. State of the violation
*
*
*
* .google.cloud.assuredworkloads.v1.Violation.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The enum numeric value on the wire for state.
*/
@java.lang.Override
public int getStateValue() {
return state_;
}
/**
*
*
*
* Output only. State of the violation
*
*
*
* .google.cloud.assuredworkloads.v1.Violation.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The enum numeric value on the wire for state to set.
* @return This builder for chaining.
*/
public Builder setStateValue(int value) {
state_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Output only. State of the violation
*
*
*
* .google.cloud.assuredworkloads.v1.Violation.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The state.
*/
@java.lang.Override
public com.google.cloud.assuredworkloads.v1.Violation.State getState() {
com.google.cloud.assuredworkloads.v1.Violation.State result =
com.google.cloud.assuredworkloads.v1.Violation.State.forNumber(state_);
return result == null
? com.google.cloud.assuredworkloads.v1.Violation.State.UNRECOGNIZED
: result;
}
/**
*
*
*
* Output only. State of the violation
*
*
*
* .google.cloud.assuredworkloads.v1.Violation.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The state to set.
* @return This builder for chaining.
*/
public Builder setState(com.google.cloud.assuredworkloads.v1.Violation.State value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000040;
state_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Output only. Immutable. Audit Log Link for violated resource
* Format:
* https://console.cloud.google.com/logs/query;query={logName}{protoPayload.resourceName}{timeRange}{folder}
*
*
*
* string audit_log_link = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];
*
*
* @param value The bytes for auditLogLink to set.
* @return This builder for chaining.
*/
public Builder setAuditLogLinkBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
auditLogLink_ = value;
bitField0_ |= 0x00000100;
onChanged();
return this;
}
private java.lang.Object nonCompliantOrgPolicy_ = "";
/**
*
*
*
* Output only. Immutable. Name of the OrgPolicy which was modified with non-compliant change and
* resulted this violation.
* Format:
* projects/{project_number}/policies/{constraint_name}
* folders/{folder_id}/policies/{constraint_name}
* organizations/{organization_id}/policies/{constraint_name}
*
* Output only. Immutable. Name of the OrgPolicy which was modified with non-compliant change and
* resulted this violation.
* Format:
* projects/{project_number}/policies/{constraint_name}
* folders/{folder_id}/policies/{constraint_name}
* organizations/{organization_id}/policies/{constraint_name}
*
* Output only. Immutable. Name of the OrgPolicy which was modified with non-compliant change and
* resulted this violation.
* Format:
* projects/{project_number}/policies/{constraint_name}
* folders/{folder_id}/policies/{constraint_name}
* organizations/{organization_id}/policies/{constraint_name}
*
*
*
* string non_compliant_org_policy = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];
*
*
* @param value The nonCompliantOrgPolicy to set.
* @return This builder for chaining.
*/
public Builder setNonCompliantOrgPolicy(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
nonCompliantOrgPolicy_ = value;
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
*
*
* Output only. Immutable. Name of the OrgPolicy which was modified with non-compliant change and
* resulted this violation.
* Format:
* projects/{project_number}/policies/{constraint_name}
* folders/{folder_id}/policies/{constraint_name}
* organizations/{organization_id}/policies/{constraint_name}
*
* Output only. Immutable. Name of the OrgPolicy which was modified with non-compliant change and
* resulted this violation.
* Format:
* projects/{project_number}/policies/{constraint_name}
* folders/{folder_id}/policies/{constraint_name}
* organizations/{organization_id}/policies/{constraint_name}
*
*
*
* string non_compliant_org_policy = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];
*
*
* @param value The bytes for nonCompliantOrgPolicy to set.
* @return This builder for chaining.
*/
public Builder setNonCompliantOrgPolicyBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
nonCompliantOrgPolicy_ = value;
bitField0_ |= 0x00000200;
onChanged();
return this;
}
private com.google.cloud.assuredworkloads.v1.Violation.Remediation remediation_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.assuredworkloads.v1.Violation.Remediation,
com.google.cloud.assuredworkloads.v1.Violation.Remediation.Builder,
com.google.cloud.assuredworkloads.v1.Violation.RemediationOrBuilder>
remediationBuilder_;
/**
*
*
*
* Output only. Compliance violation remediation
*
*
*
* .google.cloud.assuredworkloads.v1.Violation.Remediation remediation = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the remediation field is set.
*/
public boolean hasRemediation() {
return ((bitField0_ & 0x00000400) != 0);
}
/**
*
*
*
* Output only. Immutable. Audit Log link to find business justification provided for violation
* exception. Format:
* https://console.cloud.google.com/logs/query;query={logName}{protoPayload.resourceName}{protoPayload.methodName}{timeRange}{organization}
*
* Output only. Immutable. Audit Log link to find business justification provided for violation
* exception. Format:
* https://console.cloud.google.com/logs/query;query={logName}{protoPayload.resourceName}{protoPayload.methodName}{timeRange}{organization}
*
* Output only. Immutable. Audit Log link to find business justification provided for violation
* exception. Format:
* https://console.cloud.google.com/logs/query;query={logName}{protoPayload.resourceName}{protoPayload.methodName}{timeRange}{organization}
*
*
*
* string exception_audit_log_link = 16 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];
*
*
* @param value The exceptionAuditLogLink to set.
* @return This builder for chaining.
*/
public Builder setExceptionAuditLogLink(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
exceptionAuditLogLink_ = value;
bitField0_ |= 0x00002000;
onChanged();
return this;
}
/**
*
*
*
* Output only. Immutable. Audit Log link to find business justification provided for violation
* exception. Format:
* https://console.cloud.google.com/logs/query;query={logName}{protoPayload.resourceName}{protoPayload.methodName}{timeRange}{organization}
*
* Output only. Immutable. Audit Log link to find business justification provided for violation
* exception. Format:
* https://console.cloud.google.com/logs/query;query={logName}{protoPayload.resourceName}{protoPayload.methodName}{timeRange}{organization}
*
*
*
* string exception_audit_log_link = 16 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];
*
*
* @param value The bytes for exceptionAuditLogLink to set.
* @return This builder for chaining.
*/
public Builder setExceptionAuditLogLinkBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
exceptionAuditLogLink_ = value;
bitField0_ |= 0x00002000;
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.Violation)
}
// @@protoc_insertion_point(class_scope:google.cloud.assuredworkloads.v1.Violation)
private static final com.google.cloud.assuredworkloads.v1.Violation DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.assuredworkloads.v1.Violation();
}
public static com.google.cloud.assuredworkloads.v1.Violation getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Violation 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.Violation getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}