Class OSPolicy.Resource.FileResource.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<OSPolicy.Resource.FileResource.Builder>
com.google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.Builder
All Implemented Interfaces:
OSPolicy.Resource.FileResourceOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
OSPolicy.Resource.FileResource

public static final class OSPolicy.Resource.FileResource.Builder extends com.google.protobuf.GeneratedMessage.Builder<OSPolicy.Resource.FileResource.Builder> implements OSPolicy.Resource.FileResourceOrBuilder
 A resource that manages the state of a file.
 
Protobuf type google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource
  • 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.Builder<OSPolicy.Resource.FileResource.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<OSPolicy.Resource.FileResource.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<OSPolicy.Resource.FileResource.Builder>
    • getDefaultInstanceForType

      public OSPolicy.Resource.FileResource getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public OSPolicy.Resource.FileResource buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public OSPolicy.Resource.FileResource.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<OSPolicy.Resource.FileResource.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<OSPolicy.Resource.FileResource.Builder>
    • mergeFrom

      public OSPolicy.Resource.FileResource.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<OSPolicy.Resource.FileResource.Builder>
      Throws:
      IOException
    • getSourceCase

      Specified by:
      getSourceCase in interface OSPolicy.Resource.FileResourceOrBuilder
    • clearSource

    • hasFile

      public boolean hasFile()
       A remote or local source.
       
      .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1;
      Specified by:
      hasFile in interface OSPolicy.Resource.FileResourceOrBuilder
      Returns:
      Whether the file field is set.
    • getFile

      public OSPolicy.Resource.File getFile()
       A remote or local source.
       
      .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1;
      Specified by:
      getFile in interface OSPolicy.Resource.FileResourceOrBuilder
      Returns:
      The file.
    • setFile

       A remote or local source.
       
      .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1;
    • setFile

       A remote or local source.
       
      .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1;
    • mergeFile

       A remote or local source.
       
      .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1;
    • clearFile

       A remote or local source.
       
      .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1;
    • getFileBuilder

      public OSPolicy.Resource.File.Builder getFileBuilder()
       A remote or local source.
       
      .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1;
    • getFileOrBuilder

      public OSPolicy.Resource.FileOrBuilder getFileOrBuilder()
       A remote or local source.
       
      .google.cloud.osconfig.v1alpha.OSPolicy.Resource.File file = 1;
      Specified by:
      getFileOrBuilder in interface OSPolicy.Resource.FileResourceOrBuilder
    • hasContent

      public boolean hasContent()
       A a file with this content.
       The size of the content is limited to 1024 characters.
       
      string content = 2;
      Specified by:
      hasContent in interface OSPolicy.Resource.FileResourceOrBuilder
      Returns:
      Whether the content field is set.
    • getContent

      public String getContent()
       A a file with this content.
       The size of the content is limited to 1024 characters.
       
      string content = 2;
      Specified by:
      getContent in interface OSPolicy.Resource.FileResourceOrBuilder
      Returns:
      The content.
    • getContentBytes

      public com.google.protobuf.ByteString getContentBytes()
       A a file with this content.
       The size of the content is limited to 1024 characters.
       
      string content = 2;
      Specified by:
      getContentBytes in interface OSPolicy.Resource.FileResourceOrBuilder
      Returns:
      The bytes for content.
    • setContent

       A a file with this content.
       The size of the content is limited to 1024 characters.
       
      string content = 2;
      Parameters:
      value - The content to set.
      Returns:
      This builder for chaining.
    • clearContent

       A a file with this content.
       The size of the content is limited to 1024 characters.
       
      string content = 2;
      Returns:
      This builder for chaining.
    • setContentBytes

      public OSPolicy.Resource.FileResource.Builder setContentBytes(com.google.protobuf.ByteString value)
       A a file with this content.
       The size of the content is limited to 1024 characters.
       
      string content = 2;
      Parameters:
      value - The bytes for content to set.
      Returns:
      This builder for chaining.
    • getPath

      public String getPath()
       Required. The absolute path of the file within the VM.
       
      string path = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getPath in interface OSPolicy.Resource.FileResourceOrBuilder
      Returns:
      The path.
    • getPathBytes

      public com.google.protobuf.ByteString getPathBytes()
       Required. The absolute path of the file within the VM.
       
      string path = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getPathBytes in interface OSPolicy.Resource.FileResourceOrBuilder
      Returns:
      The bytes for path.
    • setPath

       Required. The absolute path of the file within the VM.
       
      string path = 3 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The path to set.
      Returns:
      This builder for chaining.
    • clearPath

       Required. The absolute path of the file within the VM.
       
      string path = 3 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setPathBytes

      public OSPolicy.Resource.FileResource.Builder setPathBytes(com.google.protobuf.ByteString value)
       Required. The absolute path of the file within the VM.
       
      string path = 3 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for path to set.
      Returns:
      This builder for chaining.
    • getStateValue

      public int getStateValue()
       Required. Desired state of the file.
       
      .google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState state = 4 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getStateValue in interface OSPolicy.Resource.FileResourceOrBuilder
      Returns:
      The enum numeric value on the wire for state.
    • setStateValue

      public OSPolicy.Resource.FileResource.Builder setStateValue(int value)
       Required. Desired state of the file.
       
      .google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState state = 4 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The enum numeric value on the wire for state to set.
      Returns:
      This builder for chaining.
    • getState

       Required. Desired state of the file.
       
      .google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState state = 4 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getState in interface OSPolicy.Resource.FileResourceOrBuilder
      Returns:
      The state.
    • setState

       Required. Desired state of the file.
       
      .google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState state = 4 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The state to set.
      Returns:
      This builder for chaining.
    • clearState

       Required. Desired state of the file.
       
      .google.cloud.osconfig.v1alpha.OSPolicy.Resource.FileResource.DesiredState state = 4 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • getPermissions

      public String getPermissions()
       Consists of three octal digits which represent, in
       order, the permissions of the owner, group, and other users for the
       file (similarly to the numeric mode used in the linux chmod
       utility). Each digit represents a three bit number with the 4 bit
       corresponding to the read permissions, the 2 bit corresponds to the
       write bit, and the one bit corresponds to the execute permission.
       Default behavior is 755.
      
       Below are some examples of permissions and their associated values:
       read, write, and execute: 7
       read and execute: 5
       read and write: 6
       read only: 4
       
      string permissions = 5;
      Specified by:
      getPermissions in interface OSPolicy.Resource.FileResourceOrBuilder
      Returns:
      The permissions.
    • getPermissionsBytes

      public com.google.protobuf.ByteString getPermissionsBytes()
       Consists of three octal digits which represent, in
       order, the permissions of the owner, group, and other users for the
       file (similarly to the numeric mode used in the linux chmod
       utility). Each digit represents a three bit number with the 4 bit
       corresponding to the read permissions, the 2 bit corresponds to the
       write bit, and the one bit corresponds to the execute permission.
       Default behavior is 755.
      
       Below are some examples of permissions and their associated values:
       read, write, and execute: 7
       read and execute: 5
       read and write: 6
       read only: 4
       
      string permissions = 5;
      Specified by:
      getPermissionsBytes in interface OSPolicy.Resource.FileResourceOrBuilder
      Returns:
      The bytes for permissions.
    • setPermissions

      public OSPolicy.Resource.FileResource.Builder setPermissions(String value)
       Consists of three octal digits which represent, in
       order, the permissions of the owner, group, and other users for the
       file (similarly to the numeric mode used in the linux chmod
       utility). Each digit represents a three bit number with the 4 bit
       corresponding to the read permissions, the 2 bit corresponds to the
       write bit, and the one bit corresponds to the execute permission.
       Default behavior is 755.
      
       Below are some examples of permissions and their associated values:
       read, write, and execute: 7
       read and execute: 5
       read and write: 6
       read only: 4
       
      string permissions = 5;
      Parameters:
      value - The permissions to set.
      Returns:
      This builder for chaining.
    • clearPermissions

      public OSPolicy.Resource.FileResource.Builder clearPermissions()
       Consists of three octal digits which represent, in
       order, the permissions of the owner, group, and other users for the
       file (similarly to the numeric mode used in the linux chmod
       utility). Each digit represents a three bit number with the 4 bit
       corresponding to the read permissions, the 2 bit corresponds to the
       write bit, and the one bit corresponds to the execute permission.
       Default behavior is 755.
      
       Below are some examples of permissions and their associated values:
       read, write, and execute: 7
       read and execute: 5
       read and write: 6
       read only: 4
       
      string permissions = 5;
      Returns:
      This builder for chaining.
    • setPermissionsBytes

      public OSPolicy.Resource.FileResource.Builder setPermissionsBytes(com.google.protobuf.ByteString value)
       Consists of three octal digits which represent, in
       order, the permissions of the owner, group, and other users for the
       file (similarly to the numeric mode used in the linux chmod
       utility). Each digit represents a three bit number with the 4 bit
       corresponding to the read permissions, the 2 bit corresponds to the
       write bit, and the one bit corresponds to the execute permission.
       Default behavior is 755.
      
       Below are some examples of permissions and their associated values:
       read, write, and execute: 7
       read and execute: 5
       read and write: 6
       read only: 4
       
      string permissions = 5;
      Parameters:
      value - The bytes for permissions to set.
      Returns:
      This builder for chaining.