/*
 * 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.cloudidentity.v1beta1.model;

/**
 * A membership in an OrgUnit. An `OrgMembership` defines a relationship between an `OrgUnit` and an
 * entity belonging to that `OrgUnit`, referred to as a "member".
 *
 * <p> 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 Cloud Identity API. For a detailed explanation see:
 * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
 * </p>
 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class OrgMembership extends com.google.api.client.json.GenericJson {

  /**
   * Immutable. Org member id as full resource name. Format for shared drive resource:
   * //drive.googleapis.com/drives/{$memberId} where `$memberId` is the `id` from [Drive API (V3)
   * `Drive` resource](https://developers.google.com/drive/api/v3/reference/drives#resource).
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String member;

  /**
   * Uri with which you can read the member. This follows https://aip.dev/122 Format for shared
   * drive resource: https://drive.googleapis.com/drive/v3/drives/{$memberId} where `$memberId` is
   * the `id` from [Drive API (V3) `Drive`
   * resource](https://developers.google.com/drive/api/v3/reference/drives#resource).
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String memberUri;

  /**
   * Required. Immutable. The [resource name](https://cloud.google.com/apis/design/resource_names)
   * of the OrgMembership. Format: orgUnits/{$orgUnitId}/memberships/{$membership} The `$orgUnitId`
   * is the `orgUnitId` from the [Admin SDK `OrgUnit` resource](https://developers.google.com/admin-
   * sdk/directory/reference/rest/v1/orgunits). The `$membership` shall be of the form
   * `{$entityType};{$memberId}`, where `$entityType` is the enum value of
   * [OrgMembership.EntityType], and `memberId` is the `id` from [Drive API (V3) `Drive`
   * resource](https://developers.google.com/drive/api/v3/reference/drives#resource) for
   * OrgMembership.EntityType.SHARED_DRIVE.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String name;

  /**
   * Immutable. Entity type for the org member.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String type;

  /**
   * Immutable. Org member id as full resource name. Format for shared drive resource:
   * //drive.googleapis.com/drives/{$memberId} where `$memberId` is the `id` from [Drive API (V3)
   * `Drive` resource](https://developers.google.com/drive/api/v3/reference/drives#resource).
   * @return value or {@code null} for none
   */
  public java.lang.String getMember() {
    return member;
  }

  /**
   * Immutable. Org member id as full resource name. Format for shared drive resource:
   * //drive.googleapis.com/drives/{$memberId} where `$memberId` is the `id` from [Drive API (V3)
   * `Drive` resource](https://developers.google.com/drive/api/v3/reference/drives#resource).
   * @param member member or {@code null} for none
   */
  public OrgMembership setMember(java.lang.String member) {
    this.member = member;
    return this;
  }

  /**
   * Uri with which you can read the member. This follows https://aip.dev/122 Format for shared
   * drive resource: https://drive.googleapis.com/drive/v3/drives/{$memberId} where `$memberId` is
   * the `id` from [Drive API (V3) `Drive`
   * resource](https://developers.google.com/drive/api/v3/reference/drives#resource).
   * @return value or {@code null} for none
   */
  public java.lang.String getMemberUri() {
    return memberUri;
  }

  /**
   * Uri with which you can read the member. This follows https://aip.dev/122 Format for shared
   * drive resource: https://drive.googleapis.com/drive/v3/drives/{$memberId} where `$memberId` is
   * the `id` from [Drive API (V3) `Drive`
   * resource](https://developers.google.com/drive/api/v3/reference/drives#resource).
   * @param memberUri memberUri or {@code null} for none
   */
  public OrgMembership setMemberUri(java.lang.String memberUri) {
    this.memberUri = memberUri;
    return this;
  }

  /**
   * Required. Immutable. The [resource name](https://cloud.google.com/apis/design/resource_names)
   * of the OrgMembership. Format: orgUnits/{$orgUnitId}/memberships/{$membership} The `$orgUnitId`
   * is the `orgUnitId` from the [Admin SDK `OrgUnit` resource](https://developers.google.com/admin-
   * sdk/directory/reference/rest/v1/orgunits). The `$membership` shall be of the form
   * `{$entityType};{$memberId}`, where `$entityType` is the enum value of
   * [OrgMembership.EntityType], and `memberId` is the `id` from [Drive API (V3) `Drive`
   * resource](https://developers.google.com/drive/api/v3/reference/drives#resource) for
   * OrgMembership.EntityType.SHARED_DRIVE.
   * @return value or {@code null} for none
   */
  public java.lang.String getName() {
    return name;
  }

  /**
   * Required. Immutable. The [resource name](https://cloud.google.com/apis/design/resource_names)
   * of the OrgMembership. Format: orgUnits/{$orgUnitId}/memberships/{$membership} The `$orgUnitId`
   * is the `orgUnitId` from the [Admin SDK `OrgUnit` resource](https://developers.google.com/admin-
   * sdk/directory/reference/rest/v1/orgunits). The `$membership` shall be of the form
   * `{$entityType};{$memberId}`, where `$entityType` is the enum value of
   * [OrgMembership.EntityType], and `memberId` is the `id` from [Drive API (V3) `Drive`
   * resource](https://developers.google.com/drive/api/v3/reference/drives#resource) for
   * OrgMembership.EntityType.SHARED_DRIVE.
   * @param name name or {@code null} for none
   */
  public OrgMembership setName(java.lang.String name) {
    this.name = name;
    return this;
  }

  /**
   * Immutable. Entity type for the org member.
   * @return value or {@code null} for none
   */
  public java.lang.String getType() {
    return type;
  }

  /**
   * Immutable. Entity type for the org member.
   * @param type type or {@code null} for none
   */
  public OrgMembership setType(java.lang.String type) {
    this.type = type;
    return this;
  }

  @Override
  public OrgMembership set(String fieldName, Object value) {
    return (OrgMembership) super.set(fieldName, value);
  }

  @Override
  public OrgMembership clone() {
    return (OrgMembership) super.clone();
  }

}
