
com.google.api.services.servicecontrol.v2.model.AuthorizationInfo Maven / Gradle / Ivy
/*
* 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
*
* http://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.
*/
/*
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
* Modify at your own risk.
*/
package com.google.api.services.servicecontrol.v2.model;
/**
* Authorization information for the operation.
*
* This is the Java data model class that specifies how to parse/serialize into the JSON that is
* transmitted over HTTP when working with the Service Control API. For a detailed explanation see:
* https://developers.google.com/api-client-library/java/google-http-java-client/json
*
*
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public final class AuthorizationInfo extends com.google.api.client.json.GenericJson {
/**
* Whether or not authorization for `resource` and `permission` was granted.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Boolean granted;
/**
* The required IAM permission.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String permission;
/**
* The type of the permission that was checked. For data access audit logs this corresponds with
* the permission type that must be enabled in the project/folder/organization IAM policy in order
* for the log to be written.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String permissionType;
/**
* The resource being accessed, as a REST-style or cloud resource string. For example:
* bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID or
* projects/PROJECTID/datasets/DATASETID
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String resource;
/**
* Resource attributes used in IAM condition evaluation. This field contains resource attributes
* like resource type and resource name. To get the whole view of the attributes used in IAM
* condition evaluation, the user must also look into
* `AuditLog.request_metadata.request_attributes`.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private Resource resourceAttributes;
/**
* Whether or not authorization for `resource` and `permission` was granted.
* @return value or {@code null} for none
*/
public java.lang.Boolean getGranted() {
return granted;
}
/**
* Whether or not authorization for `resource` and `permission` was granted.
* @param granted granted or {@code null} for none
*/
public AuthorizationInfo setGranted(java.lang.Boolean granted) {
this.granted = granted;
return this;
}
/**
* The required IAM permission.
* @return value or {@code null} for none
*/
public java.lang.String getPermission() {
return permission;
}
/**
* The required IAM permission.
* @param permission permission or {@code null} for none
*/
public AuthorizationInfo setPermission(java.lang.String permission) {
this.permission = permission;
return this;
}
/**
* The type of the permission that was checked. For data access audit logs this corresponds with
* the permission type that must be enabled in the project/folder/organization IAM policy in order
* for the log to be written.
* @return value or {@code null} for none
*/
public java.lang.String getPermissionType() {
return permissionType;
}
/**
* The type of the permission that was checked. For data access audit logs this corresponds with
* the permission type that must be enabled in the project/folder/organization IAM policy in order
* for the log to be written.
* @param permissionType permissionType or {@code null} for none
*/
public AuthorizationInfo setPermissionType(java.lang.String permissionType) {
this.permissionType = permissionType;
return this;
}
/**
* The resource being accessed, as a REST-style or cloud resource string. For example:
* bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID or
* projects/PROJECTID/datasets/DATASETID
* @return value or {@code null} for none
*/
public java.lang.String getResource() {
return resource;
}
/**
* The resource being accessed, as a REST-style or cloud resource string. For example:
* bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID or
* projects/PROJECTID/datasets/DATASETID
* @param resource resource or {@code null} for none
*/
public AuthorizationInfo setResource(java.lang.String resource) {
this.resource = resource;
return this;
}
/**
* Resource attributes used in IAM condition evaluation. This field contains resource attributes
* like resource type and resource name. To get the whole view of the attributes used in IAM
* condition evaluation, the user must also look into
* `AuditLog.request_metadata.request_attributes`.
* @return value or {@code null} for none
*/
public Resource getResourceAttributes() {
return resourceAttributes;
}
/**
* Resource attributes used in IAM condition evaluation. This field contains resource attributes
* like resource type and resource name. To get the whole view of the attributes used in IAM
* condition evaluation, the user must also look into
* `AuditLog.request_metadata.request_attributes`.
* @param resourceAttributes resourceAttributes or {@code null} for none
*/
public AuthorizationInfo setResourceAttributes(Resource resourceAttributes) {
this.resourceAttributes = resourceAttributes;
return this;
}
@Override
public AuthorizationInfo set(String fieldName, Object value) {
return (AuthorizationInfo) super.set(fieldName, value);
}
@Override
public AuthorizationInfo clone() {
return (AuthorizationInfo) super.clone();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy