text:
module Aws::ACMPCA
  module Types

    # Contains information about the certificate subject. The certificate
    # can be one issued by your private certificate authority (CA) or it can
    # be your private CA certificate. The **Subject** field in the
    # certificate identifies the entity that owns or controls the public key
    # in the certificate. The entity can be a user, computer, device, or
    # service. The **Subject** must contain an X.500 distinguished name
    # (DN). A DN is a sequence of relative distinguished names (RDNs). The
    # RDNs are separated by commas in the certificate. The DN must be unique
    # for each entity, but your private CA can issue more than one
    # certificate with the same DN to the same entity.
    #
    # @note When making an API call, you may pass ASN1Subject
    #   data as a hash:
    #
    #       {
    #         country: "CountryCodeString",
    #         organization: "String64",
    #         organizational_unit: "String64",
    #         distinguished_name_qualifier: "DistinguishedNameQualifierString",
    #         state: "String128",
    #         common_name: "String64",
    #         serial_number: "String64",
    #         locality: "String128",
    #         title: "String64",
    #         surname: "String40",
    #         given_name: "String16",
    #         initials: "String5",
    #         pseudonym: "String128",
    #         generation_qualifier: "String3",
    #       }
    #
    # @!attribute [rw] country
    #   Two-digit code that specifies the country in which the certificate
    #   subject located.
    #   @return [String]
    #
    # @!attribute [rw] organization
    #   Legal name of the organization with which the certificate subject is
    #   affiliated.
    #   @return [String]
    #
    # @!attribute [rw] organizational_unit
    #   A subdivision or unit of the organization (such as sales or finance)
    #   with which the certificate subject is affiliated.
    #   @return [String]
    #
    # @!attribute [rw] distinguished_name_qualifier
    #   Disambiguating information for the certificate subject.
    #   @return [String]
    #
    # @!attribute [rw] state
    #   State in which the subject of the certificate is located.
    #   @return [String]
    #
    # @!attribute [rw] common_name
    #   Fully qualified domain name (FQDN) associated with the certificate
    #   subject.
    #   @return [String]
    #
    # @!attribute [rw] serial_number
    #   The certificate serial number.
    #   @return [String]
    #
    # @!attribute [rw] locality
    #   The locality (such as a city or town) in which the certificate
    #   subject is located.
    #   @return [String]
    #
    # @!attribute [rw] title
    #   A title such as Mr. or Ms., which is pre-pended to the name to refer
    #   formally to the certificate subject.
    #   @return [String]
    #
    # @!attribute [rw] surname
    #   Family name. In the US and the UK, for example, the surname of an
    #   individual is ordered last. In Asian cultures the surname is
    #   typically ordered first.
    #   @return [String]
    #
    # @!attribute [rw] given_name
    #   First name.
    #   @return [String]
    #
    # @!attribute [rw] initials
    #   Concatenation that typically contains the first letter of the
    #   **GivenName**, the first letter of the middle name if one exists,
    #   and the first letter of the **SurName**.
    #   @return [String]
    #
    # @!attribute [rw] pseudonym
    #   Typically a shortened version of a longer **GivenName**. For
    #   example, Jonathan is often shortened to John. Elizabeth is often
    #   shortened to Beth, Liz, or Eliza.
    #   @return [String]
    #
    # @!attribute [rw] generation_qualifier
    #   Typically a qualifier appended to the name of an individual.
    #   Examples include Jr. for junior, Sr. for senior, and III for third.
    #   @return [String]
    #
    # @see http://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/ASN1Subject AWS API Documentation
    #
    class ASN1Subject < Struct.new(
      :country,
      :organization,
      :organizational_unit,
      :distinguished_name_qualifier,
      :state,
      :common_name,
      :serial_number,
      :locality,
      :title,
      :surname,
      :given_name,
      :initials,
      :pseudonym,
      :generation_qualifier)
      include Aws::Structure
    end

    # Contains information about your private certificate authority (CA).
    # Your private CA can issue and revoke X.509 digital certificates.
    # Digital certificates verify that the entity named in the certificate
    # **Subject** field owns or controls the public key contained in the
    # **Subject Public Key Info** field. Call the CreateCertificateAuthority
    # operation to create your private CA. You must then call the
    # GetCertificateAuthorityCertificate operation to retrieve a private CA
    # certificate signing request (CSR). Take the CSR to your on-premises CA
    # and sign it with the root CA certificate or a subordinate certificate.
    # Call the ImportCertificateAuthorityCertificate operation to import the
    # signed certificate into AWS Certificate Manager (ACM).
    #
    # @!attribute [rw] arn
    #   Amazon Resource Name (ARN) for your private certificate authority
    #   (CA). The format is ` 12345678-1234-1234-1234-123456789012 `.
    #   @return [String]
    #
    # @!attribute [rw] created_at
    #   Date and time at which your private CA was created.
    #   @return [Time]
    #
    # @!attribute [rw] last_state_change_at
    #   Date and time at which your private CA was last updated.
    #   @return [Time]
    #
    # @!attribute [rw] type
    #   Type of your private CA.
    #   @return [String]
    #
    # @!attribute [rw] serial
    #   Serial number of your private CA.
    #   @return [String]
    #
    # @!attribute [rw] status
    #   Status of your private CA.
    #   @return [String]
    #
    # @!attribute [rw] not_before
    #   Date and time before which your private CA certificate is not valid.
    #   @return [Time]
    #
    # @!attribute [rw] not_after
    #   Date and time after which your private CA certificate is not valid.
    #   @return [Time]
    #
    # @!attribute [rw] failure_reason
    #   Reason the request to create your private CA failed.
    #   @return [String]
    #
    # @!attribute [rw] certificate_authority_configuration
    #   Your private CA configuration.
    #   @return [Types::CertificateAuthorityConfiguration]
    #
    # @!attribute [rw] revocation_configuration
    #   Information about the certificate revocation list (CRL) created and
    #   maintained by your private CA.
    #   @return [Types::RevocationConfiguration]
    #
    # @!attribute [rw] restorable_until
    #   The period during which a deleted CA can be restored. For more
    #   information, see the `PermanentDeletionTimeInDays` parameter of the
    #   DeleteCertificateAuthorityRequest operation.
    #   @return [Time]
    #
    # @see http://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/CertificateAuthority AWS API Documentation
    #
    class CertificateAuthority < Struct.new(
      :arn,
      :created_at,
      :last_state_change_at,
      :type,
      :serial,
      :status,
      :not_before,
      :not_after,
      :failure_reason,
      :certificate_authority_configuration,
      :revocation_configuration,
      :restorable_until)
      include Aws::Structure
    end

    # Contains configuration information for your private certificate
    # authority (CA). This includes information about the class of public
    # key algorithm and the key pair that your private CA creates when it
    # issues a certificate, the signature algorithm it uses used when
    # issuing certificates, and its X.500 distinguished name. You must
    # specify this information when you call the CreateCertificateAuthority
    # operation.
    #
    # @note When making an API call, you may pass CertificateAuthorityConfiguration
    #   data as a hash:
    #
    #       {
    #         key_algorithm: "RSA_2048", # required, accepts RSA_2048, RSA_4096, EC_prime256v1, EC_secp384r1
    #         signing_algorithm: "SHA256WITHECDSA", # required, accepts SHA256WITHECDSA, SHA384WITHECDSA, SHA512WITHECDSA, SHA256WITHRSA, SHA384WITHRSA, SHA512WITHRSA
    #         subject: { # required
    #           country: "CountryCodeString",
    #           organization: "String64",
    #           organizational_unit: "String64",
    #           distinguished_name_qualifier: "DistinguishedNameQualifierString",
    #           state: "String128",
    #           common_name: "String64",
    #           serial_number: "String64",
    #           locality: "String128",
    #           title: "String64",
    #           surname: "String40",
    #           given_name: "String16",
    #           initials: "String5",
    #           pseudonym: "String128",
    #           generation_qualifier: "String3",
    #         },
    #       }
    #
    # @!attribute [rw] key_algorithm
    #   Type of the public key algorithm and size, in bits, of the key pair
    #   that your key pair creates when it issues a certificate.
    #   @return [String]
    #
    # @!attribute [rw] signing_algorithm
    #   Name of the algorithm your private CA uses to sign certificate
    #   requests.
    #   @return [String]
    #
    # @!attribute [rw] subject
    #   Structure that contains X.500 distinguished name information for
    #   your private CA.
    #   @return [Types::ASN1Subject]
    #
    # @see http://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/CertificateAuthorityConfiguration AWS API Documentation
    #
    class CertificateAuthorityConfiguration < Struct.new(
      :key_algorithm,
      :signing_algorithm,
      :subject)
      include Aws::Structure
    end

    # @note When making an API call, you may pass CreateCertificateAuthorityAuditReportRequest
    #   data as a hash:
    #
    #       {
    #         certificate_authority_arn: "Arn", # required
    #         s3_bucket_name: "String", # required
    #         audit_report_response_format: "JSON", # required, accepts JSON, CSV
    #       }
    #
    # @!attribute [rw] certificate_authority_arn
    #   Amazon Resource Name (ARN) of the CA to be audited. This is of the
    #   form:
    #
    #   `arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012
    #   `.
    #   @return [String]
    #
    # @!attribute [rw] s3_bucket_name
    #   Name of the S3 bucket that will contain the audit report.
    #   @return [String]
    #
    # @!attribute [rw] audit_report_response_format
    #   Format in which to create the report. This can be either **JSON** or
    #   **CSV**.
    #   @return [String]
    #
    # @see http://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/CreateCertificateAuthorityAuditReportRequest AWS API Documentation
    #
    class CreateCertificateAuthorityAuditReportRequest < Struct.new(
      :certificate_authority_arn,
      :s3_bucket_name,
      :audit_report_response_format)
      include Aws::Structure
    end

    # @!attribute [rw] audit_report_id
    #   An alphanumeric string that contains a report identifier.
    #   @return [String]
    #
    # @!attribute [rw] s3_key
    #   The **key** that uniquely identifies the report file in your S3
    #   bucket.
    #   @return [String]
    #
    # @see http://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/CreateCertificateAuthorityAuditReportResponse AWS API Documentation
    #
    class CreateCertificateAuthorityAuditReportResponse < Struct.new(
      :audit_report_id,
      :s3_key)
      include Aws::Structure
    end

    # @note When making an API call, you may pass CreateCertificateAuthorityRequest
    #   data as a hash:
    #
    #       {
    #         certificate_authority_configuration: { # required
    #           key_algorithm: "RSA_2048", # required, accepts RSA_2048, RSA_4096, EC_prime256v1, EC_secp384r1
    #           signing_algorithm: "SHA256WITHECDSA", # required, accepts SHA256WITHECDSA, SHA384WITHECDSA, SHA512WITHECDSA, SHA256WITHRSA, SHA384WITHRSA, SHA512WITHRSA
    #           subject: { # required
    #             country: "CountryCodeString",
    #             organization: "String64",
    #             organizational_unit: "String64",
    #             distinguished_name_qualifier: "DistinguishedNameQualifierString",
    #             state: "String128",
    #             common_name: "String64",
    #             serial_number: "String64",
    #             locality: "String128",
    #             title: "String64",
    #             surname: "String40",
    #             given_name: "String16",
    #             initials: "String5",
    #             pseudonym: "String128",
    #             generation_qualifier: "String3",
    #           },
    #         },
    #         revocation_configuration: {
    #           crl_configuration: {
    #             enabled: false, # required
    #             expiration_in_days: 1,
    #             custom_cname: "String253",
    #             s3_bucket_name: "String3To255",
    #           },
    #         },
    #         certificate_authority_type: "SUBORDINATE", # required, accepts SUBORDINATE
    #         idempotency_token: "IdempotencyToken",
    #       }
    #
    # @!attribute [rw] certificate_authority_configuration
    #   Name and bit size of the private key algorithm, the name of the
    #   signing algorithm, and X.500 certificate subject information.
    #   @return [Types::CertificateAuthorityConfiguration]
    #
    # @!attribute [rw] revocation_configuration
    #   Contains a Boolean value that you can use to enable a certification
    #   revocation list (CRL) for the CA, the name of the S3 bucket to which
    #   ACM PCA will write the CRL, and an optional CNAME alias that you can
    #   use to hide the name of your bucket in the **CRL Distribution
    #   Points** extension of your CA certificate. For more information, see
    #   the CrlConfiguration structure.
    #   @return [Types::RevocationConfiguration]
    #
    # @!attribute [rw] certificate_authority_type
    #   The type of the certificate authority. Currently, this must be
    #   **SUBORDINATE**.
    #   @return [String]
    #
    # @!attribute [rw] idempotency_token
    #   Alphanumeric string that can be used to distinguish between calls to
    #   **CreateCertificateAuthority**. Idempotency tokens time out after
    #   five minutes. Therefore, if you call **CreateCertificateAuthority**
    #   multiple times with the same idempotency token within a five minute
    #   period, ACM PCA recognizes that you are requesting only one
    #   certificate. As a result, ACM PCA issues only one. If you change the
    #   idempotency token for each call, however, ACM PCA recognizes that
    #   you are requesting multiple certificates.
    #   @return [String]
    #
    # @see http://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/CreateCertificateAuthorityRequest AWS API Documentation
    #
    class CreateCertificateAuthorityRequest < Struct.new(
      :certificate_authority_configuration,
      :revocation_configuration,
      :certificate_authority_type,
      :idempotency_token)
      include Aws::Structure
    end

    # @!attribute [rw] certificate_authority_arn
    #   If successful, the Amazon Resource Name (ARN) of the certificate
    #   authority (CA). This is of the form:
    #
    #   `arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012
    #   `.
    #   @return [String]
    #
    # @see http://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/CreateCertificateAuthorityResponse AWS API Documentation
    #
    class CreateCertificateAuthorityResponse < Struct.new(
      :certificate_authority_arn)
      include Aws::Structure
    end

    # Contains configuration information for a certificate revocation list
    # (CRL). Your private certificate authority (CA) creates base CRLs.
    # Delta CRLs are not supported. You can enable CRLs for your new or an
    # existing private CA by setting the **Enabled** parameter to `true`.
    # Your private CA writes CRLs to an S3 bucket that you specify in the
    # **S3BucketName** parameter. You can hide the name of your bucket by
    # specifying a value for the **CustomCname** parameter. Your private CA
    # copies the CNAME or the S3 bucket name to the **CRL Distribution
    # Points** extension of each certificate it issues. Your S3 bucket
    # policy must give write permission to ACM PCA.
    #
    # Your private CA uses the value in the **ExpirationInDays** parameter
    # to calculate the **nextUpdate** field in the CRL. The CRL is refreshed
    # at 1/2 the age of next update or when a certificate is revoked. When a
    # certificate is revoked, it is recorded in the next CRL that is
    # generated and in the next audit report. Only time valid certificates
    # are listed in the CRL. Expired certificates are not included.
    #
    # CRLs contain the following fields:
    #
    # * **Version**\: The current version number defined in RFC 5280 is V2.
    #   The integer value is 0x1.
    #
    # * **Signature Algorithm**\: The name of the algorithm used to sign the
    #   CRL.
    #
    # * **Issuer**\: The X.500 distinguished name of your private CA that
    #   issued the CRL.
    #
    # * **Last Update**\: The issue date and time of this CRL.
    #
    # * **Next Update**\: The day and time by which the next CRL will be
    #   issued.
    #
    # * **Revoked Certificates**\: List of revoked certificates. Each list
    #   item contains the following information.
    #
    #   * **Serial Number**\: The serial number, in hexadecimal format, of
    #     the revoked certificate.
    #
    #   * **Revocation Date**\: Date and time the certificate was revoked.
    #
    #   * **CRL Entry Extensions**\: Optional extensions for the CRL entry.
    #
    #     * **X509v3 CRL Reason Code**\: Reason the certificate was revoked.
    #
    #     ^
    #
    # * **CRL Extensions**\: Optional extensions for the CRL.
    #
    #   * **X509v3 Authority Key Identifier**\: Identifies the public key
    #     associated with the private key used to sign the certificate.
    #
    #   * **X509v3 CRL Number:**\: Decimal sequence number for the CRL.
    #
    # * **Signature Algorithm**\: Algorithm used by your private CA to sign
    #   the CRL.
    #
    # * **Signature Value**\: Signature computed over the CRL.
    #
    # Certificate revocation lists created by ACM PCA are DER-encoded. You
    # can use the following OpenSSL command to list a CRL.
    #
    # `openssl crl -inform DER -text -in crl_path -noout`
    #
    # @note When making an API call, you may pass CrlConfiguration
    #   data as a hash:
    #
    #       {
    #         enabled: false, # required
    #         expiration_in_days: 1,
    #         custom_cname: "String253",
    #         s3_bucket_name: "String3To255",
    #       }
    #
    # @!attribute [rw] enabled
    #   Boolean value that specifies whether certificate revocation lists
    #   (CRLs) are enabled. You can use this value to enable certificate
    #   revocation for a new CA when you call the CreateCertificateAuthority
    #   operation or for an existing CA when you call the
    #   UpdateCertificateAuthority operation.
    #   @return [Boolean]
    #
    # @!attribute [rw] expiration_in_days
    #   Number of days until a certificate expires.
    #   @return [Integer]
    #
    # @!attribute [rw] custom_cname
    #   Name inserted into the certificate **CRL Distribution Points**
    #   extension that enables the use of an alias for the CRL distribution
    #   point. Use this value if you don't want the name of your S3 bucket
    #   to be public.
    #   @return [String]
    #
    # @!attribute [rw] s3_bucket_name
    #   Name of the S3 bucket that contains the CRL. If you do not provide a
    #   value for the **CustomCname** argument, the name of your S3 bucket
    #   is placed into the **CRL Distribution Points** extension of the
    #   issued certificate. You can change the name of your bucket by
    #   calling the UpdateCertificateAuthority operation. You must specify a
    #   bucket policy that allows ACM PCA to write the CRL to your bucket.
    #   @return [String]
    #
    # @see http://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/CrlConfiguration AWS API Documentation
    #
    class CrlConfiguration < Struct.new(
      :enabled,
      :expiration_in_days,
      :custom_cname,
      :s3_bucket_name)
      include Aws::Structure
    end

    # @note When making an API call, you may pass DeleteCertificateAuthorityRequest
    #   data as a hash:
    #
    #       {
    #         certificate_authority_arn: "Arn", # required
    #         permanent_deletion_time_in_days: 1,
    #       }
    #
    # @!attribute [rw] certificate_authority_arn
    #   The Amazon Resource Name (ARN) that was returned when you called
    #   CreateCertificateAuthority. This must have the following form:
    #
    #   `arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012
    #   `.
    #   @return [String]
    #
    # @!attribute [rw] permanent_deletion_time_in_days
    #   The number of days to make a CA restorable after it has been
    #   deleted. This can be anywhere from 7 to 30 days, with 30 being the
    #   default.
    #   @return [Integer]
    #
    # @see http://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/DeleteCertificateAuthorityRequest AWS API Documentation
    #
    class DeleteCertificateAuthorityRequest < Struct.new(
      :certificate_authority_arn,
      :permanent_deletion_time_in_days)
      include Aws::Structure
    end

    # @note When making an API call, you may pass DescribeCertificateAuthorityAuditReportRequest
    #   data as a hash:
    #
    #       {
    #         certificate_authority_arn: "Arn", # required
    #         audit_report_id: "AuditReportId", # required
    #       }
    #
    # @!attribute [rw] certificate_authority_arn
    #   The Amazon Resource Name (ARN) of the private CA. This must be of
    #   the form:
    #
    #   `arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012
    #   `.
    #   @return [String]
    #
    # @!attribute [rw] audit_report_id
    #   The report ID returned by calling the
    #   CreateCertificateAuthorityAuditReport operation.
    #   @return [String]
    #
    # @see http://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/DescribeCertificateAuthorityAuditReportRequest AWS API Documentation
    #
    class DescribeCertificateAuthorityAuditReportRequest < Struct.new(
      :certificate_authority_arn,
      :audit_report_id)
      include Aws::Structure
    end

    # @!attribute [rw] audit_report_status
    #   Specifies whether report creation is in progress, has succeeded, or
    #   has failed.
    #   @return [String]
    #
    # @!attribute [rw] s3_bucket_name
    #   Name of the S3 bucket that contains the report.
    #   @return [String]
    #
    # @!attribute [rw] s3_key
    #   S3 **key** that uniquely identifies the report file in your S3
    #   bucket.
    #   @return [String]
    #
    # @!attribute [rw] created_at
    #   The date and time at which the report was created.
    #   @return [Time]
    #
    # @see http://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/DescribeCertificateAuthorityAuditReportResponse AWS API Documentation
    #
    class DescribeCertificateAuthorityAuditReportResponse < Struct.new(
      :audit_report_status,
      :s3_bucket_name,
      :s3_key,
      :created_at)
      include Aws::Structure
    end

    # @note When making an API call, you may pass DescribeCertificateAuthorityRequest
    #   data as a hash:
    #
    #       {
    #         certificate_authority_arn: "Arn", # required
    #       }
    #
    # @!attribute [rw] certificate_authority_arn
    #   The Amazon Resource Name (ARN) that was returned when you called
    #   CreateCertificateAuthority. This must be of the form:
    #
    #   `arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012
    #   `.
    #   @return [String]
    #
    # @see http://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/DescribeCertificateAuthorityRequest AWS API Documentation
    #
    class DescribeCertificateAuthorityRequest < Struct.new(
      :certificate_authority_arn)
      include Aws::Structure
    end

    # @!attribute [rw] certificate_authority
    #   A CertificateAuthority structure that contains information about
    #   your private CA.
    #   @return [Types::CertificateAuthority]
    #
    # @see http://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/DescribeCertificateAuthorityResponse AWS API Documentation
    #
    class DescribeCertificateAuthorityResponse < Struct.new(
      :certificate_authority)
      include Aws::Structure
    end

    # @note When making an API call, you may pass GetCertificateAuthorityCertificateRequest
    #   data as a hash:
    #
    #       {
    #         certificate_authority_arn: "Arn", # required
    #       }
    #
    # @!attribute [rw] certificate_authority_arn
    #   The Amazon Resource Name (ARN) of your private CA. This is of the
    #   form:
    #
    #   `arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012
    #   `.
    #   @return [String]
    #
    # @see http://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificateAuthorityCertificateRequest AWS API Documentation
    #
    class GetCertificateAuthorityCertificateRequest < Struct.new(
      :certificate_authority_arn)
      include Aws::Structure
    end

    # @!attribute [rw] certificate
    #   Base64-encoded certificate authority (CA) certificate.
    #   @return [String]
    #
    # @!attribute [rw] certificate_chain
    #   Base64-encoded certificate chain that includes any intermediate
    #   certificates and chains up to root on-premises certificate that you
    #   used to sign your private CA certificate. The chain does not include
    #   your private CA certificate.
    #   @return [String]
    #
    # @see http://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificateAuthorityCertificateResponse AWS API Documentation
    #
    class GetCertificateAuthorityCertificateResponse < Struct.new(
      :certificate,
      :certificate_chain)
      include Aws::Structure
    end

    # @note When making an API call, you may pass GetCertificateAuthorityCsrRequest
    #   data as a hash:
    #
    #       {
    #         certificate_authority_arn: "Arn", # required
    #       }
    #
    # @!attribute [rw] certificate_authority_arn
    #   The Amazon Resource Name (ARN) that was returned when you called the
    #   CreateCertificateAuthority operation. This must be of the form:
    #
    #   `arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012
    #   `
    #   @return [String]
    #
    # @see http://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificateAuthorityCsrRequest AWS API Documentation
    #
    class GetCertificateAuthorityCsrRequest < Struct.new(
      :certificate_authority_arn)
      include Aws::Structure
    end

    # @!attribute [rw] csr
    #   The base64 PEM-encoded certificate signing request (CSR) for your
    #   private CA certificate.
    #   @return [String]
    #
    # @see http://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificateAuthorityCsrResponse AWS API Documentation
    #
    class GetCertificateAuthorityCsrResponse < Struct.new(
      :csr)
      include Aws::Structure
    end

    # @note When making an API call, you may pass GetCertificateRequest
    #   data as a hash:
    #
    #       {
    #         certificate_authority_arn: "Arn", # required
    #         certificate_arn: "Arn", # required
    #       }
    #
    # @!attribute [rw] certificate_authority_arn
    #   The Amazon Resource Name (ARN) that was returned when you called
    #   CreateCertificateAuthority. This must be of the form:
    #
    #   `arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012
    #   `.
    #   @return [String]
    #
    # @!attribute [rw] certificate_arn
    #   The ARN of the issued certificate. The ARN contains the certificate
    #   serial number and must be in the following form:
    #
    #   `arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012/certificate/286535153982981100925020015808220737245
    #   `
    #   @return [String]
    #
    # @see http://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificateRequest AWS API Documentation
    #
    class GetCertificateRequest < Struct.new(
      :certificate_authority_arn,
      :certificate_arn)
      include Aws::Structure
    end

    # @!attribute [rw] certificate
    #   The base64 PEM-encoded certificate specified by the `CertificateArn`
    #   parameter.
    #   @return [String]
    #
    # @!attribute [rw] certificate_chain
    #   The base64 PEM-encoded certificate chain that chains up to the
    #   on-premises root CA certificate that you used to sign your private
    #   CA certificate.
    #   @return [String]
    #
    # @see http://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificateResponse AWS API Documentation
    #
    class GetCertificateResponse < Struct.new(
      :certificate,
      :certificate_chain)
      include Aws::Structure
    end

    # @note When making an API call, you may pass ImportCertificateAuthorityCertificateRequest
    #   data as a hash:
    #
    #       {
    #         certificate_authority_arn: "Arn", # required
    #         certificate: "data", # required
    #         certificate_chain: "data", # required
    #       }
    #
    # @!attribute [rw] certificate_authority_arn
    #   The Amazon Resource Name (ARN) that was returned when you called
    #   CreateCertificateAuthority. This must be of the form:
    #
    #   `arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012
    #   `
    #   @return [String]
    #
    # @!attribute [rw] certificate
    #   The PEM-encoded certificate for your private CA. This must be signed
    #   by using your on-premises CA.
    #   @return [String]
    #
    # @!attribute [rw] certificate_chain
    #   A PEM-encoded file that contains all of your certificates, other
    #   than the certificate you're importing, chaining up to your root CA.
    #   Your on-premises root certificate is the last in the chain, and each
    #   certificate in the chain signs the one preceding.
    #   @return [String]
    #
    # @see http://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/ImportCertificateAuthorityCertificateRequest AWS API Documentation
    #
    class ImportCertificateAuthorityCertificateRequest < Struct.new(
      :certificate_authority_arn,
      :certificate,
      :certificate_chain)
      include Aws::Structure
    end

    # @note When making an API call, you may pass IssueCertificateRequest
    #   data as a hash:
    #
    #       {
    #         certificate_authority_arn: "Arn", # required
    #         csr: "data", # required
    #         signing_algorithm: "SHA256WITHECDSA", # required, accepts SHA256WITHECDSA, SHA384WITHECDSA, SHA512WITHECDSA, SHA256WITHRSA, SHA384WITHRSA, SHA512WITHRSA
    #         validity: { # required
    #           value: 1, # required
    #           type: "END_DATE", # required, accepts END_DATE, ABSOLUTE, DAYS, MONTHS, YEARS
    #         },
    #         idempotency_token: "IdempotencyToken",
    #       }
    #
    # @!attribute [rw] certificate_authority_arn
    #   The Amazon Resource Name (ARN) that was returned when you called
    #   CreateCertificateAuthority. This must be of the form:
    #
    #   `arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012
    #   `
    #   @return [String]
    #
    # @!attribute [rw] csr
    #   The certificate signing request (CSR) for the certificate you want
    #   to issue. You can use the following OpenSSL command to create the
    #   CSR and a 2048 bit RSA private key.
    #
    #   `openssl req -new -newkey rsa:2048 -days 365 -keyout
    #   private/test_cert_priv_key.pem -out csr/test_cert_.csr`
    #
    #   If you have a configuration file, you can use the following OpenSSL
    #   command. The `usr_cert` block in the configuration file contains
    #   your X509 version 3 extensions.
    #
    #   `openssl req -new -config openssl_rsa.cnf -extensions usr_cert
    #   -newkey rsa:2048 -days -365 -keyout private/test_cert_priv_key.pem
    #   -out csr/test_cert_.csr`
    #   @return [String]
    #
    # @!attribute [rw] signing_algorithm
    #   The name of the algorithm that will be used to sign the certificate
    #   to be issued.
    #   @return [String]
    #
    # @!attribute [rw] validity
    #   The type of the validity period.
    #   @return [Types::Validity]
    #
    # @!attribute [rw] idempotency_token
    #   Custom string that can be used to distinguish between calls to the
    #   **IssueCertificate** operation. Idempotency tokens time out after
    #   one hour. Therefore, if you call **IssueCertificate** multiple times
    #   with the same idempotency token within 5 minutes, ACM PCA recognizes
    #   that you are requesting only one certificate and will issue only
    #   one. If you change the idempotency token for each call, PCA
    #   recognizes that you are requesting multiple certificates.
    #   @return [String]
    #
    # @see http://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/IssueCertificateRequest AWS API Documentation
    #
    class IssueCertificateRequest < Struct.new(
      :certificate_authority_arn,
      :csr,
      :signing_algorithm,
      :validity,
      :idempotency_token)
      include Aws::Structure
    end

    # @!attribute [rw] certificate_arn
    #   The Amazon Resource Name (ARN) of the issued certificate and the
    #   certificate serial number. This is of the form:
    #
    #   `arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012/certificate/286535153982981100925020015808220737245
    #   `
    #   @return [String]
    #
    # @see http://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/IssueCertificateResponse AWS API Documentation
    #
    class IssueCertificateResponse < Struct.new(
      :certificate_arn)
      include Aws::Structure
    end

    # @note When making an API call, you may pass ListCertificateAuthoritiesRequest
    #   data as a hash:
    #
    #       {
    #         next_token: "NextToken",
    #         max_results: 1,
    #       }
    #
    # @!attribute [rw] next_token
    #   Use this parameter when paginating results in a subsequent request
    #   after you receive a response with truncated results. Set it to the
    #   value of the `NextToken` parameter from the response you just
    #   received.
    #   @return [String]
    #
    # @!attribute [rw] max_results
    #   Use this parameter when paginating results to specify the maximum
    #   number of items to return in the response on each page. If
    #   additional items exist beyond the number you specify, the
    #   `NextToken` element is sent in the response. Use this `NextToken`
    #   value in a subsequent request to retrieve additional items.
    #   @return [Integer]
    #
    # @see http://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/ListCertificateAuthoritiesRequest AWS API Documentation
    #
    class ListCertificateAuthoritiesRequest < Struct.new(
      :next_token,
      :max_results)
      include Aws::Structure
    end

    # @!attribute [rw] certificate_authorities
    #   Summary information about each certificate authority you have
    #   created.
    #   @return [Array<Types::CertificateAuthority>]
    #
    # @!attribute [rw] next_token
    #   When the list is truncated, this value is present and should be used
    #   for the `NextToken` parameter in a subsequent pagination request.
    #   @return [String]
    #
    # @see http://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/ListCertificateAuthoritiesResponse AWS API Documentation
    #
    class ListCertificateAuthoritiesResponse < Struct.new(
      :certificate_authorities,
      :next_token)
      include Aws::Structure
    end

    # @note When making an API call, you may pass ListTagsRequest
    #   data as a hash:
    #
    #       {
    #         certificate_authority_arn: "Arn", # required
    #         next_token: "NextToken",
    #         max_results: 1,
    #       }
    #
    # @!attribute [rw] certificate_authority_arn
    #   The Amazon Resource Name (ARN) that was returned when you called the
    #   CreateCertificateAuthority operation. This must be of the form:
    #
    #   `arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012
    #   `
    #   @return [String]
    #
    # @!attribute [rw] next_token
    #   Use this parameter when paginating results in a subsequent request
    #   after you receive a response with truncated results. Set it to the
    #   value of **NextToken** from the response you just received.
    #   @return [String]
    #
    # @!attribute [rw] max_results
    #   Use this parameter when paginating results to specify the maximum
    #   number of items to return in the response. If additional items exist
    #   beyond the number you specify, the **NextToken** element is sent in
    #   the response. Use this **NextToken** value in a subsequent request
    #   to retrieve additional items.
    #   @return [Integer]
    #
    # @see http://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/ListTagsRequest AWS API Documentation
    #
    class ListTagsRequest < Struct.new(
      :certificate_authority_arn,
      :next_token,
      :max_results)
      include Aws::Structure
    end

    # @!attribute [rw] tags
    #   The tags associated with your private CA.
    #   @return [Array<Types::Tag>]
    #
    # @!attribute [rw] next_token
    #   When the list is truncated, this value is present and should be used
    #   for the **NextToken** parameter in a subsequent pagination request.
    #   @return [String]
    #
    # @see http://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/ListTagsResponse AWS API Documentation
    #
    class ListTagsResponse < Struct.new(
      :tags,
      :next_token)
      include Aws::Structure
    end

    # @note When making an API call, you may pass RestoreCertificateAuthorityRequest
    #   data as a hash:
    #
    #       {
    #         certificate_authority_arn: "Arn", # required
    #       }
    #
    # @!attribute [rw] certificate_authority_arn
    #   The Amazon Resource Name (ARN) that was returned when you called the
    #   CreateCertificateAuthority operation. This must be of the form:
    #
    #   `arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012
    #   `
    #   @return [String]
    #
    # @see http://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/RestoreCertificateAuthorityRequest AWS API Documentation
    #
    class RestoreCertificateAuthorityRequest < Struct.new(
      :certificate_authority_arn)
      include Aws::Structure
    end

    # Certificate revocation information used by the
    # CreateCertificateAuthority and UpdateCertificateAuthority operations.
    # Your private certificate authority (CA) can create and maintain a
    # certificate revocation list (CRL). A CRL contains information about
    # certificates revoked by your CA. For more information, see
    # RevokeCertificate.
    #
    # @note When making an API call, you may pass RevocationConfiguration
    #   data as a hash:
    #
    #       {
    #         crl_configuration: {
    #           enabled: false, # required
    #           expiration_in_days: 1,
    #           custom_cname: "String253",
    #           s3_bucket_name: "String3To255",
    #         },
    #       }
    #
    # @!attribute [rw] crl_configuration
    #   Configuration of the certificate revocation list (CRL), if any,
    #   maintained by your private CA.
    #   @return [Types::CrlConfiguration]
    #
    # @see http://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/RevocationConfiguration AWS API Documentation
    #
    class RevocationConfiguration < Struct.new(
      :crl_configuration)
      include Aws::Structure
    end

    # @note When making an API call, you may pass RevokeCertificateRequest
    #   data as a hash:
    #
    #       {
    #         certificate_authority_arn: "Arn", # required
    #         certificate_serial: "String128", # required
    #         revocation_reason: "UNSPECIFIED", # required, accepts UNSPECIFIED, KEY_COMPROMISE, CERTIFICATE_AUTHORITY_COMPROMISE, AFFILIATION_CHANGED, SUPERSEDED, CESSATION_OF_OPERATION, PRIVILEGE_WITHDRAWN, A_A_COMPROMISE
    #       }
    #
    # @!attribute [rw] certificate_authority_arn
    #   Amazon Resource Name (ARN) of the private CA that issued the
    #   certificate to be revoked. This must be of the form:
    #
    #   `arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012
    #   `
    #   @return [String]
    #
    # @!attribute [rw] certificate_serial
    #   Serial number of the certificate to be revoked. This must be in
    #   hexadecimal format. You can retrieve the serial number by calling
    #   GetCertificate with the Amazon Resource Name (ARN) of the
    #   certificate you want and the ARN of your private CA. The
    #   **GetCertificate** operation retrieves the certificate in the PEM
    #   format. You can use the following OpenSSL command to list the
    #   certificate in text format and copy the hexadecimal serial number.
    #
    #   `openssl x509 -in file_path -text -noout`
    #
    #   You can also copy the serial number from the console or use the
    #   [DescribeCertificate][1] operation in the *AWS Certificate Manager
    #   API Reference*.
    #
    #
    #
    #   [1]: https://docs.aws.amazon.com/acm/latest/APIReference/API_DescribeCertificate.html
    #   @return [String]
    #
    # @!attribute [rw] revocation_reason
    #   Specifies why you revoked the certificate.
    #   @return [String]
    #
    # @see http://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/RevokeCertificateRequest AWS API Documentation
    #
    class RevokeCertificateRequest < Struct.new(
      :certificate_authority_arn,
      :certificate_serial,
      :revocation_reason)
      include Aws::Structure
    end

    # Tags are labels that you can use to identify and organize your private
    # CAs. Each tag consists of a key and an optional value. You can
    # associate up to 50 tags with a private CA. To add one or more tags to
    # a private CA, call the TagCertificateAuthority operation. To remove a
    # tag, call the UntagCertificateAuthority operation.
    #
    # @note When making an API call, you may pass Tag
    #   data as a hash:
    #
    #       {
    #         key: "TagKey", # required
    #         value: "TagValue",
    #       }
    #
    # @!attribute [rw] key
    #   Key (name) of the tag.
    #   @return [String]
    #
    # @!attribute [rw] value
    #   Value of the tag.
    #   @return [String]
    #
    # @see http://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/Tag AWS API Documentation
    #
    class Tag < Struct.new(
      :key,
      :value)
      include Aws::Structure
    end

    # @note When making an API call, you may pass TagCertificateAuthorityRequest
    #   data as a hash:
    #
    #       {
    #         certificate_authority_arn: "Arn", # required
    #         tags: [ # required
    #           {
    #             key: "TagKey", # required
    #             value: "TagValue",
    #           },
    #         ],
    #       }
    #
    # @!attribute [rw] certificate_authority_arn
    #   The Amazon Resource Name (ARN) that was returned when you called
    #   CreateCertificateAuthority. This must be of the form:
    #
    #   `arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012
    #   `
    #   @return [String]
    #
    # @!attribute [rw] tags
    #   List of tags to be associated with the CA.
    #   @return [Array<Types::Tag>]
    #
    # @see http://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/TagCertificateAuthorityRequest AWS API Documentation
    #
    class TagCertificateAuthorityRequest < Struct.new(
      :certificate_authority_arn,
      :tags)
      include Aws::Structure
    end

    # @note When making an API call, you may pass UntagCertificateAuthorityRequest
    #   data as a hash:
    #
    #       {
    #         certificate_authority_arn: "Arn", # required
    #         tags: [ # required
    #           {
    #             key: "TagKey", # required
    #             value: "TagValue",
    #           },
    #         ],
    #       }
    #
    # @!attribute [rw] certificate_authority_arn
    #   The Amazon Resource Name (ARN) that was returned when you called
    #   CreateCertificateAuthority. This must be of the form:
    #
    #   `arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012
    #   `
    #   @return [String]
    #
    # @!attribute [rw] tags
    #   List of tags to be removed from the CA.
    #   @return [Array<Types::Tag>]
    #
    # @see http://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/UntagCertificateAuthorityRequest AWS API Documentation
    #
    class UntagCertificateAuthorityRequest < Struct.new(
      :certificate_authority_arn,
      :tags)
      include Aws::Structure
    end

    # @note When making an API call, you may pass UpdateCertificateAuthorityRequest
    #   data as a hash:
    #
    #       {
    #         certificate_authority_arn: "Arn", # required
    #         revocation_configuration: {
    #           crl_configuration: {
    #             enabled: false, # required
    #             expiration_in_days: 1,
    #             custom_cname: "String253",
    #             s3_bucket_name: "String3To255",
    #           },
    #         },
    #         status: "CREATING", # accepts CREATING, PENDING_CERTIFICATE, ACTIVE, DELETED, DISABLED, EXPIRED, FAILED
    #       }
    #
    # @!attribute [rw] certificate_authority_arn
    #   Amazon Resource Name (ARN) of the private CA that issued the
    #   certificate to be revoked. This must be of the form:
    #
    #   `arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012
    #   `
    #   @return [String]
    #
    # @!attribute [rw] revocation_configuration
    #   Revocation information for your private CA.
    #   @return [Types::RevocationConfiguration]
    #
    # @!attribute [rw] status
    #   Status of your private CA.
    #   @return [String]
    #
    # @see http://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/UpdateCertificateAuthorityRequest AWS API Documentation
    #
    class UpdateCertificateAuthorityRequest < Struct.new(
      :certificate_authority_arn,
      :revocation_configuration,
      :status)
      include Aws::Structure
    end

    # Length of time for which the certificate issued by your private
    # certificate authority (CA), or by the private CA itself, is valid in
    # days, months, or years. You can issue a certificate by calling the
    # IssueCertificate operation.
    #
    # @note When making an API call, you may pass Validity
    #   data as a hash:
    #
    #       {
    #         value: 1, # required
    #         type: "END_DATE", # required, accepts END_DATE, ABSOLUTE, DAYS, MONTHS, YEARS
    #       }
    #
    # @!attribute [rw] value
    #   Time period.
    #   @return [Integer]
    #
    # @!attribute [rw] type
    #   Specifies whether the `Value` parameter represents days, months, or
    #   years.
    #   @return [String]
    #
    # @see http://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/Validity AWS API Documentation
    #
    class Validity < Struct.new(
      :value,
      :type)
      include Aws::Structure
    end

  end
end


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>OR-Tools: CachedIntervalData</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="navtree.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="styleSheet.tmp.css" rel="stylesheet" type="text/css"/>

OR-Tools
    9.4

Public Member Functions |
Public Attributes |
List of all members

CachedIntervalData

Detailed Description

Definition at line 864 of file scheduling_cuts.cc.

Public Member Functions

 	CachedIntervalData (int t, SchedulingConstraintHelper *helper)

Public Attributes

IntegerValue 	start_min

IntegerValue 	start_max

AffineExpression 	start

IntegerValue 	end_min

IntegerValue 	end_max

AffineExpression 	end

IntegerValue 	size_min

IntegerValue 	demand_min

Constructor & Destructor Documentation

◆ CachedIntervalData()

          CachedIntervalData
          (
          int
          t,

          SchedulingConstraintHelper *
          helper

          )

inline

Definition at line 865 of file scheduling_cuts.cc.

Member Data Documentation

◆ demand_min

          IntegerValue demand_min

Definition at line 882 of file scheduling_cuts.cc.

◆ end

          AffineExpression end

Definition at line 879 of file scheduling_cuts.cc.

◆ end_max

          IntegerValue end_max

Definition at line 878 of file scheduling_cuts.cc.

◆ end_min

          IntegerValue end_min

Definition at line 877 of file scheduling_cuts.cc.

◆ size_min

          IntegerValue size_min

Definition at line 880 of file scheduling_cuts.cc.

◆ start

          AffineExpression start

Definition at line 876 of file scheduling_cuts.cc.

◆ start_max

          IntegerValue start_max

Definition at line 875 of file scheduling_cuts.cc.

◆ start_min

          IntegerValue start_min

Definition at line 874 of file scheduling_cuts.cc.

The documentation for this struct was generated from the following file:

scheduling_cuts.cc

operations_research

sat

CachedIntervalData

Generated by

     1.9.4

redpajama_set_name: RedPajamaGithub


text:
"""
The purpose of this module is to run the tests associated
with a project. The primary mechanism for doing so involves
calling run_single_test.py and collecting the information
returned.
"""

import argparse
import contextlib
import collections
import difflib
import fnmatch
import functools
import glob
import itertools
import os
import subprocess
import sys

# These global variables are unlikely to need to change
PROJECT_EXECUTABLE = "run_single_test.py"
TEST_SUITE_FOLDER = "Test_Suite"
TEST_FILES_TO_POINTS = collections.OrderedDict()
EXTRA_CREDIT_TEST_FILES_TO_POINTS = collections.OrderedDict([
    ("Test_Suite/extra.*", 1)
])
POINTS_FOR_PASSING_ALL = 1
POINTS_FILENAME = os.path.join(TEST_SUITE_FOLDER, "points.txt")
with open(POINTS_FILENAME, 'r') as file_handle:
    for line in file_handle:
        category, point_str = line.split()
        point_value = float(point_str)

        category_path = os.path.join(TEST_SUITE_FOLDER, category)
        TEST_FILES_TO_POINTS[category_path] = point_value

