Class OSPolicyAssignment

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.osconfig.v1alpha.OSPolicyAssignment
All Implemented Interfaces:
OSPolicyAssignmentOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class OSPolicyAssignment extends com.google.protobuf.GeneratedMessage implements OSPolicyAssignmentOrBuilder
 OS policy assignment is an API resource that is used to
 apply a set of OS policies to a dynamically targeted group of Compute Engine
 VM instances.

 An OS policy is used to define the desired state configuration for a
 Compute Engine VM instance through a set of configuration resources that
 provide capabilities such as installing or removing software packages, or
 executing a script.

 For more information, see [OS policy and OS policy
 assignment](https://cloud.google.com/compute/docs/os-configuration-management/working-with-os-policies).
 
Protobuf type google.cloud.osconfig.v1alpha.OSPolicyAssignment
See Also:
  • Field Details

    • NAME_FIELD_NUMBER

      public static final int NAME_FIELD_NUMBER
      See Also:
    • DESCRIPTION_FIELD_NUMBER

      public static final int DESCRIPTION_FIELD_NUMBER
      See Also:
    • OS_POLICIES_FIELD_NUMBER

      public static final int OS_POLICIES_FIELD_NUMBER
      See Also:
    • INSTANCE_FILTER_FIELD_NUMBER

      public static final int INSTANCE_FILTER_FIELD_NUMBER
      See Also:
    • ROLLOUT_FIELD_NUMBER

      public static final int ROLLOUT_FIELD_NUMBER
      See Also:
    • REVISION_ID_FIELD_NUMBER

      public static final int REVISION_ID_FIELD_NUMBER
      See Also:
    • REVISION_CREATE_TIME_FIELD_NUMBER

      public static final int REVISION_CREATE_TIME_FIELD_NUMBER
      See Also:
    • ETAG_FIELD_NUMBER

      public static final int ETAG_FIELD_NUMBER
      See Also:
    • ROLLOUT_STATE_FIELD_NUMBER

      public static final int ROLLOUT_STATE_FIELD_NUMBER
      See Also:
    • BASELINE_FIELD_NUMBER

      public static final int BASELINE_FIELD_NUMBER
      See Also:
    • DELETED_FIELD_NUMBER

      public static final int DELETED_FIELD_NUMBER
      See Also:
    • RECONCILING_FIELD_NUMBER

      public static final int RECONCILING_FIELD_NUMBER
      See Also:
    • UID_FIELD_NUMBER

      public static final int UID_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getName

      public String getName()
       Resource name.
      
       Format:
       `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}`
      
       This field is ignored when you create an OS policy assignment.
       
      string name = 1;
      Specified by:
      getName in interface OSPolicyAssignmentOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Resource name.
      
       Format:
       `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}`
      
       This field is ignored when you create an OS policy assignment.
       
      string name = 1;
      Specified by:
      getNameBytes in interface OSPolicyAssignmentOrBuilder
      Returns:
      The bytes for name.
    • getDescription

      public String getDescription()
       OS policy assignment description.
       Length of the description is limited to 1024 characters.
       
      string description = 2;
      Specified by:
      getDescription in interface OSPolicyAssignmentOrBuilder
      Returns:
      The description.
    • getDescriptionBytes

      public com.google.protobuf.ByteString getDescriptionBytes()
       OS policy assignment description.
       Length of the description is limited to 1024 characters.
       
      string description = 2;
      Specified by:
      getDescriptionBytes in interface OSPolicyAssignmentOrBuilder
      Returns:
      The bytes for description.
    • getOsPoliciesList

      public List<OSPolicy> getOsPoliciesList()
       Required. List of OS policies to be applied to the VMs.
       
      repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getOsPoliciesList in interface OSPolicyAssignmentOrBuilder
    • getOsPoliciesOrBuilderList

      public List<? extends OSPolicyOrBuilder> getOsPoliciesOrBuilderList()
       Required. List of OS policies to be applied to the VMs.
       
      repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getOsPoliciesOrBuilderList in interface OSPolicyAssignmentOrBuilder
    • getOsPoliciesCount

      public int getOsPoliciesCount()
       Required. List of OS policies to be applied to the VMs.
       
      repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getOsPoliciesCount in interface OSPolicyAssignmentOrBuilder
    • getOsPolicies

      public OSPolicy getOsPolicies(int index)
       Required. List of OS policies to be applied to the VMs.
       
      repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getOsPolicies in interface OSPolicyAssignmentOrBuilder
    • getOsPoliciesOrBuilder

      public OSPolicyOrBuilder getOsPoliciesOrBuilder(int index)
       Required. List of OS policies to be applied to the VMs.
       
      repeated .google.cloud.osconfig.v1alpha.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getOsPoliciesOrBuilder in interface OSPolicyAssignmentOrBuilder
    • hasInstanceFilter

      public boolean hasInstanceFilter()
       Required. Filter to select VMs.
       
      .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter instance_filter = 4 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      hasInstanceFilter in interface OSPolicyAssignmentOrBuilder
      Returns:
      Whether the instanceFilter field is set.
    • getInstanceFilter

      public OSPolicyAssignment.InstanceFilter getInstanceFilter()
       Required. Filter to select VMs.
       
      .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter instance_filter = 4 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getInstanceFilter in interface OSPolicyAssignmentOrBuilder
      Returns:
      The instanceFilter.
    • getInstanceFilterOrBuilder

      public OSPolicyAssignment.InstanceFilterOrBuilder getInstanceFilterOrBuilder()
       Required. Filter to select VMs.
       
      .google.cloud.osconfig.v1alpha.OSPolicyAssignment.InstanceFilter instance_filter = 4 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getInstanceFilterOrBuilder in interface OSPolicyAssignmentOrBuilder
    • hasRollout

      public boolean hasRollout()
       Required. Rollout to deploy the OS policy assignment.
       A rollout is triggered in the following situations:
       1) OSPolicyAssignment is created.
       2) OSPolicyAssignment is updated and the update contains changes to one of
       the following fields:
       - instance_filter
       - os_policies
       3) OSPolicyAssignment is deleted.
       
      .google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout rollout = 5 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      hasRollout in interface OSPolicyAssignmentOrBuilder
      Returns:
      Whether the rollout field is set.
    • getRollout

      public OSPolicyAssignment.Rollout getRollout()
       Required. Rollout to deploy the OS policy assignment.
       A rollout is triggered in the following situations:
       1) OSPolicyAssignment is created.
       2) OSPolicyAssignment is updated and the update contains changes to one of
       the following fields:
       - instance_filter
       - os_policies
       3) OSPolicyAssignment is deleted.
       
      .google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout rollout = 5 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getRollout in interface OSPolicyAssignmentOrBuilder
      Returns:
      The rollout.
    • getRolloutOrBuilder

      public OSPolicyAssignment.RolloutOrBuilder getRolloutOrBuilder()
       Required. Rollout to deploy the OS policy assignment.
       A rollout is triggered in the following situations:
       1) OSPolicyAssignment is created.
       2) OSPolicyAssignment is updated and the update contains changes to one of
       the following fields:
       - instance_filter
       - os_policies
       3) OSPolicyAssignment is deleted.
       
      .google.cloud.osconfig.v1alpha.OSPolicyAssignment.Rollout rollout = 5 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getRolloutOrBuilder in interface OSPolicyAssignmentOrBuilder
    • getRevisionId

      public String getRevisionId()
       Output only. The assignment revision ID
       A new revision is committed whenever a rollout is triggered for a OS policy
       assignment
       
      string revision_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getRevisionId in interface OSPolicyAssignmentOrBuilder
      Returns:
      The revisionId.
    • getRevisionIdBytes

      public com.google.protobuf.ByteString getRevisionIdBytes()
       Output only. The assignment revision ID
       A new revision is committed whenever a rollout is triggered for a OS policy
       assignment
       
      string revision_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getRevisionIdBytes in interface OSPolicyAssignmentOrBuilder
      Returns:
      The bytes for revisionId.
    • hasRevisionCreateTime

      public boolean hasRevisionCreateTime()
       Output only. The timestamp that the revision was created.
       
      .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasRevisionCreateTime in interface OSPolicyAssignmentOrBuilder
      Returns:
      Whether the revisionCreateTime field is set.
    • getRevisionCreateTime

      public com.google.protobuf.Timestamp getRevisionCreateTime()
       Output only. The timestamp that the revision was created.
       
      .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getRevisionCreateTime in interface OSPolicyAssignmentOrBuilder
      Returns:
      The revisionCreateTime.
    • getRevisionCreateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getRevisionCreateTimeOrBuilder()
       Output only. The timestamp that the revision was created.
       
      .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getRevisionCreateTimeOrBuilder in interface OSPolicyAssignmentOrBuilder
    • getEtag

      public String getEtag()
       The etag for this OS policy assignment.
       If this is provided on update, it must match the server's etag.
       
      string etag = 8;
      Specified by:
      getEtag in interface OSPolicyAssignmentOrBuilder
      Returns:
      The etag.
    • getEtagBytes

      public com.google.protobuf.ByteString getEtagBytes()
       The etag for this OS policy assignment.
       If this is provided on update, it must match the server's etag.
       
      string etag = 8;
      Specified by:
      getEtagBytes in interface OSPolicyAssignmentOrBuilder
      Returns:
      The bytes for etag.
    • getRolloutStateValue

      public int getRolloutStateValue()
       Output only. OS policy assignment rollout state
       
      .google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState rollout_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getRolloutStateValue in interface OSPolicyAssignmentOrBuilder
      Returns:
      The enum numeric value on the wire for rolloutState.
    • getRolloutState

      public OSPolicyAssignment.RolloutState getRolloutState()
       Output only. OS policy assignment rollout state
       
      .google.cloud.osconfig.v1alpha.OSPolicyAssignment.RolloutState rollout_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getRolloutState in interface OSPolicyAssignmentOrBuilder
      Returns:
      The rolloutState.
    • getBaseline

      public boolean getBaseline()
       Output only. Indicates that this revision has been successfully rolled out in this zone
       and new VMs will be assigned OS policies from this revision.
      
       For a given OS policy assignment, there is only one revision with a value
       of `true` for this field.
       
      bool baseline = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getBaseline in interface OSPolicyAssignmentOrBuilder
      Returns:
      The baseline.
    • getDeleted

      public boolean getDeleted()
       Output only. Indicates that this revision deletes the OS policy assignment.
       
      bool deleted = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getDeleted in interface OSPolicyAssignmentOrBuilder
      Returns:
      The deleted.
    • getReconciling

      public boolean getReconciling()
       Output only. Indicates that reconciliation is in progress for the revision.
       This value is `true` when the `rollout_state` is one of:
       * IN_PROGRESS
       * CANCELLING
       
      bool reconciling = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getReconciling in interface OSPolicyAssignmentOrBuilder
      Returns:
      The reconciling.
    • getUid

      public String getUid()
       Output only. Server generated unique id for the OS policy assignment resource.
       
      string uid = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUid in interface OSPolicyAssignmentOrBuilder
      Returns:
      The uid.
    • getUidBytes

      public com.google.protobuf.ByteString getUidBytes()
       Output only. Server generated unique id for the OS policy assignment resource.
       
      string uid = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUidBytes in interface OSPolicyAssignmentOrBuilder
      Returns:
      The bytes for uid.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static OSPolicyAssignment parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OSPolicyAssignment parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OSPolicyAssignment parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OSPolicyAssignment parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OSPolicyAssignment parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OSPolicyAssignment parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OSPolicyAssignment parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static OSPolicyAssignment parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static OSPolicyAssignment parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static OSPolicyAssignment parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static OSPolicyAssignment parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static OSPolicyAssignment parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public OSPolicyAssignment.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static OSPolicyAssignment.Builder newBuilder()
    • newBuilder

      public static OSPolicyAssignment.Builder newBuilder(OSPolicyAssignment prototype)
    • toBuilder

      public OSPolicyAssignment.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected OSPolicyAssignment.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static OSPolicyAssignment getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<OSPolicyAssignment> parser()
    • getParserForType

      public com.google.protobuf.Parser<OSPolicyAssignment> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public OSPolicyAssignment getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder