Class SetupImpl

java.lang.Object
com.eqixiac.equinix.networkedge.client.implementation.SetupImpl
All Implemented Interfaces:
Setup

public class SetupImpl extends Object implements Setup
Author:
ianjones
  • Constructor Details

    • SetupImpl

      public SetupImpl()
  • Method Details

    • listAccounts

      public List<Account> listAccounts(MetroCode metroCode)
      Description copied from interface: Setup
      Lists available Accounts in the provided metro.
      Specified by:
      listAccounts in interface Setup
      Parameters:
      metroCode - the MetroCode of the accounts.
      Returns:
      List
    • listAllAccounts

      public List<Account> listAllAccounts()
      Description copied from interface: Setup
      Lists available Accounts in all available metros. Note that this can be a slow operation as it checks every metro and then de-dupes accounts based on accountId and then referenceId.
      Specified by:
      listAllAccounts in interface Setup
      Returns:
      List
    • distinctByKey

      public static <T> Predicate<T> distinctByKey(Function<? super T, ?> keyExtractor)
    • listMetros

      public PaginatedList<Metro> listMetros()
      Description copied from interface: Setup
      Lists available Metros with Network Edge present.
      Specified by:
      listMetros in interface Setup
      Returns:
      PaginatedList
    • listMetrosByRegion

      public PaginatedList<Metro> listMetrosByRegion(Region region)
      Description copied from interface: Setup
      Lists available Metros with Network Edge present in the specified Region.
      Specified by:
      listMetrosByRegion in interface Setup
      Parameters:
      region - the Region of the metros.
      Returns:
      PaginatedList
    • getAgreementStatus

      public AgreementStatus getAgreementStatus(String accountNumber)
      Description copied from interface: Setup
      Returns the Agreement Status for the provided account number.
      Specified by:
      getAgreementStatus in interface Setup
      Parameters:
      accountNumber - the unique account identifier.
      Returns:
      String
    • createAgreement

      public AgreementStatus createAgreement(String accountNumber, String termsVersionId)
      Description copied from interface: Setup
      Creates an Agreement for the provided account number. The termsVersionId can be obtained from getAgreementStatus().
      Specified by:
      createAgreement in interface Setup
      Parameters:
      accountNumber - the unique account identifier.
      termsVersionId - the unique identifier of the agreement terms version.
      Returns:
      AgreementStatus
    • getVendorsTerms

      public String getVendorsTerms(String vendorPackage, LicenseType licenseType)
      Description copied from interface: Setup
      Returns the vendor terms for the specified vendor package and license type.
      Specified by:
      getVendorsTerms in interface Setup
      Parameters:
      vendorPackage - the desired vendor package.
      licenseType - the desired LicenseType.
      Returns:
      String
    • getOrderTerms

      public String getOrderTerms()
      Description copied from interface: Setup
      Returns the order terms for Network Edge.
      Specified by:
      getOrderTerms in interface Setup
      Returns:
      String
    • getPricing

      public Pricing getPricing(RequestBuilder.Pricing requestBuilder)
      Gets pricing information based on the parameters provided.
      Specified by:
      getPricing in interface Setup
      Parameters:
      requestBuilder - the desired query parameters.
      Returns:
      Pricing
    • getPricing

      public Pricing getPricing(String deviceUuid)
      Gets pricing information for the specified Device.
      Specified by:
      getPricing in interface Setup
      Parameters:
      deviceUuid - the unique identifier of the Device.
      Returns:
      Pricing
    • getOrderSummary

      public byte[] getOrderSummary(RequestBuilder.OrderSummary requestBuilder)
      Description copied from interface: Setup
      Gets the order summary document based on the parameters provided.
      Specified by:
      getOrderSummary in interface Setup
      Parameters:
      requestBuilder - the desired query parameters.
      Returns:
      the order summary as a byte array.
    • uploadFile

      public String uploadFile(MetroCode metroCode, String deviceTypeCode, FileProcessType processType, DeviceManagementType deviceManagementType, LicenseType licenseType, String fileContents)
      Description copied from interface: Setup
      Uploads a generic file (a license file or a cloud-init / bootstrap file) and returns the unique id of the uploaded file. The returned file id can subsequently be referenced when creating a device or triggering an RMA (e.g. as cloudInitFileId or licenseFileId).
      Specified by:
      uploadFile in interface Setup
      Parameters:
      metroCode - the MetroCode the file applies to.
      deviceTypeCode - the device type code the file applies to (e.g. C8000V).
      processType - whether the file is a LICENSE or CLOUD_INIT file.
      deviceManagementType - the DeviceManagementType, or null.
      licenseType - the LicenseType, or null.
      fileContents - the contents of the file to upload.
      Returns:
      String the unique id of the uploaded file.
    • listDowntimeNotifications

      public DowntimeNotification listDowntimeNotifications()
      Description copied from interface: Setup
      Returns the current planned and unplanned downtime notifications for Network Edge APIs and infrastructure.
      Specified by:
      listDowntimeNotifications in interface Setup
      Returns:
      DowntimeNotification