NEEDED_FILES_FILENAME = os.path.join(TEST_SUITE_FOLDER, "needed_files.txt")
with open(NEEDED_FILES_FILENAME, 'r') as file_handle:
    NEEDED_FILES = [line.strip() for line in file_handle]

# These Global Variables may need to be changed depending on the project
NEEDED_FILES_POINTS = 0.5

# Number of seconds to let each test run before calling it a fail.
# Make sure this is strictly larger than the timeout in run_single_test.py.
TEST_TIMEOUT = 20

# Struc that holds per test result
TestOutcome = collections.namedtuple('TestOutcome',
                                     ['file', 'passed', 'output'])

class TestResult(Exception):
    """
    Test results are raised as exceptions.
    """
    pass

class TestFailed(TestResult):
    """
    This is a Failed TestResult.
    """
    pass

class TestPassed(TestResult):
    """
    This is a Passed TestResult.
    """
    pass

class NoMatchingTestsFound(Exception):
    """
    This class is used to indicate no matching tests found.
    """
    pass

class InternalTestSuiteException(Exception):
    """
    This class is used to indicate a failure of
    the testing apparatus (not the student's code).
    """

    def __init__(self, message):
        super(InternalTestSuiteException, self).__init__(message)
        long_message = """
Test Suite or Script is broken:
{}
Contact instructors on Piazza so they can fix it (entirely their fault).
Please include this message and stack trace to assist debugging.
""".format(message)
        self.args = [long_message]

def calculate_grade(outcomes, print_output=True):
    """
    Takes an iterable of TestOutcomes and returns the points
    (and extra credit points) awarded. It also can print the tests outcomes.
    """

    def grade_category(file_token, test_to_passed, weight, proportional=False):
        """
        Takes a pattern (i.e. "test.initial.*"),
        a dictionary of test_names to if passed booleans,
        the weigth in points of the category,
        and if the points are proportional
        (in accordance with the number of tests passed)
        or not (all-or-nothing).
        """
        score = 0
        tests = []
        output = ["Grading tests '{}'.".format(file_token)]
        for test, passed in test_to_passed.items():
            if fnmatch.fnmatch(test, file_token):
                tests.append(passed)

        if not tests:
            raise NoMatchingTestsFound()

        if not proportional:
            if all(tests):
                score = weight
                output.append("All tests in category passed: "
                              "{0} of {1} points awarded.".format(
                                  score, weight))
            else:
                output.append("Not all tests in category passed: "
                              "{0} of {1} points awarded.".format(
                                  score, weight))
            return output, score

        number_of_passes = sum(tests)
        number_of_tests = len(tests)
        output.append("Passed {} of {} tests in category.".format(
            number_of_passes, number_of_tests))
        if number_of_tests >= 0:
            score = weight * (number_of_passes / number_of_tests)
        output.append("Proportional Score is: {} of {} points awarded.".format(
            score, weight))
        return output, score

    def get_output_score(test_to_passed, category_to_weight):
        """
        Returns the output and score for every test category.
        """
        output = []
        total = 0.0
        total_weight = 0.0
        for test_type, weight in category_to_weight.items():
            try:
                partial_output, partial_score = grade_category(
                    test_type, test_to_passed,
                    weight=weight, proportional=True)
                output += partial_output
                total += partial_score
                total_weight += weight
            except NoMatchingTestsFound:
                pass
        return output, total, total_weight

    def get_needed_files_score(test_to_passed):
        criteria_name = "Pre-test checks for needed files: "
        needed_file_score = 0.0
        if test_to_passed["has_needed_files"]:
            needed_file_score = NEEDED_FILES_POINTS
        output = [criteria_name + "{0} of {1} points".format(
            needed_file_score, NEEDED_FILES_POINTS)]
        return output, needed_file_score

    test_to_passed = {outcome.file: outcome.passed for outcome in outcomes}
    output = ["Grade Calculation (Provisional)"]
    total = 0.0

    needed_output, needed_score = get_needed_files_score(test_to_passed)
    output += needed_output
    total += needed_score

    test_output, test_score, total_weight = get_output_score(
        test_to_passed, TEST_FILES_TO_POINTS)

    if test_score == total_weight:
        points_for_passing_all_awarded = POINTS_FOR_PASSING_ALL
    else:
        points_for_passing_all_awarded = 0
    test_output.append(
        "Points for passing every test is: "
        "{} of {} points awarded.".format(
                points_for_passing_all_awarded, POINTS_FOR_PASSING_ALL))
    total += points_for_passing_all_awarded

    output += test_output
    total += test_score

    extra_output, extra_score, extra_weight = get_output_score(
        test_to_passed, EXTRA_CREDIT_TEST_FILES_TO_POINTS)
    if extra_output:
        output += ["", "Extra credit (not actually worth points):"]
        output += extra_output + [""]

    if print_output:
        print("\n".join(output))
        possible_points = NEEDED_FILES_POINTS + sum(
            TEST_FILES_TO_POINTS.values()) + POINTS_FOR_PASSING_ALL
        print("Current tentative grade is: {:.1f} of {:.1f}".format(
            total, possible_points))
    return total, extra_score

def check_needed_files():
    """
    Raise appropiate TestResult for if the NEEDED_FILES are present.
    """
    for filename in NEEDED_FILES:
        if not os.path.exists(filename):
            raise TestFailed([
                "Failed ('{}' file doesn't exist)".format(filename)])
    raise TestPassed(["Passed (has all required files)"])

def call_and_get_output(args, timeout=None):
    """
    Run command (and possible timeout), returning the output and returncode.
    If the command times out or raises an OSError (likely file not found),
    raise a TestFailed.
    """
    try:
        output = subprocess.check_output(args, stderr=subprocess.STDOUT,
                                         universal_newlines=True,
                                         timeout=timeout)
        returncode = 0
    except subprocess.CalledProcessError as cpe:
        output = cpe.output
        returncode = cpe.returncode
    except subprocess.TimeoutExpired as te:
        command_str = " ".join(args)
        output = ["""
        Command: {} took too long.
        Process took longer than {} seconds. Killing it.""".format(
            command_str, te.timeout),
            "Failed (execution took too long)"]
        raise TestFailed(output)
    except OSError as ose:
        output = ["Command: \"" + " ".join(args) + "\" raised OSError",
                  ose.strerror,
                  "Failed (couldn't run command {})".format(" ".join(args))]
        raise TestFailed(output)

    return output, returncode

def run_test(test_file_path):
    """
    Runs a given test file (uses PROJECT_EXECUTABLE),
    raises either TestPassed or TestFailed.
    """

    @contextlib.contextmanager
    def add_lines_to_TestResult(lines):
        """
        Captures TestResult exceptions and adds lines to them.
        """
        try:
            yield
        except TestResult as tr:
            tr.args = (lines + tr.args[0],)
            raise tr

    def run_executable(args):
        """
        Runs the PROJECT_EXECUTABLE to get the needed output.
        """
        test_path = args[0]
        base_command = ["./" + PROJECT_EXECUTABLE, test_path]
        project_command = base_command
        correct_command = base_command + ["--correct"]
        input_command = base_command + ["--input"]

        correct_stdout, correct_returncode = call_and_get_output(
            correct_command, timeout=TEST_TIMEOUT)
        if correct_returncode:
            raise InternalTestSuiteException("""
            Error raised by test runner generating correct output.
            Command: {}
            Output: {}
            """.format(correct_command, correct_stdout))
        project_stdout, project_returncode = call_and_get_output(
            project_command, timeout=TEST_TIMEOUT)
        input_stdout, _ = call_and_get_output(input_command)

        lines = ["Test Contents:", input_stdout]
        if project_returncode:
            lines += ["Failed (Executable returned a non-zero error code)"]
            raise TestFailed(lines)
        return lines, correct_stdout, project_stdout

    def run_diff(correct_stdout, project_stdout):
        """
        Raises appropiate TestResult according to diff of created files.
        """
        correct_output = correct_stdout.splitlines(True)
        project_output = project_stdout.splitlines(True)
        diff_lines = list(difflib.context_diff(correct_output, project_output,
                                               fromfile="Correct Output",
                                               tofile="Student Output",
                                               lineterm='\n'))
        if not diff_lines:
            raise TestPassed(["Passed"])
        else:
            lines = ["Diff Output:"]
            lines.append("".join(diff_lines))
            lines.append("Failed")
            raise TestFailed(lines)

    lines = ["Testing: " + test_file_path]
    with add_lines_to_TestResult(lines):
        more_lines, correct_output, project_output = run_executable(
            [test_file_path])
        lines += more_lines
        run_diff(correct_output, project_output)

def test_files_in_order(test_globs):
    """
    Generator for determining the order to run the test files.
    """
    for test_glob in test_globs:
        test_files = sorted(glob.glob(test_glob))
        for test_file in test_files:
            yield test_file

def get_test_result(test_file_path):
    """
    Runs the test file and returns if the test passed and what the output was.
    """
    try:
        run_test(test_file_path)
    except TestFailed as tf:
        passed = False
        output = tf.args[0]
    except TestPassed as tp:
        passed = True
        output = tp.args[0]
    else:
        message = "No TestResult Exception Raised On Test: {}".format(
            test_file_path)
        raise InternalTestSuiteException(message)
    return passed, output

def print_first_failure(outcomes):
    """
    Prints the first failed test's output.
    """
    try:
        first_failure = next(itertools.dropwhile(
            lambda outcome: outcome.passed, outcomes))
    except StopIteration as si:
        print("No Failures To Display!")
    else:
        print("\n".join(first_failure.output))

def run_tests(test_globs_to_points):
    """
    Runs the tests, and returns a list of TestOutcomes.
    """
    outcomes = []
    test_globs = test_globs_to_points.keys()
    for test_file_path in test_files_in_order(test_globs):
        passed, output = get_test_result(test_file_path)
        outcome = TestOutcome(test_file_path, passed, output)
        outcomes.append(outcome)
    return outcomes

def get_all_outcomes(tests, extra=None):
    """
    Generates a list of TestOutcomes from the tests and has_needed_files
    (including extra credit if provided).
    """
    all_outcomes = []

    check = try_to_outcome_wrapper("has_needed_files", check_needed_files)
    all_outcomes.append(check())

    all_outcomes.extend(run_tests(tests))
    if extra is not None:
        all_outcomes.extend(run_tests(extra))
    return all_outcomes

def try_to_outcome_wrapper(test_name, func):
    """
    Calls the provided function and generates a TestOutcome from the result.
    """
    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        try:
            func(*args, **kwargs)
        except TestFailed as tf:
            return TestOutcome(test_name, False, tf.args[0])
        except TestPassed as tp:
            return TestOutcome(test_name, True, tp.args[0])
        raise InternalTestSuiteException(
            "Test Name = {} isn't passing or failing.")
    return wrapper

def check_for_uncommitted_work():
    """
    Runs a simple check for unstaged and uncommitted files.
    """
    unstaged_command = ["git", "diff", "--no-patch", "--exit-code"]
    uncommitted_command = ["git", "diff",
                           "--no-patch", "--staged", "--exit-code"]
    try:
        subprocess.check_call(unstaged_command)
        subprocess.check_call(uncommitted_command)
    except subprocess.CalledProcessError as cpe:
        print("Warning: You have uncommitted work. Run 'git status' for info.")
    unmerged_commits_command = ["git", "rev-list",
                                "master...origin/master", "--count"]
    output = subprocess.check_output(unmerged_commits_command)
    if int(output.strip()) != 0:
        print("Your current master branch doesn't match the "
              "origin/master branch.\n"
              "Be sure to use 'git push'.")

def machine_mode():
    """
    This function is called when --run-machine-mode is specified.
    The output is made to be parsed by the autograder.
    """
    outcomes = get_all_outcomes(
        TEST_FILES_TO_POINTS,
        EXTRA_CREDIT_TEST_FILES_TO_POINTS)

    lines = []
    for outcome in outcomes:
        file_basename = os.path.basename(outcome.file)
        passed = 1 if outcome.passed else 0
        lines.append("{}, {}".format(file_basename, passed))
    regular_grade, extra_grade = calculate_grade(outcomes, print_output=False)
    lines.append("{}, {}".format("grade", regular_grade))
    lines.append("{}, {}".format("extra_credit", extra_grade))
    print("\n".join(lines))

def normal_mode(args):
    """
    Default function that runs the tests and pretty outputs the test results,
    the grade, and the details regarding the first failure.
    """
    # check_for_uncommitted_work()
    print("Starting Tests")
    sys.stdout.flush()

    if args['extra']:
        outcomes = get_all_outcomes(
            TEST_FILES_TO_POINTS,
            EXTRA_CREDIT_TEST_FILES_TO_POINTS)
    else:
        outcomes = get_all_outcomes(TEST_FILES_TO_POINTS)

    def passed_all_tests(outcomes):
        return all(outcome.passed for outcome in outcomes)

    for outcome in outcomes:
        output = "{:<40} {}".format(outcome.file, outcome.output[-1])
        print(output)

    print()
    regular_grade, extra_grade = calculate_grade(outcomes, print_output=True)
    print()

    if passed_all_tests(outcomes):
        print("Passes all tests!")
        exit(0)
    else:
        print()
        print("First Failure's Details:")
        print_first_failure(outcomes)
        exit(1)

if __name__ == "__main__":
    """
    Runs the tests and chooses output mode.
    """

    parser = argparse.ArgumentParser(description="""
    Runs the tests for the project.
    By default it tests all files (indicated by the points.txt file)
    in the Test_Suite and shows detailed output for the first failure.
    """)
    parser.add_argument('--run-machine-mode', action="store_true", help="""
    Outputs the test result as 1's and 0's. For instructor use only.
    """)
    parser.add_argument('--extra', action="store_true", help="""
    Runs the extra credit tests and reports their results as well.
    """)

    args = vars(parser.parse_args())

    if args['run_machine_mode']:
        machine_mode()
    else:
        normal_mode(args)


text:
package ch.hearc.gui.tools;

import java.awt.Color;

/**
 * @author Axel Rieben, André Da Silva, Quentin Vaucher
 */
public class Appearence
	{

	/*------------------------------*\
	|*			  Static			*|
	\*------------------------------*/

	//Colors
	public static final Color CYAN50 = Color.decode("#e0f7fa");
	public static final Color CYAN100 = Color.decode("#b2ebf2");
	public static final Color CYAN200 = Color.decode("#80deea");
	public static final Color CYAN300 = Color.decode("#4dd0e1");
	public static final Color CYAN400 = Color.decode("#26c6da");
	public static final Color CYAN500 = Color.decode("#00bcd4");
	public static final Color CYAN600 = Color.decode("#00acc1");
	public static final Color CYAN700 = Color.decode("#0097a7");
	public static final Color CYAN800 = Color.decode("#00838f");
	public static final Color CYAN900 = Color.decode("#006064");
	}


text:
package org.fest.swing.driver;

import static org.fest.swing.driver.ComponentPreconditions.checkEnabledAndShowing;
import static org.fest.swing.driver.JTreeAddRootIfInvisibleTask.addRootIfInvisible;
import static org.fest.swing.edt.GuiActionRunner.execute;
import static org.fest.util.Preconditions.checkNotNull;

import javax.annotation.Nonnull;
import javax.swing.JTree;
import javax.swing.tree.TreePath;

import org.fest.swing.annotation.RunsInCurrentThread;
import org.fest.swing.annotation.RunsInEDT;
import org.fest.swing.edt.GuiQuery;

/**
 * Finds a path in a {@code JTree} that matches a given {@code String}. This query is executed in the event dispatch
 * thread (EDT.)
 *
 * @author Alex Ruiz
 *
 * @see JTreePathFinder
 */
final class JTreeMatchingPathQuery {
  @RunsInEDT
  static @Nonnull TreePath verifyJTreeIsReadyAndFindMatchingPath(final @Nonnull JTree tree, final @Nonnull String path,
      final @Nonnull JTreePathFinder pathFinder) {
    TreePath result = execute(new GuiQuery<TreePath>() {
      @Override
      protected @Nonnull TreePath executeInEDT() {
        checkEnabledAndShowing(tree);
        return matchingPathWithRootIfInvisible(tree, path, pathFinder);
      }
    });
    return checkNotNull(result);
  }

  @RunsInEDT
  static @Nonnull TreePath matchingPathFor(final @Nonnull JTree tree, final @Nonnull String path,
      final @Nonnull JTreePathFinder pathFinder) {
    TreePath result = execute(new GuiQuery<TreePath>() {
      @Override
      protected @Nonnull TreePath executeInEDT() {
        return matchingPathWithRootIfInvisible(tree, path, pathFinder);
      }
    });
    return checkNotNull(result);
  }

  @RunsInCurrentThread
  static @Nonnull TreePath matchingPathWithRootIfInvisible(@Nonnull JTree tree, @Nonnull String path,
      @Nonnull JTreePathFinder pathFinder) {
    TreePath matchingPath = pathFinder.findMatchingPath(tree, path);
    return addRootIfInvisible(tree, matchingPath);
  }

  private JTreeMatchingPathQuery() {}
}


