com.amazonaws.services.identitymanagement.model.ListPoliciesGrantingServiceAccessRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-iam Show documentation
/*
* Copyright 2020-2025 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.identitymanagement.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ListPoliciesGrantingServiceAccessRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* Use this parameter only when paginating results and only after you receive a response indicating that the results
* are truncated. Set it to the value of the Marker element in the response that you received to
* indicate where the next call should start.
*
*/
private String marker;
/**
*
* The ARN of the IAM identity (user, group, or role) whose policies you want to list.
*
*/
private String arn;
/**
*
* The service namespace for the Amazon Web Services services whose policies you want to list.
*
*
* To learn the service namespace for a service, see Actions, resources, and condition keys for Amazon Web Services services in the IAM User Guide. Choose
* the name of the service to view details for that service. In the first paragraph, find the service prefix. For
* example, (service prefix: a4b). For more information about service namespaces, see Amazon Web Services service namespaces in the Amazon Web Services General Reference.
*
*/
private com.amazonaws.internal.SdkInternalList serviceNamespaces;
/**
*
* Use this parameter only when paginating results and only after you receive a response indicating that the results
* are truncated. Set it to the value of the Marker element in the response that you received to
* indicate where the next call should start.
*
*
* @param marker
* Use this parameter only when paginating results and only after you receive a response indicating that the
* results are truncated. Set it to the value of the Marker element in the response that you
* received to indicate where the next call should start.
*/
public void setMarker(String marker) {
this.marker = marker;
}
/**
*
* Use this parameter only when paginating results and only after you receive a response indicating that the results
* are truncated. Set it to the value of the Marker element in the response that you received to
* indicate where the next call should start.
*
*
* @return Use this parameter only when paginating results and only after you receive a response indicating that the
* results are truncated. Set it to the value of the Marker element in the response that you
* received to indicate where the next call should start.
*/
public String getMarker() {
return this.marker;
}
/**
*
* Use this parameter only when paginating results and only after you receive a response indicating that the results
* are truncated. Set it to the value of the Marker element in the response that you received to
* indicate where the next call should start.
*
*
* @param marker
* Use this parameter only when paginating results and only after you receive a response indicating that the
* results are truncated. Set it to the value of the Marker element in the response that you
* received to indicate where the next call should start.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListPoliciesGrantingServiceAccessRequest withMarker(String marker) {
setMarker(marker);
return this;
}
/**
*
* The ARN of the IAM identity (user, group, or role) whose policies you want to list.
*
*
* @param arn
* The ARN of the IAM identity (user, group, or role) whose policies you want to list.
*/
public void setArn(String arn) {
this.arn = arn;
}
/**
*
* The ARN of the IAM identity (user, group, or role) whose policies you want to list.
*
*
* @return The ARN of the IAM identity (user, group, or role) whose policies you want to list.
*/
public String getArn() {
return this.arn;
}
/**
*
* The ARN of the IAM identity (user, group, or role) whose policies you want to list.
*
*
* @param arn
* The ARN of the IAM identity (user, group, or role) whose policies you want to list.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListPoliciesGrantingServiceAccessRequest withArn(String arn) {
setArn(arn);
return this;
}
/**
*
* The service namespace for the Amazon Web Services services whose policies you want to list.
*
*
* To learn the service namespace for a service, see Actions, resources, and condition keys for Amazon Web Services services in the IAM User Guide. Choose
* the name of the service to view details for that service. In the first paragraph, find the service prefix. For
* example, (service prefix: a4b). For more information about service namespaces, see Amazon Web Services service namespaces in the Amazon Web Services General Reference.
*
*
* @return The service namespace for the Amazon Web Services services whose policies you want to list.
*
* To learn the service namespace for a service, see Actions, resources, and condition keys for Amazon Web Services services in the IAM User
* Guide. Choose the name of the service to view details for that service. In the first paragraph, find
* the service prefix. For example, (service prefix: a4b). For more information about service
* namespaces, see Amazon Web Services service namespaces in the Amazon Web Services General Reference.
*/
public java.util.List getServiceNamespaces() {
if (serviceNamespaces == null) {
serviceNamespaces = new com.amazonaws.internal.SdkInternalList();
}
return serviceNamespaces;
}
/**
*
* The service namespace for the Amazon Web Services services whose policies you want to list.
*
*
* To learn the service namespace for a service, see Actions, resources, and condition keys for Amazon Web Services services in the IAM User Guide. Choose
* the name of the service to view details for that service. In the first paragraph, find the service prefix. For
* example, (service prefix: a4b). For more information about service namespaces, see Amazon Web Services service namespaces in the Amazon Web Services General Reference.
*
*
* @param serviceNamespaces
* The service namespace for the Amazon Web Services services whose policies you want to list.
*
* To learn the service namespace for a service, see Actions, resources, and condition keys for Amazon Web Services services in the IAM User Guide.
* Choose the name of the service to view details for that service. In the first paragraph, find the service
* prefix. For example, (service prefix: a4b). For more information about service namespaces,
* see Amazon Web Services service namespaces in the Amazon Web Services General Reference.
*/
public void setServiceNamespaces(java.util.Collection serviceNamespaces) {
if (serviceNamespaces == null) {
this.serviceNamespaces = null;
return;
}
this.serviceNamespaces = new com.amazonaws.internal.SdkInternalList(serviceNamespaces);
}
/**
*
* The service namespace for the Amazon Web Services services whose policies you want to list.
*
*
* To learn the service namespace for a service, see Actions, resources, and condition keys for Amazon Web Services services in the IAM User Guide. Choose
* the name of the service to view details for that service. In the first paragraph, find the service prefix. For
* example, (service prefix: a4b). For more information about service namespaces, see Amazon Web Services service namespaces in the Amazon Web Services General Reference.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setServiceNamespaces(java.util.Collection)} or {@link #withServiceNamespaces(java.util.Collection)} if
* you want to override the existing values.
*
*
* @param serviceNamespaces
* The service namespace for the Amazon Web Services services whose policies you want to list.
*
* To learn the service namespace for a service, see Actions, resources, and condition keys for Amazon Web Services services in the IAM User Guide.
* Choose the name of the service to view details for that service. In the first paragraph, find the service
* prefix. For example, (service prefix: a4b). For more information about service namespaces,
* see Amazon Web Services service namespaces in the Amazon Web Services General Reference.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListPoliciesGrantingServiceAccessRequest withServiceNamespaces(String... serviceNamespaces) {
if (this.serviceNamespaces == null) {
setServiceNamespaces(new com.amazonaws.internal.SdkInternalList(serviceNamespaces.length));
}
for (String ele : serviceNamespaces) {
this.serviceNamespaces.add(ele);
}
return this;
}
/**
*
* The service namespace for the Amazon Web Services services whose policies you want to list.
*
*
* To learn the service namespace for a service, see Actions, resources, and condition keys for Amazon Web Services services in the IAM User Guide. Choose
* the name of the service to view details for that service. In the first paragraph, find the service prefix. For
* example, (service prefix: a4b). For more information about service namespaces, see Amazon Web Services service namespaces in the Amazon Web Services General Reference.
*
*
* @param serviceNamespaces
* The service namespace for the Amazon Web Services services whose policies you want to list.
*
* To learn the service namespace for a service, see Actions, resources, and condition keys for Amazon Web Services services in the IAM User Guide.
* Choose the name of the service to view details for that service. In the first paragraph, find the service
* prefix. For example, (service prefix: a4b). For more information about service namespaces,
* see Amazon Web Services service namespaces in the Amazon Web Services General Reference.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListPoliciesGrantingServiceAccessRequest withServiceNamespaces(java.util.Collection serviceNamespaces) {
setServiceNamespaces(serviceNamespaces);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getMarker() != null)
sb.append("Marker: ").append(getMarker()).append(",");
if (getArn() != null)
sb.append("Arn: ").append(getArn()).append(",");
if (getServiceNamespaces() != null)
sb.append("ServiceNamespaces: ").append(getServiceNamespaces());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ListPoliciesGrantingServiceAccessRequest == false)
return false;
ListPoliciesGrantingServiceAccessRequest other = (ListPoliciesGrantingServiceAccessRequest) obj;
if (other.getMarker() == null ^ this.getMarker() == null)
return false;
if (other.getMarker() != null && other.getMarker().equals(this.getMarker()) == false)
return false;
if (other.getArn() == null ^ this.getArn() == null)
return false;
if (other.getArn() != null && other.getArn().equals(this.getArn()) == false)
return false;
if (other.getServiceNamespaces() == null ^ this.getServiceNamespaces() == null)
return false;
if (other.getServiceNamespaces() != null && other.getServiceNamespaces().equals(this.getServiceNamespaces()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getMarker() == null) ? 0 : getMarker().hashCode());
hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode());
hashCode = prime * hashCode + ((getServiceNamespaces() == null) ? 0 : getServiceNamespaces().hashCode());
return hashCode;
}
@Override
public ListPoliciesGrantingServiceAccessRequest clone() {
return (ListPoliciesGrantingServiceAccessRequest) super.clone();
}
}