All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.codecommit.model.BlobMetadata Maven / Gradle / Ivy

/*
 * Copyright 2014-2019 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.codecommit.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Returns information about a specific Git blob object. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class BlobMetadata implements Serializable, Cloneable, StructuredPojo { /** *

* The full ID of the blob. *

*/ private String blobId; /** *

* The path to the blob and any associated file name, if any. *

*/ private String path; /** *

* The file mode permissions of the blob. File mode permission codes include: *

*
    *
  • *

    * 100644 indicates read/write *

    *
  • *
  • *

    * 100755 indicates read/write/execute *

    *
  • *
  • *

    * 160000 indicates a submodule *

    *
  • *
  • *

    * 120000 indicates a symlink *

    *
  • *
*/ private String mode; /** *

* The full ID of the blob. *

* * @param blobId * The full ID of the blob. */ public void setBlobId(String blobId) { this.blobId = blobId; } /** *

* The full ID of the blob. *

* * @return The full ID of the blob. */ public String getBlobId() { return this.blobId; } /** *

* The full ID of the blob. *

* * @param blobId * The full ID of the blob. * @return Returns a reference to this object so that method calls can be chained together. */ public BlobMetadata withBlobId(String blobId) { setBlobId(blobId); return this; } /** *

* The path to the blob and any associated file name, if any. *

* * @param path * The path to the blob and any associated file name, if any. */ public void setPath(String path) { this.path = path; } /** *

* The path to the blob and any associated file name, if any. *

* * @return The path to the blob and any associated file name, if any. */ public String getPath() { return this.path; } /** *

* The path to the blob and any associated file name, if any. *

* * @param path * The path to the blob and any associated file name, if any. * @return Returns a reference to this object so that method calls can be chained together. */ public BlobMetadata withPath(String path) { setPath(path); return this; } /** *

* The file mode permissions of the blob. File mode permission codes include: *

*
    *
  • *

    * 100644 indicates read/write *

    *
  • *
  • *

    * 100755 indicates read/write/execute *

    *
  • *
  • *

    * 160000 indicates a submodule *

    *
  • *
  • *

    * 120000 indicates a symlink *

    *
  • *
* * @param mode * The file mode permissions of the blob. File mode permission codes include:

*
    *
  • *

    * 100644 indicates read/write *

    *
  • *
  • *

    * 100755 indicates read/write/execute *

    *
  • *
  • *

    * 160000 indicates a submodule *

    *
  • *
  • *

    * 120000 indicates a symlink *

    *
  • */ public void setMode(String mode) { this.mode = mode; } /** *

    * The file mode permissions of the blob. File mode permission codes include: *

    *
      *
    • *

      * 100644 indicates read/write *

      *
    • *
    • *

      * 100755 indicates read/write/execute *

      *
    • *
    • *

      * 160000 indicates a submodule *

      *
    • *
    • *

      * 120000 indicates a symlink *

      *
    • *
    * * @return The file mode permissions of the blob. File mode permission codes include:

    *
      *
    • *

      * 100644 indicates read/write *

      *
    • *
    • *

      * 100755 indicates read/write/execute *

      *
    • *
    • *

      * 160000 indicates a submodule *

      *
    • *
    • *

      * 120000 indicates a symlink *

      *
    • */ public String getMode() { return this.mode; } /** *

      * The file mode permissions of the blob. File mode permission codes include: *

      *
        *
      • *

        * 100644 indicates read/write *

        *
      • *
      • *

        * 100755 indicates read/write/execute *

        *
      • *
      • *

        * 160000 indicates a submodule *

        *
      • *
      • *

        * 120000 indicates a symlink *

        *
      • *
      * * @param mode * The file mode permissions of the blob. File mode permission codes include:

      *
        *
      • *

        * 100644 indicates read/write *

        *
      • *
      • *

        * 100755 indicates read/write/execute *

        *
      • *
      • *

        * 160000 indicates a submodule *

        *
      • *
      • *

        * 120000 indicates a symlink *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. */ public BlobMetadata withMode(String mode) { setMode(mode); 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 (getBlobId() != null) sb.append("BlobId: ").append(getBlobId()).append(","); if (getPath() != null) sb.append("Path: ").append(getPath()).append(","); if (getMode() != null) sb.append("Mode: ").append(getMode()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof BlobMetadata == false) return false; BlobMetadata other = (BlobMetadata) obj; if (other.getBlobId() == null ^ this.getBlobId() == null) return false; if (other.getBlobId() != null && other.getBlobId().equals(this.getBlobId()) == false) return false; if (other.getPath() == null ^ this.getPath() == null) return false; if (other.getPath() != null && other.getPath().equals(this.getPath()) == false) return false; if (other.getMode() == null ^ this.getMode() == null) return false; if (other.getMode() != null && other.getMode().equals(this.getMode()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBlobId() == null) ? 0 : getBlobId().hashCode()); hashCode = prime * hashCode + ((getPath() == null) ? 0 : getPath().hashCode()); hashCode = prime * hashCode + ((getMode() == null) ? 0 : getMode().hashCode()); return hashCode; } @Override public BlobMetadata clone() { try { return (BlobMetadata) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.codecommit.model.transform.BlobMetadataMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy