/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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. */ package com.amazonaws.services.glue.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Permissions granted to a principal. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class PrincipalPermissions implements Serializable, Cloneable, StructuredPojo { /** ** The principal who is granted permissions. *
*/ private DataLakePrincipal principal; /** ** The permissions that are granted to the principal. *
*/ private java.util.List* The principal who is granted permissions. *
* * @param principal * The principal who is granted permissions. */ public void setPrincipal(DataLakePrincipal principal) { this.principal = principal; } /** ** The principal who is granted permissions. *
* * @return The principal who is granted permissions. */ public DataLakePrincipal getPrincipal() { return this.principal; } /** ** The principal who is granted permissions. *
* * @param principal * The principal who is granted permissions. * @return Returns a reference to this object so that method calls can be chained together. */ public PrincipalPermissions withPrincipal(DataLakePrincipal principal) { setPrincipal(principal); return this; } /** ** The permissions that are granted to the principal. *
* * @return The permissions that are granted to the principal. * @see Permission */ public java.util.List* The permissions that are granted to the principal. *
* * @param permissions * The permissions that are granted to the principal. * @see Permission */ public void setPermissions(java.util.Collection* The permissions that are granted to the principal. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setPermissions(java.util.Collection)} or {@link #withPermissions(java.util.Collection)} if you want to * override the existing values. *
* * @param permissions * The permissions that are granted to the principal. * @return Returns a reference to this object so that method calls can be chained together. * @see Permission */ public PrincipalPermissions withPermissions(String... permissions) { if (this.permissions == null) { setPermissions(new java.util.ArrayList* The permissions that are granted to the principal. *
* * @param permissions * The permissions that are granted to the principal. * @return Returns a reference to this object so that method calls can be chained together. * @see Permission */ public PrincipalPermissions withPermissions(java.util.Collection* The permissions that are granted to the principal. *
* * @param permissions * The permissions that are granted to the principal. * @return Returns a reference to this object so that method calls can be chained together. * @see Permission */ public PrincipalPermissions withPermissions(Permission... permissions) { java.util.ArrayList