text:
(function(window){

    function View(templates){
        this.templates = templates;

        //get a list of page elements using  getLayout method
        this.divs = {};
}

View.prototype.getLayout = function() {
        //this will eventually take a "layoutconfig.json" argument and provide the layout
        // for the html or present a default option if no config is passed
        // for now retrieves div list from document
        var divs = qsa('div');

        //populate divs {} with div panel ids
        for (var i = 0; i < divs.length; i++){
              var divName = 'div_' + (i + 1).toString();
              this.divs[divName] = divs[i].id;
        }
        console.log(this.divs);
        return("getLayout");
};

View.prototype.findDiv = function(divValue) {
  //search for div key by value
  for(var key in this.divs) {
    if(this.divs[key] === divValue) { return(key.toString()); }   //found it
  }
  return(false);  //didn't find it
};

View.prototype.renderDiv = function(divRef, templateRef, data){
    //search the divs object for the name of the div to modify
    var searchDiv;
    if ((searchDiv = this.findDiv(divRef)) !== false){
      el = geid(this.divs[searchDiv]);
      el.innerHTML = ''; //wipe
      el.innerHTML = this.templates.display(templateRef, data); //load
    }
    else {console.log('teal.view.renderDiv: div not found');}
    this.getLayout();
    return("teal.view.renderDiv");
};

View.prototype.addTemplateToPanel = function(divRef, templateRef, data) {
  var searchDiv;
  var html;
  if ((searchDiv = this.findDiv(divRef)) !== false){
    el = geid(this.divs[searchDiv]);
    html = el.innerHTML;
    html = html + this.templates.display(templateRef, data);
    el.innerHTML = ''; //wipe
    el.innerHTML = html; //load
  }
  else {console.log('teal.view.addTemplateToPanel: div not found: ' + divRef);}

  return("teal.view.addTemplateToPanel");
};

View.prototype.createButtons = function(data, target) {
  var id = null;
  var name = null;
  for (var i = 0; i < data.length; i++){
    for(var key in data[i]){
      if(key === "id") {id = data[i][key];}
      if(key === "name") {name = data[i][key];}
    }
  //  if( (id !== null) && (name !== null) ){
      this.addTemplateToPanel(target, 'button', {id: id, buttonname: name});
  //  }
  }

  return("teal.view.createButtons");
};

View.prototype.clearDiv = function(divRef) {
  var searchDiv;
  var html;
  if ((searchDiv = this.findDiv(divRef)) !== false){
    el = geid(this.divs[searchDiv]);
    html = el.innerHTML;
    el.innerHTML = ''; //wipe
  }
  else {console.log('teal.view.clearDiv: div not found: ' + divRef);}
  return('teal.view.clearDiv');

};

window.TEALClass = window.TEALClass || {};
window.TEALClass.view = View;
})(window);


text:
/**
 * NameExists.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
 */

package com.reasonablespread.service;

public class NameExists  implements java.io.Serializable {
    private java.lang.String loginEmail;

    private java.lang.String APIKey;

    private java.lang.String accountName;

    public NameExists() {
    }

    public NameExists(
           java.lang.String loginEmail,
           java.lang.String APIKey,
           java.lang.String accountName) {
           this.loginEmail = loginEmail;
           this.APIKey = APIKey;
           this.accountName = accountName;
    }

    /**
     * Gets the loginEmail value for this NameExists.
     *
     * @return loginEmail
     */
    public java.lang.String getLoginEmail() {
        return loginEmail;
    }

    /**
     * Sets the loginEmail value for this NameExists.
     *
     * @param loginEmail
     */
    public void setLoginEmail(java.lang.String loginEmail) {
        this.loginEmail = loginEmail;
    }

    /**
     * Gets the APIKey value for this NameExists.
     *
     * @return APIKey
     */
    public java.lang.String getAPIKey() {
        return APIKey;
    }

    /**
     * Sets the APIKey value for this NameExists.
     *
     * @param APIKey
     */
    public void setAPIKey(java.lang.String APIKey) {
        this.APIKey = APIKey;
    }

    /**
     * Gets the accountName value for this NameExists.
     *
     * @return accountName
     */
    public java.lang.String getAccountName() {
        return accountName;
    }

