Class ApprovalRequest

  • All Implemented Interfaces:
    ApprovalRequestOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class ApprovalRequest
    extends com.google.protobuf.GeneratedMessageV3
    implements ApprovalRequestOrBuilder
     A request for the customer to approve access to a resource.
     
    Protobuf type google.cloud.accessapproval.v1.ApprovalRequest
    See Also:
    Serialized Form
    • Field Detail

      • REQUESTED_RESOURCE_NAME_FIELD_NUMBER

        public static final int REQUESTED_RESOURCE_NAME_FIELD_NUMBER
        See Also:
        Constant Field Values
      • REQUESTED_RESOURCE_PROPERTIES_FIELD_NUMBER

        public static final int REQUESTED_RESOURCE_PROPERTIES_FIELD_NUMBER
        See Also:
        Constant Field Values
      • REQUESTED_REASON_FIELD_NUMBER

        public static final int REQUESTED_REASON_FIELD_NUMBER
        See Also:
        Constant Field Values
      • REQUESTED_LOCATIONS_FIELD_NUMBER

        public static final int REQUESTED_LOCATIONS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • REQUEST_TIME_FIELD_NUMBER

        public static final int REQUEST_TIME_FIELD_NUMBER
        See Also:
        Constant Field Values
      • REQUESTED_EXPIRATION_FIELD_NUMBER

        public static final int REQUESTED_EXPIRATION_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

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

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

        public String getName()
         The resource name of the request. Format is
         "{projects|folders|organizations}/{id}/approvalRequests/{approval_request}".
         
        string name = 1;
        Specified by:
        getName in interface ApprovalRequestOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         The resource name of the request. Format is
         "{projects|folders|organizations}/{id}/approvalRequests/{approval_request}".
         
        string name = 1;
        Specified by:
        getNameBytes in interface ApprovalRequestOrBuilder
        Returns:
        The bytes for name.
      • getRequestedResourceName

        public String getRequestedResourceName()
         The resource for which approval is being requested. The format of the
         resource name is defined at
         https://cloud.google.com/apis/design/resource_names. The resource name here
         may either be a "full" resource name (e.g.
         "//library.googleapis.com/shelves/shelf1/books/book2") or a "relative"
         resource name (e.g. "shelves/shelf1/books/book2") as described in the
         resource name specification.
         
        string requested_resource_name = 2;
        Specified by:
        getRequestedResourceName in interface ApprovalRequestOrBuilder
        Returns:
        The requestedResourceName.
      • getRequestedResourceNameBytes

        public com.google.protobuf.ByteString getRequestedResourceNameBytes()
         The resource for which approval is being requested. The format of the
         resource name is defined at
         https://cloud.google.com/apis/design/resource_names. The resource name here
         may either be a "full" resource name (e.g.
         "//library.googleapis.com/shelves/shelf1/books/book2") or a "relative"
         resource name (e.g. "shelves/shelf1/books/book2") as described in the
         resource name specification.
         
        string requested_resource_name = 2;
        Specified by:
        getRequestedResourceNameBytes in interface ApprovalRequestOrBuilder
        Returns:
        The bytes for requestedResourceName.
      • hasRequestedResourceProperties

        public boolean hasRequestedResourceProperties()
         Properties related to the resource represented by requested_resource_name.
         
        .google.cloud.accessapproval.v1.ResourceProperties requested_resource_properties = 9;
        Specified by:
        hasRequestedResourceProperties in interface ApprovalRequestOrBuilder
        Returns:
        Whether the requestedResourceProperties field is set.
      • getRequestedResourceProperties

        public ResourceProperties getRequestedResourceProperties()
         Properties related to the resource represented by requested_resource_name.
         
        .google.cloud.accessapproval.v1.ResourceProperties requested_resource_properties = 9;
        Specified by:
        getRequestedResourceProperties in interface ApprovalRequestOrBuilder
        Returns:
        The requestedResourceProperties.
      • hasRequestedReason

        public boolean hasRequestedReason()
         The justification for which approval is being requested.
         
        .google.cloud.accessapproval.v1.AccessReason requested_reason = 3;
        Specified by:
        hasRequestedReason in interface ApprovalRequestOrBuilder
        Returns:
        Whether the requestedReason field is set.
      • getRequestedReason

        public AccessReason getRequestedReason()
         The justification for which approval is being requested.
         
        .google.cloud.accessapproval.v1.AccessReason requested_reason = 3;
        Specified by:
        getRequestedReason in interface ApprovalRequestOrBuilder
        Returns:
        The requestedReason.
      • hasRequestedLocations

        public boolean hasRequestedLocations()
         The locations for which approval is being requested.
         
        .google.cloud.accessapproval.v1.AccessLocations requested_locations = 4;
        Specified by:
        hasRequestedLocations in interface ApprovalRequestOrBuilder
        Returns:
        Whether the requestedLocations field is set.
      • getRequestedLocations

        public AccessLocations getRequestedLocations()
         The locations for which approval is being requested.
         
        .google.cloud.accessapproval.v1.AccessLocations requested_locations = 4;
        Specified by:
        getRequestedLocations in interface ApprovalRequestOrBuilder
        Returns:
        The requestedLocations.
      • hasRequestTime

        public boolean hasRequestTime()
         The time at which approval was requested.
         
        .google.protobuf.Timestamp request_time = 5;
        Specified by:
        hasRequestTime in interface ApprovalRequestOrBuilder
        Returns:
        Whether the requestTime field is set.
      • getRequestTime

        public com.google.protobuf.Timestamp getRequestTime()
         The time at which approval was requested.
         
        .google.protobuf.Timestamp request_time = 5;
        Specified by:
        getRequestTime in interface ApprovalRequestOrBuilder
        Returns:
        The requestTime.
      • getRequestTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getRequestTimeOrBuilder()
         The time at which approval was requested.
         
        .google.protobuf.Timestamp request_time = 5;
        Specified by:
        getRequestTimeOrBuilder in interface ApprovalRequestOrBuilder
      • hasRequestedExpiration

        public boolean hasRequestedExpiration()
         The requested expiration for the approval. If the request is approved,
         access will be granted from the time of approval until the expiration time.
         
        .google.protobuf.Timestamp requested_expiration = 6;
        Specified by:
        hasRequestedExpiration in interface ApprovalRequestOrBuilder
        Returns:
        Whether the requestedExpiration field is set.
      • getRequestedExpiration

        public com.google.protobuf.Timestamp getRequestedExpiration()
         The requested expiration for the approval. If the request is approved,
         access will be granted from the time of approval until the expiration time.
         
        .google.protobuf.Timestamp requested_expiration = 6;
        Specified by:
        getRequestedExpiration in interface ApprovalRequestOrBuilder
        Returns:
        The requestedExpiration.
      • getRequestedExpirationOrBuilder

        public com.google.protobuf.TimestampOrBuilder getRequestedExpirationOrBuilder()
         The requested expiration for the approval. If the request is approved,
         access will be granted from the time of approval until the expiration time.
         
        .google.protobuf.Timestamp requested_expiration = 6;
        Specified by:
        getRequestedExpirationOrBuilder in interface ApprovalRequestOrBuilder
      • hasApprove

        public boolean hasApprove()
         Access was approved.
         
        .google.cloud.accessapproval.v1.ApproveDecision approve = 7;
        Specified by:
        hasApprove in interface ApprovalRequestOrBuilder
        Returns:
        Whether the approve field is set.
      • hasDismiss

        public boolean hasDismiss()
         The request was dismissed.
         
        .google.cloud.accessapproval.v1.DismissDecision dismiss = 8;
        Specified by:
        hasDismiss in interface ApprovalRequestOrBuilder
        Returns:
        Whether the dismiss field is set.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • 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.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • 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 ApprovalRequest parseFrom​(ByteBuffer data)
                                         throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

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

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

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

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

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

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

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

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

        protected ApprovalRequest.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • parser

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

        public com.google.protobuf.Parser<ApprovalRequest> 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.GeneratedMessageV3
      • getDefaultInstanceForType

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