Source: model/V1ImageReplacement.js

/*
 * Signadot API
 * API for Signadot Sandboxes
 *
 * OpenAPI spec version: 1.0
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 *
 * Swagger Codegen version: 2.4.25
 *
 * Do not edit the class manually.
 *
 */

import {ApiClient} from '../ApiClient';

/**
 * The V1ImageReplacement model module.
 * @module model/V1ImageReplacement
 */
export class V1ImageReplacement {
  /**
   * Constructs a new <code>V1ImageReplacement</code>.
   * @alias module:model/V1ImageReplacement
   * @class
   */
  constructor() {
  }

  /**
   * Constructs a <code>V1ImageReplacement</code> from a plain JavaScript object, optionally creating a new instance.
   * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
   * @param {Object} data The plain JavaScript object bearing properties of interest.
   * @param {module:model/V1ImageReplacement} obj Optional instance to populate.
   * @return {module:model/V1ImageReplacement} The populated <code>V1ImageReplacement</code> instance.
   */
  static constructFromObject(data, obj) {
    if (data) {
      obj = obj || new V1ImageReplacement();
      if (data.hasOwnProperty('name'))
        obj.name = ApiClient.convertToType(data['name'], 'String');
      if (data.hasOwnProperty('namespace'))
        obj.namespace = ApiClient.convertToType(data['namespace'], 'String');
      if (data.hasOwnProperty('newName'))
        obj.newName = ApiClient.convertToType(data['newName'], 'String');
      if (data.hasOwnProperty('newTag'))
        obj.newTag = ApiClient.convertToType(data['newTag'], 'String');
    }
    return obj;
  }
}

/**
 * Name specifies which image name in live workloads will be replaced.  Example: us.gcr.io/my-staging-registry/widget
 * @member {String} name
 */
V1ImageReplacement.prototype.name = undefined;

/**
 * Namespace optionally specifies which namespace will be searched.
 * @member {String} namespace
 */
V1ImageReplacement.prototype.namespace = undefined;

/**
 * NewName provides a replacement for the image name (the part before the tag). If this is left unset, the image name will not be changed.  Example: us.gcr.io/my-dev-registry/username/widget
 * @member {String} newName
 */
V1ImageReplacement.prototype.newName = undefined;

/**
 * NewTag provides a replacement tag for the image. If this is left unset, the image tag will not be changed.  Example: v1.0.0-snapshot-abc123
 * @member {String} newTag
 */
V1ImageReplacement.prototype.newTag = undefined;