    /**
     * Sets the accountName value for this NameExists.
     *
     * @param accountName
     */
    public void setAccountName(java.lang.String accountName) {
        this.accountName = accountName;
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof NameExists)) return false;
        NameExists other = (NameExists) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true &&
            ((this.loginEmail==null && other.getLoginEmail()==null) ||
             (this.loginEmail!=null &&
              this.loginEmail.equals(other.getLoginEmail()))) &&
            ((this.APIKey==null && other.getAPIKey()==null) ||
             (this.APIKey!=null &&
              this.APIKey.equals(other.getAPIKey()))) &&
            ((this.accountName==null && other.getAccountName()==null) ||
             (this.accountName!=null &&
              this.accountName.equals(other.getAccountName())));
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = 1;
        if (getLoginEmail() != null) {
            _hashCode += getLoginEmail().hashCode();
        }
        if (getAPIKey() != null) {
            _hashCode += getAPIKey().hashCode();
        }
        if (getAccountName() != null) {
            _hashCode += getAccountName().hashCode();
        }
        __hashCodeCalc = false;
        return _hashCode;
    }

    // Type metadata
    private static org.apache.axis.description.TypeDesc typeDesc =
        new org.apache.axis.description.TypeDesc(NameExists.class, true);

    static {
        typeDesc.setXmlType(new javax.xml.namespace.QName("http://service.reasonablespread.com/", ">NameExists"));
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("loginEmail");
        elemField.setXmlName(new javax.xml.namespace.QName("http://service.reasonablespread.com/", "loginEmail"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("APIKey");
        elemField.setXmlName(new javax.xml.namespace.QName("http://service.reasonablespread.com/", "APIKey"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("accountName");
        elemField.setXmlName(new javax.xml.namespace.QName("http://service.reasonablespread.com/", "accountName"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
    }

    /**
     * Return type metadata object
     */
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
        return typeDesc;
    }

    /**
     * Get Custom Serializer
     */
    public static org.apache.axis.encoding.Serializer getSerializer(
           java.lang.String mechType,
           java.lang.Class _javaType,
           javax.xml.namespace.QName _xmlType) {
        return
          new  org.apache.axis.encoding.ser.BeanSerializer(
            _javaType, _xmlType, typeDesc);
    }

    /**
     * Get Custom Deserializer
     */
    public static org.apache.axis.encoding.Deserializer getDeserializer(
           java.lang.String mechType,
           java.lang.Class _javaType,
           javax.xml.namespace.QName _xmlType) {
        return
          new  org.apache.axis.encoding.ser.BeanDeserializer(
            _javaType, _xmlType, typeDesc);
    }

}


text:
/* globals d3, nv, chartsData */
/* exported graphBuilder */
var graphBuilder = (function (d3, nv) {

  return {

    /**
     * lineGraph
     * @param params
     * @param data
     * @returns {*}
     */
    lineGraph: function (params, data) {
      var chart = nv.models.lineChart().color([params.color])
        .tooltipContent(function (key, y, e) {
          // Update values realtime
          $('#' + params.chartId + ' h3.value').html(e);
          $('#' + params.chartId + ' h3.timestamp').html(y);
          return  ' Value: ' + '' + d3.round(e, 2) + '
' + 'Time: ' + y + '
';
        });

      chart.yAxis.axisLabel(chart.yLabel);
      chart.yAxis.tickFormat(d3.format(',.' + params.round + 'f'));
      chart.xAxis
      .tickFormat(function (d) {
        return d3.time.format("%m/%d %H:%M:%S")(new Date(d));
      });

      if (data) {
        var v = [];
        data.values.forEach(function (val) {
          v.push({x: Date.parse(val.timestamp), y: val.value});
        });
        //TODO: not this
        chartsData[params.chartId].values = [{key: params.yLabel, values: v}];

        d3.select('#' + params.chartId + ' svg')
        .datum(chartsData[params.chartId].values)
        .call(chart);
      }

      nv.utils.windowResize(chart.update);
      return chart;
    },

    /**
     * stackedAreaChart
     * @param params
     * @param data
     * @returns {*}
     */
    stackedAreaChart: function (params, data) {
      var chart = nv.models.stackedAreaChart();

      chart.useInteractiveGuideline(true)
        .x(function (d) { return d[0]; })
        .y(function (d) { return d[1]; })
        .style("expand")
        .showControls(false)
        .transitionDuration(300);

      chart.xAxis
      .tickFormat(function (d) { return d3.time.format('%x')(new Date(d)); });

      // chart.yAxis.tickFormat(d3.format('d'));

      var v = [];
      ["between_0_10", "between_10_100", "between_100_1000", "over_1000"].forEach(function (key) {
        var temp = [];
        data.values.forEach(function (val) {
          temp.push([Date.parse(val.timestamp), val[key]]);
        });
        v.push({ "key": key, "values": temp});

      });

      d3.select('#' + params.chartId)
        .datum(v)
        .transition().duration(0)
        .call(chart);

      nv.utils.windowResize(chart.update);

      d3.select("g.nv-controlsWrap")
        .attr("transform", "translate(-60,-90)");

      return chart;
    },

    /**
     * cumulativeLineGraph
     * @param params
     * @param data
     */
    cumulativeLineGraph: function(params, data) {
      nv.addGraph(function() {
        var chart = nv.models.cumulativeLineChart()
            .x(function(d) { return Date.parse(d[0]) })
            .y(function(d) { return d[1] }) //adjusting, 100% is 1.00, not 100 as it is in the data
            .color(d3.scale.category10().range())
            .useInteractiveGuideline(true)
          ;
        //chartsData[params.chartId].options.color = d3.scale.category10().range();
        chart.xAxis
          .tickValues([1078030800000,1122782400000,1167541200000,1251691200000])
          .tickFormat(function(d) {
            return d3.time.format('%x')(new Date(d))
          });

        // Formatting values to be represented with 3 figures and a symbol
        chart.yAxis
          .tickFormat(function(d) {
            return d + d3.formatPrefix(d).symbol();
          })
          .tickFormat(d3.format('.3s'));

        // Populate values for lightbox display
        data.forEach(function(obj) {
          var v = [];
          obj.values.forEach(function (val) {
            v.push({
              // set x to date, y to value
              x: Date.parse(val[0]), y: val[1]
            });
          });
          chartsData[params.chartId].values.push({key: obj.key, values: v});
        });

        d3.select('#' + params.chartId + ' svg')
          .datum(data)
          .call(chart);

        //TODO: Figure out a good way to do this automatically
        nv.utils.windowResize(chart.update);

        return chart;
      });
    }
  };
})(d3, nv, chartsData);


text:
<!DOCTYPE html>

<html ng-app="Colonnade">
  <head>
    <title>{{.title}}</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.1/semantic.min.css">
    <link rel="shortcut icon" type="image/png" href="/public/img/favicon.png">
    <link rel="stylesheet" type="text/css" href="/public/css/style.css">
  </head>
  <body ng-controller="GlobCtrl">


text:
#ifndef SERVICE_REFERENCE_H_
#define SERVICE_REFERENCE_H_

#include "celix_types.h"
#include "celixbool.h"
#include "array_list.h"
#include "service_registration.h"
#include "bundle.h"
#include "framework_exports.h"

#ifdef __cplusplus
extern "C" {
#endif

FRAMEWORK_EXPORT celix_status_t serviceReference_getBundle(service_reference_pt reference, celix_bundle_t **bundle);

FRAMEWORK_EXPORT bool
serviceReference_isAssignableTo(service_reference_pt reference, celix_bundle_t *requester, const char *serviceName);

FRAMEWORK_EXPORT celix_status_t
serviceReference_getProperty(service_reference_pt reference, const char *key, const char **value);

FRAMEWORK_EXPORT celix_status_t
serviceReference_getPropertyWithDefault(service_reference_pt reference, const char *key, const char* def, const char **value);

FRAMEWORK_EXPORT celix_status_t
serviceReference_getPropertyKeys(service_reference_pt reference, char **keys[], unsigned int *size);

FRAMEWORK_EXPORT celix_status_t
serviceReference_getServiceRegistration(service_reference_pt reference, service_registration_pt *registration);

FRAMEWORK_EXPORT
long serviceReference_getServiceId(service_reference_pt reference);

FRAMEWORK_EXPORT celix_status_t
serviceReference_equals(service_reference_pt reference, service_reference_pt compareTo, bool *equal);

FRAMEWORK_EXPORT unsigned int serviceReference_hashCode(const void *referenceP);

FRAMEWORK_EXPORT int serviceReference_equals2(const void *reference1, const void *reference2);

FRAMEWORK_EXPORT celix_status_t
serviceReference_compareTo(service_reference_pt reference, service_reference_pt compareTo, int *compare);

FRAMEWORK_EXPORT celix_status_t serviceReference_getUsingBundles(service_reference_pt ref, celix_array_list_t **out);

#ifdef __cplusplus
}
#endif

#endif /* SERVICE_REFERENCE_H_ */


text:
"""Training script to run Jaxline experiments.

Your experiment file must implement the API in experiment.py to be
compatible with this pipeline.
"""

import functools
import inspect
import time
from typing import Optional

from absl import flags
from absl import logging
import jax
import jax.numpy as jnp
from jaxline import utils

FLAGS = flags.FLAGS

def _log_outputs(step, scalar_values):
  # f_list for less verbosity; e.g., "4." instead of "array(4., dtype=float32)".
  f_list = lambda x: x.tolist() if isinstance(x, jnp.ndarray) else x
  logging.info("global_step: %d, %s", step, jax.tree_map(f_list, scalar_values))

def _initialize_experiment(experiment_class, mode, rng, experiment_kwargs):
  """Initializes experiment catching old style init methods."""
  init_args = inspect.getfullargspec(experiment_class).args
  if "init_rng" in init_args:
    experiment = experiment_class(
        mode, init_rng=rng, **experiment_kwargs)
  else:
    # TODO(b/205109371): Make init_rng non-optional.
    logging.warning(
        "You should add init_rng to your Experiment"
        " constructor, which we will use to pass you"
        " jaxline.base_config.random_seed. Please deprecate any use of"
        " experiment_kwargs.config.random_seed: model initialization should"
        " be performed with init_rng and any sweeps directly with"
        " jaxline.base_config.random_seed. The use of"
        " experiment_kwargs.config.random_seed was flawed design introduced"
        " by some of our JAXline examples and meant that the rng used for"
        " initialization (and sweeps) was decoupled from that used by the"
        " step function. This will soon become unsupported behaviour.")
    experiment = experiment_class(mode, **experiment_kwargs)
  return experiment

@utils.disable_pmap_jit
def train(
    experiment_class,
    config,
    checkpointer: utils.Checkpointer,
    writer: Optional[utils.Writer],
    periodic_actions=(),
):
  """Main training loop."""
  logging.info("Training with config:\n%s", config)
  is_chief = jax.host_id() == 0

  rng = jax.random.PRNGKey(config.random_seed)
  with utils.log_activity("experiment init"):
    experiment = _initialize_experiment(
        experiment_class, "train", rng, config.experiment_kwargs)

  state = checkpointer.get_experiment_state("latest")
  state.global_step = 0
  state.experiment_module = experiment
  state.train_step_rng = utils.bcast_local_devices(rng)

  if checkpointer.can_be_restored("latest"):
    with utils.log_activity("checkpoint restore"):
      checkpointer.restore("latest")

  periodic_actions += (
      utils.PeriodicAction(
          _log_outputs,
          interval_type=config.logging_interval_type or config.interval_type,
          interval=config.log_tensors_interval),
      )

  if config.train_checkpoint_all_hosts or is_chief:
    if config.save_checkpoint_interval > 0:
      periodic_actions += (
          utils.PeriodicAction(
              lambda *_: checkpointer.save("latest"),
              interval_type=(config.checkpoint_interval_type
                             or config.interval_type),
              interval=config.save_checkpoint_interval,
              run_async=False),)  # run_async True would not be thread-safe.

  if is_chief:
    if writer is not None:
      def write_scalars(global_step: int, scalar_values):
        writer.write_scalars(global_step, scalar_values)

      periodic_actions += (
          utils.PeriodicAction(
              write_scalars,
              interval_type=(config.logging_interval_type
                             or config.interval_type),
              interval=config.log_train_data_interval,
              log_all_data=config.log_all_train_data),)

  for pa in periodic_actions:
    pa.update_time(time.time(), state.global_step)

  experiment.train_loop(config, state, periodic_actions, writer)

  if is_chief:
    with utils.log_activity("final checkpoint"):
      checkpointer.save("latest")

  # Join all async periodic actions that are unfinished.
  for pa in periodic_actions:
    pa.wait_to_finish()

  # We occasionally see errors when the final checkpoint is being written if
  # the other hosts exit. Here we force all hosts to participate in one final
  # collective so the non-master hosts cannot exit before the master writes out
  # the final checkpoint.
  utils.rendezvous()

@utils.disable_pmap_jit
def evaluate(
    experiment_class,
    config,
    checkpointer: utils.Checkpointer,
    writer: Optional[utils.Writer],
    jaxline_mode: Optional[str] = None,
):
  """Main evaluation loop."""
  if jaxline_mode is None:
    jaxline_mode = FLAGS.jaxline_mode

  logging.info("Evaluating with config:\n%s", config)

  global_step = 0
  eval_rng = jax.random.PRNGKey(config.random_seed)
  experiment = _initialize_experiment(
      experiment_class, jaxline_mode, eval_rng, config.experiment_kwargs)

  if config.best_model_eval_metric and jax.host_id() == 0:
    # Initialize best state.
    best_state = checkpointer.get_experiment_state("best")
    if config.best_model_eval_metric_higher_is_better:
      best_state.best_eval_metric_value = float("-inf")
      eval_metric_is_better_op = jnp.greater
      eval_metric_comparison_str = ">"
    else:
      best_state.best_eval_metric_value = float("inf")
      eval_metric_is_better_op = jnp.less
      eval_metric_comparison_str = "<"
    best_state.best_model_eval_metric = config.best_model_eval_metric

    best_state.experiment_module = experiment

    # Restore to preserve 'best_eval_metric_value' if evaluator was preempted.
    if checkpointer.can_be_restored("best"):
      with utils.log_activity("best checkpoint restore"):
        checkpointer.restore("best")

  # Will evaluate the latest checkpoint in the directory.
  state = checkpointer.get_experiment_state("latest")
  state.global_step = global_step
  state.experiment_module = experiment
  state.train_step_rng = None

  eval_rng = jnp.broadcast_to(
      eval_rng, (jax.local_device_count(),) + eval_rng.shape)
  host_id_devices = utils.host_id_devices_for_rng(config.random_mode_eval)
  eval_rng = jax.pmap(functools.partial(
      utils.specialize_rng_host_device, axis_name="i",
      mode=config.random_mode_eval), axis_name="i")(eval_rng, host_id_devices)

  if config.one_off_evaluate:
    checkpointer.restore("latest")
    global_step_devices = utils.bcast_local_devices(
        jnp.asarray(state.global_step))
    scalar_values = utils.evaluate_should_return_dict(experiment.evaluate)(
        global_step=global_step_devices, rng=eval_rng, writer=writer)
    if writer is not None:
      writer.write_scalars(state.global_step, scalar_values)
    logging.info("Evaluated specific checkpoint, exiting.")
    return

  old_checkpoint_path = None
  initial_weights_are_evaluated = False

  while True:
    checkpoint_path = checkpointer.restore_path("latest")

    if (checkpoint_path is None and config.eval_initial_weights
        and not initial_weights_are_evaluated):
      # Skip restoring a checkpoint and directly call evaluate if
      # `config.eval_initial_weights` but don"t do it more than once.
      initial_weights_are_evaluated = True
    else:
      if checkpoint_path in (None, old_checkpoint_path):
        logging.info("Checkpoint %s invalid or already evaluated, waiting.",
                     checkpoint_path)
        time.sleep(10)
        continue

      checkpointer.restore("latest")

    global_step_devices = utils.bcast_local_devices(
        jnp.asarray(state.global_step))
    scalar_values = utils.evaluate_should_return_dict(experiment.evaluate)(
        global_step=global_step_devices, rng=eval_rng, writer=writer)
    if writer is not None:
      writer.write_scalars(state.global_step, scalar_values)
    old_checkpoint_path = checkpoint_path
    # Decide whether to save a "best checkpoint".
    if config.best_model_eval_metric and jax.host_id() == 0:
      if config.best_model_eval_metric not in scalar_values:
        raise ValueError(f"config.best_model_eval_metric has been specified "
                         f"as {config.best_model_eval_metric}, but this key "
                         f"was not returned by the evaluate method. Got: "
                         f"{scalar_values.keys()}")
      current_eval_metric_value = scalar_values[config.best_model_eval_metric]
      old_eval_metric_value = best_state.best_eval_metric_value
      if eval_metric_is_better_op(current_eval_metric_value,
                                  old_eval_metric_value):
        logging.info("%s: %s %s %s, saving new best checkpoint.",
                     config.best_model_eval_metric, current_eval_metric_value,
                     eval_metric_comparison_str, old_eval_metric_value)
        best_state.global_step = state.global_step
        best_state.experiment_module = experiment
        best_state.best_eval_metric_value = current_eval_metric_value
        best_state.train_step_rng = state.train_step_rng
        checkpointer.save("best")

    if not experiment.should_run_step(state.global_step, config):
      logging.info("Last checkpoint (iteration %d) evaluated, exiting.",
                   state.global_step)
      break