text:
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Google.Ads.GoogleAds.V12.Resources {

  /// Holder for reflection information generated from google/ads/googleads/v12/resources/batch_job.proto
  public static partial class BatchJobReflection {

    #region Descriptor
    /// File descriptor for google/ads/googleads/v12/resources/batch_job.proto
    public static pbr::FileDescriptor Descriptor {
      get { return descriptor; }
    }
    private static pbr::FileDescriptor descriptor;

    static BatchJobReflection() {
      byte[] descriptorData = global::System.Convert.FromBase64String(
          string.Concat(
            "CjJnb29nbGUvYWRzL2dvb2dsZWFkcy92MTIvcmVzb3VyY2VzL2JhdGNoX2pv",
            "Yi5wcm90bxIiZ29vZ2xlLmFkcy5nb29nbGVhZHMudjEyLnJlc291cmNlcxo1",
            "Z29vZ2xlL2Fkcy9nb29nbGVhZHMvdjEyL2VudW1zL2JhdGNoX2pvYl9zdGF0",
            "dXMucHJvdG8aH2dvb2dsZS9hcGkvZmllbGRfYmVoYXZpb3IucHJvdG8aGWdv",
            "b2dsZS9hcGkvcmVzb3VyY2UucHJvdG8ilAcKCEJhdGNoSm9iEkAKDXJlc291",
            "cmNlX25hbWUYASABKAlCKeBBBfpBIwohZ29vZ2xlYWRzLmdvb2dsZWFwaXMu",
            "Y29tL0JhdGNoSm9iEhQKAmlkGAcgASgDQgPgQQNIAIgBARIpChduZXh0X2Fk",
            "ZF9zZXF1ZW5jZV90b2tlbhgIIAEoCUID4EEDSAGIAQESVAoIbWV0YWRhdGEY",
            "BCABKAsyPS5nb29nbGUuYWRzLmdvb2dsZWFkcy52MTIucmVzb3VyY2VzLkJh",
            "dGNoSm9iLkJhdGNoSm9iTWV0YWRhdGFCA+BBAxJWCgZzdGF0dXMYBSABKA4y",
            "QS5nb29nbGUuYWRzLmdvb2dsZWFkcy52MTIuZW51bXMuQmF0Y2hKb2JTdGF0",
            "dXNFbnVtLkJhdGNoSm9iU3RhdHVzQgPgQQMSKAoWbG9uZ19ydW5uaW5nX29w",
            "ZXJhdGlvbhgJIAEoCUID4EEDSAKIAQEalAMKEEJhdGNoSm9iTWV0YWRhdGES",
            "JAoSY3JlYXRpb25fZGF0ZV90aW1lGAggASgJQgPgQQNIAIgBARIhCg9zdGFy",
            "dF9kYXRlX3RpbWUYByABKAlCA+BBA0gBiAEBEiYKFGNvbXBsZXRpb25fZGF0",
            "ZV90aW1lGAkgASgJQgPgQQNIAogBARIsChplc3RpbWF0ZWRfY29tcGxldGlv",
            "bl9yYXRpbxgKIAEoAUID4EEDSAOIAQESIQoPb3BlcmF0aW9uX2NvdW50GAsg",
            "ASgDQgPgQQNIBIgBARIqChhleGVjdXRlZF9vcGVyYXRpb25fY291bnQYDCAB",
            "KANCA+BBA0gFiAEBQhUKE19jcmVhdGlvbl9kYXRlX3RpbWVCEgoQX3N0YXJ0",
            "X2RhdGVfdGltZUIXChVfY29tcGxldGlvbl9kYXRlX3RpbWVCHQobX2VzdGlt",
            "YXRlZF9jb21wbGV0aW9uX3JhdGlvQhIKEF9vcGVyYXRpb25fY291bnRCGwoZ",
            "X2V4ZWN1dGVkX29wZXJhdGlvbl9jb3VudDpY6kFVCiFnb29nbGVhZHMuZ29v",
            "Z2xlYXBpcy5jb20vQmF0Y2hKb2ISMGN1c3RvbWVycy97Y3VzdG9tZXJfaWR9",
            "L2JhdGNoSm9icy97YmF0Y2hfam9iX2lkfUIFCgNfaWRCGgoYX25leHRfYWRk",
            "X3NlcXVlbmNlX3Rva2VuQhkKF19sb25nX3J1bm5pbmdfb3BlcmF0aW9uQv8B",
            "CiZjb20uZ29vZ2xlLmFkcy5nb29nbGVhZHMudjEyLnJlc291cmNlc0INQmF0",
            "Y2hKb2JQcm90b1ABWktnb29nbGUuZ29sYW5nLm9yZy9nZW5wcm90by9nb29n",
            "bGVhcGlzL2Fkcy9nb29nbGVhZHMvdjEyL3Jlc291cmNlcztyZXNvdXJjZXOi",
            "AgNHQUGqAiJHb29nbGUuQWRzLkdvb2dsZUFkcy5WMTIuUmVzb3VyY2VzygIi",
            "R29vZ2xlXEFkc1xHb29nbGVBZHNcVjEyXFJlc291cmNlc+oCJkdvb2dsZTo6",
            "QWRzOjpHb29nbGVBZHM6OlYxMjo6UmVzb3VyY2VzYgZwcm90bzM="));
      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
          new pbr::FileDescriptor[] { global::Google.Ads.GoogleAds.V12.Enums.BatchJobStatusReflection.Descriptor, global::Google.Api.FieldBehaviorReflection.Descriptor, global::Google.Api.ResourceReflection.Descriptor, },
          new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Ads.GoogleAds.V12.Resources.BatchJob), global::Google.Ads.GoogleAds.V12.Resources.BatchJob.Parser, new[]{ "ResourceName", "Id", "NextAddSequenceToken", "Metadata", "Status", "LongRunningOperation" }, new[]{ "Id", "NextAddSequenceToken", "LongRunningOperation" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Ads.GoogleAds.V12.Resources.BatchJob.Types.BatchJobMetadata), global::Google.Ads.GoogleAds.V12.Resources.BatchJob.Types.BatchJobMetadata.Parser, new[]{ "CreationDateTime", "StartDateTime", "CompletionDateTime", "EstimatedCompletionRatio", "OperationCount", "ExecutedOperationCount" }, new[]{ "CreationDateTime", "StartDateTime", "CompletionDateTime", "EstimatedCompletionRatio", "OperationCount", "ExecutedOperationCount" }, null, null, null)})
          }));
    }
    #endregion

  }
  #region Messages
  ///
  /// A list of mutates being processed asynchronously. The mutates are uploaded
  /// by the user. The mutates themselves aren't readable and the results of the
  /// job can only be read using BatchJobService.ListBatchJobResults.
  ///
  public sealed partial class BatchJob : pb::IMessage<BatchJob>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<BatchJob> _parser = new pb::MessageParser<BatchJob>(() => new BatchJob());
    private pb::UnknownFieldSet _unknownFields;
    private int _hasBits0;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<BatchJob> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Google.Ads.GoogleAds.V12.Resources.BatchJobReflection.Descriptor.MessageTypes[0]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public BatchJob() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public BatchJob(BatchJob other) : this() {
      _hasBits0 = other._hasBits0;
      resourceName_ = other.resourceName_;
      id_ = other.id_;
      nextAddSequenceToken_ = other.nextAddSequenceToken_;
      metadata_ = other.metadata_ != null ? other.metadata_.Clone() : null;
      status_ = other.status_;
      longRunningOperation_ = other.longRunningOperation_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public BatchJob Clone() {
      return new BatchJob(this);
    }

    /// Field number for the "resource_name" field.
    public const int ResourceNameFieldNumber = 1;
    private string resourceName_ = "";
    ///
    /// Immutable. The resource name of the batch job.
    /// Batch job resource names have the form:
    ///
    /// `customers/{customer_id}/batchJobs/{batch_job_id}`
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string ResourceName {
      get { return resourceName_; }
      set {
        resourceName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// Field number for the "id" field.
    public const int IdFieldNumber = 7;
    private long id_;
    ///
    /// Output only. ID of this batch job.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public long Id {
      get { if ((_hasBits0 & 1) != 0) { return id_; } else { return 0L; } }
      set {
        _hasBits0 |= 1;
        id_ = value;
      }
    }
    /// Gets whether the "id" field is set
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool HasId {
      get { return (_hasBits0 & 1) != 0; }
    }
    /// Clears the value of the "id" field
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void ClearId() {
      _hasBits0 &= ~1;
    }

    /// Field number for the "next_add_sequence_token" field.
    public const int NextAddSequenceTokenFieldNumber = 8;
    private string nextAddSequenceToken_;
    ///
    /// Output only. The next sequence token to use when adding operations. Only set when the
    /// batch job status is PENDING.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string NextAddSequenceToken {
      get { return nextAddSequenceToken_ ?? ""; }
      set {
        nextAddSequenceToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// Gets whether the "next_add_sequence_token" field is set
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool HasNextAddSequenceToken {
      get { return nextAddSequenceToken_ != null; }
    }
    /// Clears the value of the "next_add_sequence_token" field
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void ClearNextAddSequenceToken() {
      nextAddSequenceToken_ = null;
    }

    /// Field number for the "metadata" field.
    public const int MetadataFieldNumber = 4;
    private global::Google.Ads.GoogleAds.V12.Resources.BatchJob.Types.BatchJobMetadata metadata_;
    ///
    /// Output only. Contains additional information about this batch job.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Ads.GoogleAds.V12.Resources.BatchJob.Types.BatchJobMetadata Metadata {
      get { return metadata_; }
      set {
        metadata_ = value;
      }
    }

    /// Field number for the "status" field.
    public const int StatusFieldNumber = 5;
    private global::Google.Ads.GoogleAds.V12.Enums.BatchJobStatusEnum.Types.BatchJobStatus status_ = global::Google.Ads.GoogleAds.V12.Enums.BatchJobStatusEnum.Types.BatchJobStatus.Unspecified;
    ///
    /// Output only. Status of this batch job.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Ads.GoogleAds.V12.Enums.BatchJobStatusEnum.Types.BatchJobStatus Status {
      get { return status_; }
      set {
        status_ = value;
      }
    }

    /// Field number for the "long_running_operation" field.
    public const int LongRunningOperationFieldNumber = 9;
    private string longRunningOperation_;
    ///
    /// Output only. The resource name of the long-running operation that can be used to poll
    /// for completion. Only set when the batch job status is RUNNING or DONE.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string LongRunningOperation {
      get { return longRunningOperation_ ?? ""; }
      set {
        longRunningOperation_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }
    /// Gets whether the "long_running_operation" field is set
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool HasLongRunningOperation {
      get { return longRunningOperation_ != null; }
    }
    /// Clears the value of the "long_running_operation" field
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void ClearLongRunningOperation() {
      longRunningOperation_ = null;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as BatchJob);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(BatchJob other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (ResourceName != other.ResourceName) return false;
      if (Id != other.Id) return false;
      if (NextAddSequenceToken != other.NextAddSequenceToken) return false;
      if (!object.Equals(Metadata, other.Metadata)) return false;
      if (Status != other.Status) return false;
      if (LongRunningOperation != other.LongRunningOperation) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (ResourceName.Length != 0) hash ^= ResourceName.GetHashCode();
      if (HasId) hash ^= Id.GetHashCode();
      if (HasNextAddSequenceToken) hash ^= NextAddSequenceToken.GetHashCode();
      if (metadata_ != null) hash ^= Metadata.GetHashCode();
      if (Status != global::Google.Ads.GoogleAds.V12.Enums.BatchJobStatusEnum.Types.BatchJobStatus.Unspecified) hash ^= Status.GetHashCode();
      if (HasLongRunningOperation) hash ^= LongRunningOperation.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (ResourceName.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(ResourceName);
      }
      if (metadata_ != null) {
        output.WriteRawTag(34);
        output.WriteMessage(Metadata);
      }
      if (Status != global::Google.Ads.GoogleAds.V12.Enums.BatchJobStatusEnum.Types.BatchJobStatus.Unspecified) {
        output.WriteRawTag(40);
        output.WriteEnum((int) Status);
      }
      if (HasId) {
        output.WriteRawTag(56);
        output.WriteInt64(Id);
      }
      if (HasNextAddSequenceToken) {
        output.WriteRawTag(66);
        output.WriteString(NextAddSequenceToken);
      }
      if (HasLongRunningOperation) {
        output.WriteRawTag(74);
        output.WriteString(LongRunningOperation);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (ResourceName.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(ResourceName);
      }
      if (metadata_ != null) {
        output.WriteRawTag(34);
        output.WriteMessage(Metadata);
      }
      if (Status != global::Google.Ads.GoogleAds.V12.Enums.BatchJobStatusEnum.Types.BatchJobStatus.Unspecified) {
        output.WriteRawTag(40);
        output.WriteEnum((int) Status);
      }
      if (HasId) {
        output.WriteRawTag(56);
        output.WriteInt64(Id);
      }
      if (HasNextAddSequenceToken) {
        output.WriteRawTag(66);
        output.WriteString(NextAddSequenceToken);
      }
      if (HasLongRunningOperation) {
        output.WriteRawTag(74);
        output.WriteString(LongRunningOperation);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (ResourceName.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(ResourceName);
      }
      if (HasId) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(Id);
      }
      if (HasNextAddSequenceToken) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(NextAddSequenceToken);
      }
      if (metadata_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Metadata);
      }
      if (Status != global::Google.Ads.GoogleAds.V12.Enums.BatchJobStatusEnum.Types.BatchJobStatus.Unspecified) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status);
      }
      if (HasLongRunningOperation) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(LongRunningOperation);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(BatchJob other) {
      if (other == null) {
        return;
      }
      if (other.ResourceName.Length != 0) {
        ResourceName = other.ResourceName;
      }
      if (other.HasId) {
        Id = other.Id;
      }
      if (other.HasNextAddSequenceToken) {
        NextAddSequenceToken = other.NextAddSequenceToken;
      }
      if (other.metadata_ != null) {
        if (metadata_ == null) {
          Metadata = new global::Google.Ads.GoogleAds.V12.Resources.BatchJob.Types.BatchJobMetadata();
        }
        Metadata.MergeFrom(other.Metadata);
      }
      if (other.Status != global::Google.Ads.GoogleAds.V12.Enums.BatchJobStatusEnum.Types.BatchJobStatus.Unspecified) {
        Status = other.Status;
      }
      if (other.HasLongRunningOperation) {
        LongRunningOperation = other.LongRunningOperation;
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 10: {
            ResourceName = input.ReadString();
            break;
          }
          case 34: {
            if (metadata_ == null) {
              Metadata = new global::Google.Ads.GoogleAds.V12.Resources.BatchJob.Types.BatchJobMetadata();
            }
            input.ReadMessage(Metadata);
            break;
          }
          case 40: {
            Status = (global::Google.Ads.GoogleAds.V12.Enums.BatchJobStatusEnum.Types.BatchJobStatus) input.ReadEnum();
            break;
          }
          case 56: {
            Id = input.ReadInt64();
            break;
          }
          case 66: {
            NextAddSequenceToken = input.ReadString();
            break;
          }
          case 74: {
            LongRunningOperation = input.ReadString();
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 10: {
            ResourceName = input.ReadString();
            break;
          }
          case 34: {
            if (metadata_ == null) {
              Metadata = new global::Google.Ads.GoogleAds.V12.Resources.BatchJob.Types.BatchJobMetadata();
            }
            input.ReadMessage(Metadata);
            break;
          }
          case 40: {
            Status = (global::Google.Ads.GoogleAds.V12.Enums.BatchJobStatusEnum.Types.BatchJobStatus) input.ReadEnum();
            break;
          }
          case 56: {
            Id = input.ReadInt64();
            break;
          }
          case 66: {
            NextAddSequenceToken = input.ReadString();
            break;
          }
          case 74: {
            LongRunningOperation = input.ReadString();
            break;
          }
        }
      }
    }
    #endif

    #region Nested types
    /// Container for nested types declared in the BatchJob message type.
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static partial class Types {
      ///
      /// Additional information about the batch job. This message is also used as
      /// metadata returned in batch job Long Running Operations.
      ///
      public sealed partial class BatchJobMetadata : pb::IMessage<BatchJobMetadata>
      #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
          , pb::IBufferMessage
      #endif
      {
        private static readonly pb::MessageParser<BatchJobMetadata> _parser = new pb::MessageParser<BatchJobMetadata>(() => new BatchJobMetadata());
        private pb::UnknownFieldSet _unknownFields;
        private int _hasBits0;
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public static pb::MessageParser<BatchJobMetadata> Parser { get { return _parser; } }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public static pbr::MessageDescriptor Descriptor {
          get { return global::Google.Ads.GoogleAds.V12.Resources.BatchJob.Descriptor.NestedTypes[0]; }
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        pbr::MessageDescriptor pb::IMessage.Descriptor {
          get { return Descriptor; }
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public BatchJobMetadata() {
          OnConstruction();
        }

        partial void OnConstruction();

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public BatchJobMetadata(BatchJobMetadata other) : this() {
          _hasBits0 = other._hasBits0;
          creationDateTime_ = other.creationDateTime_;
          startDateTime_ = other.startDateTime_;
          completionDateTime_ = other.completionDateTime_;
          estimatedCompletionRatio_ = other.estimatedCompletionRatio_;
          operationCount_ = other.operationCount_;
          executedOperationCount_ = other.executedOperationCount_;
          _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public BatchJobMetadata Clone() {
          return new BatchJobMetadata(this);
        }

        /// Field number for the "creation_date_time" field.
        public const int CreationDateTimeFieldNumber = 8;
        private string creationDateTime_;
        ///
        /// Output only. The time when this batch job was created.
        /// Formatted as yyyy-mm-dd hh:mm:ss. Example: "2018-03-05 09:15:00"
        ///
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public string CreationDateTime {
          get { return creationDateTime_ ?? ""; }
          set {
            creationDateTime_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
          }
        }
        /// Gets whether the "creation_date_time" field is set
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public bool HasCreationDateTime {
          get { return creationDateTime_ != null; }
        }
        /// Clears the value of the "creation_date_time" field
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public void ClearCreationDateTime() {
          creationDateTime_ = null;
        }

        /// Field number for the "start_date_time" field.
        public const int StartDateTimeFieldNumber = 7;
        private string startDateTime_;
        ///
        /// Output only. The time when this batch job started running.
        /// Formatted as yyyy-mm-dd hh:mm:ss. Example: "2018-03-05 09:15:30"
        ///
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public string StartDateTime {
          get { return startDateTime_ ?? ""; }
          set {
            startDateTime_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
          }
        }
        /// Gets whether the "start_date_time" field is set
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public bool HasStartDateTime {
          get { return startDateTime_ != null; }
        }
        /// Clears the value of the "start_date_time" field
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public void ClearStartDateTime() {
          startDateTime_ = null;
        }

        /// Field number for the "completion_date_time" field.
        public const int CompletionDateTimeFieldNumber = 9;
        private string completionDateTime_;
        ///
        /// Output only. The time when this batch job was completed.
        /// Formatted as yyyy-MM-dd HH:mm:ss. Example: "2018-03-05 09:16:00"
        ///
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public string CompletionDateTime {
          get { return completionDateTime_ ?? ""; }
          set {
            completionDateTime_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
          }
        }
        /// Gets whether the "completion_date_time" field is set
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public bool HasCompletionDateTime {
          get { return completionDateTime_ != null; }
        }
        /// Clears the value of the "completion_date_time" field
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public void ClearCompletionDateTime() {
          completionDateTime_ = null;
        }

        /// Field number for the "estimated_completion_ratio" field.
        public const int EstimatedCompletionRatioFieldNumber = 10;
        private double estimatedCompletionRatio_;
        ///
        /// Output only. The fraction (between 0.0 and 1.0) of mutates that have been processed.
        /// This is empty if the job hasn't started running yet.
        ///
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public double EstimatedCompletionRatio {
          get { if ((_hasBits0 & 1) != 0) { return estimatedCompletionRatio_; } else { return 0D; } }
          set {
            _hasBits0 |= 1;
            estimatedCompletionRatio_ = value;
          }
        }
        /// Gets whether the "estimated_completion_ratio" field is set
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public bool HasEstimatedCompletionRatio {
          get { return (_hasBits0 & 1) != 0; }
        }
        /// Clears the value of the "estimated_completion_ratio" field
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public void ClearEstimatedCompletionRatio() {
          _hasBits0 &= ~1;
        }

        /// Field number for the "operation_count" field.
        public const int OperationCountFieldNumber = 11;
        private long operationCount_;
        ///
        /// Output only. The number of mutate operations in the batch job.
        ///
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public long OperationCount {
          get { if ((_hasBits0 & 2) != 0) { return operationCount_; } else { return 0L; } }
          set {
            _hasBits0 |= 2;
            operationCount_ = value;
          }
        }
        /// Gets whether the "operation_count" field is set
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public bool HasOperationCount {
          get { return (_hasBits0 & 2) != 0; }
        }
        /// Clears the value of the "operation_count" field
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public void ClearOperationCount() {
          _hasBits0 &= ~2;
        }

        /// Field number for the "executed_operation_count" field.
        public const int ExecutedOperationCountFieldNumber = 12;
        private long executedOperationCount_;
        ///
        /// Output only. The number of mutate operations executed by the batch job.
        /// Present only if the job has started running.
        ///
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public long ExecutedOperationCount {
          get { if ((_hasBits0 & 4) != 0) { return executedOperationCount_; } else { return 0L; } }
          set {
            _hasBits0 |= 4;
            executedOperationCount_ = value;
          }
        }
        /// Gets whether the "executed_operation_count" field is set
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public bool HasExecutedOperationCount {
          get { return (_hasBits0 & 4) != 0; }
        }
        /// Clears the value of the "executed_operation_count" field
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public void ClearExecutedOperationCount() {
          _hasBits0 &= ~4;
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public override bool Equals(object other) {
          return Equals(other as BatchJobMetadata);
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public bool Equals(BatchJobMetadata other) {
          if (ReferenceEquals(other, null)) {
            return false;
          }
          if (ReferenceEquals(other, this)) {
            return true;
          }
          if (CreationDateTime != other.CreationDateTime) return false;
          if (StartDateTime != other.StartDateTime) return false;
          if (CompletionDateTime != other.CompletionDateTime) return false;
          if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(EstimatedCompletionRatio, other.EstimatedCompletionRatio)) return false;
          if (OperationCount != other.OperationCount) return false;
          if (ExecutedOperationCount != other.ExecutedOperationCount) return false;
          return Equals(_unknownFields, other._unknownFields);
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public override int GetHashCode() {
          int hash = 1;
          if (HasCreationDateTime) hash ^= CreationDateTime.GetHashCode();
          if (HasStartDateTime) hash ^= StartDateTime.GetHashCode();
          if (HasCompletionDateTime) hash ^= CompletionDateTime.GetHashCode();
          if (HasEstimatedCompletionRatio) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(EstimatedCompletionRatio);
          if (HasOperationCount) hash ^= OperationCount.GetHashCode();
          if (HasExecutedOperationCount) hash ^= ExecutedOperationCount.GetHashCode();
          if (_unknownFields != null) {
            hash ^= _unknownFields.GetHashCode();
          }
          return hash;
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public override string ToString() {
          return pb::JsonFormatter.ToDiagnosticString(this);
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public void WriteTo(pb::CodedOutputStream output) {
        #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
          output.WriteRawMessage(this);
        #else
          if (HasStartDateTime) {
            output.WriteRawTag(58);
            output.WriteString(StartDateTime);
          }
          if (HasCreationDateTime) {
            output.WriteRawTag(66);
            output.WriteString(CreationDateTime);
          }
          if (HasCompletionDateTime) {
            output.WriteRawTag(74);
            output.WriteString(CompletionDateTime);
          }
          if (HasEstimatedCompletionRatio) {
            output.WriteRawTag(81);
            output.WriteDouble(EstimatedCompletionRatio);
          }
          if (HasOperationCount) {
            output.WriteRawTag(88);
            output.WriteInt64(OperationCount);
          }
          if (HasExecutedOperationCount) {
            output.WriteRawTag(96);
            output.WriteInt64(ExecutedOperationCount);
          }
          if (_unknownFields != null) {
            _unknownFields.WriteTo(output);
          }
        #endif
        }

        #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
          if (HasStartDateTime) {
            output.WriteRawTag(58);
            output.WriteString(StartDateTime);
          }
          if (HasCreationDateTime) {
            output.WriteRawTag(66);
            output.WriteString(CreationDateTime);
          }
          if (HasCompletionDateTime) {
            output.WriteRawTag(74);
            output.WriteString(CompletionDateTime);
          }
          if (HasEstimatedCompletionRatio) {
            output.WriteRawTag(81);
            output.WriteDouble(EstimatedCompletionRatio);
          }
          if (HasOperationCount) {
            output.WriteRawTag(88);
            output.WriteInt64(OperationCount);
          }
          if (HasExecutedOperationCount) {
            output.WriteRawTag(96);
            output.WriteInt64(ExecutedOperationCount);
          }
          if (_unknownFields != null) {
            _unknownFields.WriteTo(ref output);
          }
        }
        #endif

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public int CalculateSize() {
          int size = 0;
          if (HasCreationDateTime) {
            size += 1 + pb::CodedOutputStream.ComputeStringSize(CreationDateTime);
          }
          if (HasStartDateTime) {
            size += 1 + pb::CodedOutputStream.ComputeStringSize(StartDateTime);
          }
          if (HasCompletionDateTime) {
            size += 1 + pb::CodedOutputStream.ComputeStringSize(CompletionDateTime);
          }
          if (HasEstimatedCompletionRatio) {
            size += 1 + 8;
          }
          if (HasOperationCount) {
            size += 1 + pb::CodedOutputStream.ComputeInt64Size(OperationCount);
          }
          if (HasExecutedOperationCount) {
            size += 1 + pb::CodedOutputStream.ComputeInt64Size(ExecutedOperationCount);
          }
          if (_unknownFields != null) {
            size += _unknownFields.CalculateSize();
          }
          return size;
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public void MergeFrom(BatchJobMetadata other) {
          if (other == null) {
            return;
          }
          if (other.HasCreationDateTime) {
            CreationDateTime = other.CreationDateTime;
          }
          if (other.HasStartDateTime) {
            StartDateTime = other.StartDateTime;
          }
          if (other.HasCompletionDateTime) {
            CompletionDateTime = other.CompletionDateTime;
          }
          if (other.HasEstimatedCompletionRatio) {
            EstimatedCompletionRatio = other.EstimatedCompletionRatio;
          }
          if (other.HasOperationCount) {
            OperationCount = other.OperationCount;
          }
          if (other.HasExecutedOperationCount) {
            ExecutedOperationCount = other.ExecutedOperationCount;
          }
          _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }

        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        public void MergeFrom(pb::CodedInputStream input) {
        #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
          input.ReadRawMessage(this);
        #else
          uint tag;
          while ((tag = input.ReadTag()) != 0) {
            switch(tag) {
              default:
                _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                break;
              case 58: {
                StartDateTime = input.ReadString();
                break;
              }
              case 66: {
                CreationDateTime = input.ReadString();
                break;
              }
              case 74: {
                CompletionDateTime = input.ReadString();
                break;
              }
              case 81: {
                EstimatedCompletionRatio = input.ReadDouble();
                break;
              }
              case 88: {
                OperationCount = input.ReadInt64();
                break;
              }
              case 96: {
                ExecutedOperationCount = input.ReadInt64();
                break;
              }
            }
          }
        #endif
        }

        #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
        [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
        void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
          uint tag;
          while ((tag = input.ReadTag()) != 0) {
            switch(tag) {
              default:
                _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
                break;
              case 58: {
                StartDateTime = input.ReadString();
                break;
              }
              case 66: {
                CreationDateTime = input.ReadString();
                break;
              }
              case 74: {
                CompletionDateTime = input.ReadString();
                break;
              }
              case 81: {
                EstimatedCompletionRatio = input.ReadDouble();
                break;
              }
              case 88: {
                OperationCount = input.ReadInt64();
                break;
              }
              case 96: {
                ExecutedOperationCount = input.ReadInt64();
                break;
              }
            }
          }
        }
        #endif

      }

    }
    #endregion

  }

  #endregion

}

#endregion Designer generated code


text:
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.WindowsAzure.MobileServices;

namespace MobiliTips.MvxPlugins.MvxAms.Data
{
    /// <summary>
    /// Common data request service
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public interface IMvxAmsTableService<T>
    {
        /// <summary>
        /// Returns data in a new ICollection based on an optional query
        /// </summary>
        /// <param name="query">Optional query to filter collection</param>
        /// <returns>Query filtered ICollection</returns>
        Task<MobileServiceCollection<T, T>> ToCollectionAsync(Func<IMobileServiceTableQuery<T>, IMobileServiceTableQuery<T>> query = null);

        /// <summary>
        /// Returns data in a new IList based on an optional query
        /// </summary>
        /// <param name="query">Optional query to filter collection</param>
        /// <returns>Query filtered IList</returns>
        Task<IList<T>> ToListAsync(Func<IMobileServiceTableQuery<T>, IMobileServiceTableQuery<T>> query = null);

        /// <summary>
        /// Returns data in a new IEnumerable based on an optional query
        /// </summary>
        /// <param name="query">Optional query to filter collection</param>
        /// <returns>Query filtered collection</returns>
        Task<IEnumerable<T>> ToEnumerableAsync(Func<IMobileServiceTableQuery<T>, IMobileServiceTableQuery<T>> query = null);

        /// <summary>
        /// Returns the table instance matching this id
        /// </summary>
        /// <param name="id">Id of the instance to look for</param>
        /// <returns>Table instance</returns>
        Task<T> LookupAsync(string id);

        /// <summary>
        /// Refresh an instance by its latest table values
        /// </summary>
        /// <param name="instance">Table instance to refresh</param>
        /// <returns></returns>
        Task RefreshAsync(T instance);

        /// <summary>
        /// Insert an instance into the table
        /// </summary>
        /// <param name="instance">Instance to insert into the table</param>
        /// <returns></returns>
        Task InsertAsync(T instance);

        /// <summary>
        /// Update a table instance
        /// </summary>
        /// <param name="instance">Instance to update into the table</param>
        /// <returns></returns>
        Task UpdateAsync(T instance);

        /// <summary>
        /// Delete a table instance
        /// </summary>
        /// <param name="instance">Instance to delete from the table</param>
        /// <returns></returns>
        Task DeleteAsync(T instance);
    }
}

redpajama_set_name: RedPajamaGithub


text:
export function indentFromTo(from, to) {
  from.to(to + 1).forEach(line => {
    this.indentLine(line, "smart", true);
  });
}

export function indentSelections() {
  const selections = this.listSelections();
  selections.forEach(({ anchor, head }) => {
    const anchorLine = anchor.line;
    const headLine = head.line;
    const anchorFirst = anchorLine < headLine;
    const fromLine = anchorFirst ? anchorLine : headLine;
    const toLine = anchorFirst ? headLine : anchorLine;
    this::indentFromTo(fromLine, toLine);
  });
}


text:
title: docker/dtr remove
description: Remove a DTR replica from a cluster
keywords: dtr, cli, remove
---

Remove a DTR replica from a cluster

## Usage

```bash
docker run -it --rm docker/dtr \
    remove [command options]
```

## Description

This command gracefully scales down your DTR cluster by removing exactly
one replica. All other replicas must be healthy and will remain healthy after
this operation.

## Options

| Option                        | Environment Variable      | Description                                                                          |
|:------------------------------|:--------------------------|:-------------------------------------------------------------------------------------|
| `--debug` | $DEBUG | Enable debug mode for additional logs. |
| `--existing-replica-id` | $DTR_REPLICA_ID | The ID of an existing DTR replica.To add, remove or modify DTR, you must connect to an existing  healthy replica's database.. |
| `--help-extended` | $DTR_EXTENDED_HELP | Display extended help text for a given command. |
| `--replica-id` | $DTR_REMOVE_REPLICA_ID | DEPRECATED Alias for --replica-ids. |
| `--replica-ids` | $DTR_REMOVE_REPLICA_IDS | A comma separated list of IDs of replicas to remove from the cluster. |
| `--ucp-ca` | $UCP_CA | Use a PEM-encoded TLS CA certificate for UCP.Download the UCP TLS CA certificate from https://<ucp-url>/ca, and  use --ucp-ca "$(cat ca.pem)". |
| `--ucp-insecure-tls` | $UCP_INSECURE_TLS | Disable TLS verification for UCP.The installation uses TLS but always trusts  the TLS certificate used by UCP, which can lead to man-in-the-middle attacks.  For production deployments, use --ucp-ca "$(cat ca.pem)" instead. |
| `--ucp-password` | $UCP_PASSWORD | The UCP administrator password. |
| `--ucp-url` | $UCP_URL | The UCP URL including domain and port. |
| `--ucp-username` | $UCP_USERNAME | The UCP administrator username. |


text:
import warnings
from ruamel.yaml.util import configobj_walker as new_configobj_walker

def configobj_walker(cfg):
    warnings.warn("configobj_walker has move to ruamel.yaml.util, please update your code")
    return new_configobj_walker(cfg)


text: echo "backtrace full" | ./libtool --mode execute gdb test-libmongoc $1


text:
require 'test_helper'

class EventTest < ActiveSupport::TestCase
  before { @event = create :event }

  describe 'basic validations' do
    it 'should build' do
      assert @event.valid?
    end

    it 'should only allow certain statuses' do
      [nil, 'not a status'].each do |bad_status|
        @event.event_type = bad_status
        refute @event.valid?
      end

      valid_types = ['Reached patient', "Couldn't reach patient",
                     'Left voicemail']
      valid_types.each do |status|
        @event.event_type = status
        assert @event.valid?
      end
    end

    [:patient_name, :patient_id, :cm_name].each do |req_field|
      it "requires #{req_field}" do
        @event[req_field] = nil
        refute @event.valid?
      end
    end

    it 'requires a pledge amount if pledged type' do
      @event.event_type = 'Pledged'
      refute @event.valid?
      @event.pledge_amount = 100
      assert @event.valid?
    end
  end

  describe 'rendering methods' do
    describe 'icon' do
      it 'should render the correct icon' do
        @event.event_type = "Couldn't reach patient"
        assert_equal 'phone-alt', @event.icon

        @event.event_type = 'Reached patient'
        assert_equal 'comment', @event.icon

        @event.event_type = 'Pledged'
        assert_equal 'thumbs-up', @event.icon

        @event.event_type = 'Left voicemail'
        assert_equal 'phone-alt', @event.icon
      end
    end

    describe 'underscored_type' do
      it 'should translate to type without punctuation, with underscores' do
        assert_equal 'pledged', create(:event, event_type: 'Pledged', pledge_amount: 100).underscored_type
        assert_equal 'left_voicemail', create(:event, event_type: 'Left voicemail').underscored_type
        assert_equal 'reached_patient', create(:event, event_type: 'Reached patient').underscored_type
      end
    end
  end

  describe 'cleaning old events' do
    before do
      # Here are the destroyers
      create :event, created_at: 4.weeks.ago
      create :event, created_at: 22.days.ago
      create :event, created_at: 3.weeks.ago

      # Here are the keepers
      # In addition to the other event...
      create :event, created_at: 20.days.ago
      create :event, created_at: 2.weeks.ago
    end

    it 'should be able to clean old events' do
      assert_equal 6, Event.count
      Event.destroy_old_events

      assert_equal 3, Event.count
    end
  end
end


text:
using Newtonsoft.Json;

#pragma warning disable 1591    //  Ignore "Missing XML Comment" warning

namespace Doozestan.Domain
{

    public class ClientScope
    {
        public int Id { get; set; }
        public string Scope { get; set; }
        public int ClientId { get; set; }

        [JsonIgnore]
        public virtual Client Client { get; set; }
    }

}


text:
package com.datastax.dse.driver.internal.core.graph;

import static org.mockito.Mockito.when;

import com.datastax.dse.driver.DseTestFixtures;
import com.datastax.dse.driver.api.core.DseProtocolVersion;
import com.datastax.dse.driver.api.core.config.DseDriverOption;
import com.datastax.oss.driver.api.core.DefaultConsistencyLevel;
import com.datastax.oss.driver.api.core.ProtocolVersion;
import com.datastax.oss.driver.api.core.Version;
import com.datastax.oss.driver.api.core.config.DefaultDriverOption;
import com.datastax.oss.driver.api.core.config.DriverExecutionProfile;
import com.datastax.oss.driver.api.core.metadata.Node;
import com.datastax.oss.driver.api.core.type.codec.registry.CodecRegistry;
import com.datastax.oss.driver.internal.core.DefaultConsistencyLevelRegistry;
import com.datastax.oss.driver.internal.core.context.DefaultDriverContext;
import com.datastax.oss.driver.internal.core.cql.RequestHandlerTestHarness;
import com.datastax.oss.driver.internal.core.servererrors.DefaultWriteTypeRegistry;
import com.datastax.oss.driver.internal.core.session.throttling.PassThroughRequestThrottler;
import com.datastax.oss.driver.internal.core.tracker.NoopRequestTracker;
import com.datastax.oss.protocol.internal.Frame;
import io.netty.channel.EventLoop;
import java.time.Duration;
import javax.annotation.Nullable;
import org.mockito.ArgumentMatchers;
import org.mockito.Mock;

/**
 * Provides the environment to test a request handler, where a query plan can be defined, and the
 * behavior of each successive node simulated.
 */
public class GraphRequestHandlerTestHarness extends RequestHandlerTestHarness {

  @Mock DriverExecutionProfile testProfile;

  @Mock DriverExecutionProfile systemQueryExecutionProfile;

  @Mock DefaultDriverContext dseDriverContext;

  @Mock EventLoop eventLoop;

  protected GraphRequestHandlerTestHarness(
      Builder builder,
      @Nullable GraphProtocol graphProtocolForTestConfig,
      Duration graphTimeout,
      @Nullable Version dseVersionForTestMetadata) {
    super(builder);

    // not mocked by RequestHandlerTestHarness, will be used when DseDriverOptions.GRAPH_TIMEOUT
    // is not zero in the config
    when(eventLoopGroup.next()).thenReturn(eventLoop);

    // default graph options as in the reference.conf file
    when(defaultProfile.getString(DseDriverOption.GRAPH_TRAVERSAL_SOURCE, null)).thenReturn("g");
    when(defaultProfile.isDefined(DseDriverOption.GRAPH_SUB_PROTOCOL)).thenReturn(Boolean.FALSE);
    when(defaultProfile.getBoolean(DseDriverOption.GRAPH_IS_SYSTEM_QUERY, false)).thenReturn(false);
    when(defaultProfile.getString(DseDriverOption.GRAPH_NAME, null)).thenReturn("mockGraph");
    when(defaultProfile.getDuration(DseDriverOption.GRAPH_TIMEOUT, Duration.ZERO))
        .thenReturn(graphTimeout);

    when(testProfile.getName()).thenReturn("test-graph");
    when(testProfile.getDuration(DseDriverOption.GRAPH_TIMEOUT, Duration.ZERO))
        .thenReturn(Duration.ofMillis(2L));
    when(testProfile.getString(DefaultDriverOption.REQUEST_CONSISTENCY))
        .thenReturn(DefaultConsistencyLevel.LOCAL_ONE.name());
    when(testProfile.getInt(DefaultDriverOption.REQUEST_PAGE_SIZE)).thenReturn(5000);
    when(testProfile.getString(DefaultDriverOption.REQUEST_SERIAL_CONSISTENCY))
        .thenReturn(DefaultConsistencyLevel.SERIAL.name());
    when(testProfile.getBoolean(DefaultDriverOption.REQUEST_DEFAULT_IDEMPOTENCE)).thenReturn(false);
    when(testProfile.getBoolean(DefaultDriverOption.PREPARE_ON_ALL_NODES)).thenReturn(true);
    when(testProfile.getString(DseDriverOption.GRAPH_TRAVERSAL_SOURCE, null)).thenReturn("a");
    when(testProfile.isDefined(DseDriverOption.GRAPH_SUB_PROTOCOL))
        .thenReturn(graphProtocolForTestConfig != null);
    // only mock the config if graphProtocolForTestConfig is not null
    if (graphProtocolForTestConfig != null) {
      when(testProfile.getString(DseDriverOption.GRAPH_SUB_PROTOCOL))
          .thenReturn(graphProtocolForTestConfig.toInternalCode());
    }
    when(testProfile.getBoolean(DseDriverOption.GRAPH_IS_SYSTEM_QUERY, false)).thenReturn(false);
    when(testProfile.getString(DseDriverOption.GRAPH_NAME, null)).thenReturn("mockGraph");
    when(testProfile.getString(DseDriverOption.GRAPH_READ_CONSISTENCY_LEVEL, null))
        .thenReturn("LOCAL_TWO");
    when(testProfile.getString(DseDriverOption.GRAPH_WRITE_CONSISTENCY_LEVEL, null))
        .thenReturn("LOCAL_THREE");
    when(config.getProfile("test-graph")).thenReturn(testProfile);

    when(systemQueryExecutionProfile.getName()).thenReturn("graph-system-query");
    when(systemQueryExecutionProfile.getDuration(DseDriverOption.GRAPH_TIMEOUT, Duration.ZERO))
        .thenReturn(Duration.ZERO);
    when(systemQueryExecutionProfile.getString(DefaultDriverOption.REQUEST_CONSISTENCY))
        .thenReturn(DefaultConsistencyLevel.LOCAL_ONE.name());
    when(systemQueryExecutionProfile.getInt(DefaultDriverOption.REQUEST_PAGE_SIZE))
        .thenReturn(5000);
    when(systemQueryExecutionProfile.getString(DefaultDriverOption.REQUEST_SERIAL_CONSISTENCY))
        .thenReturn(DefaultConsistencyLevel.SERIAL.name());
    when(systemQueryExecutionProfile.getBoolean(DefaultDriverOption.REQUEST_DEFAULT_IDEMPOTENCE))
        .thenReturn(false);
    when(systemQueryExecutionProfile.getBoolean(DefaultDriverOption.PREPARE_ON_ALL_NODES))
        .thenReturn(true);
    when(systemQueryExecutionProfile.getName()).thenReturn("graph-system-query");
    when(systemQueryExecutionProfile.getDuration(DseDriverOption.GRAPH_TIMEOUT, Duration.ZERO))
        .thenReturn(Duration.ofMillis(2));
    when(systemQueryExecutionProfile.getBoolean(DseDriverOption.GRAPH_IS_SYSTEM_QUERY, false))
        .thenReturn(true);
    when(systemQueryExecutionProfile.getString(DseDriverOption.GRAPH_READ_CONSISTENCY_LEVEL, null))
        .thenReturn("LOCAL_TWO");
    when(systemQueryExecutionProfile.getString(DseDriverOption.GRAPH_WRITE_CONSISTENCY_LEVEL, null))
        .thenReturn("LOCAL_THREE");

    when(config.getProfile("graph-system-query")).thenReturn(systemQueryExecutionProfile);

    // need to re-mock everything on the context because the RequestHandlerTestHarness returns a
    // InternalDriverContext and not a DseDriverContext. Couldn't figure out a way with mockito
    // to say "mock this object (this.dseDriverContext), and delegate every call to that
    // other object (this.context), except _this_ call and _this_ and so on"
    // Spy wouldn't work because the spied object has to be of the same type as the final object
    when(dseDriverContext.getConfig()).thenReturn(config);
    when(dseDriverContext.getNettyOptions()).thenReturn(nettyOptions);
    when(dseDriverContext.getLoadBalancingPolicyWrapper()).thenReturn(loadBalancingPolicyWrapper);
    when(dseDriverContext.getRetryPolicy(ArgumentMatchers.anyString())).thenReturn(retryPolicy);
    when(dseDriverContext.getSpeculativeExecutionPolicy(ArgumentMatchers.anyString()))
        .thenReturn(speculativeExecutionPolicy);
    when(dseDriverContext.getCodecRegistry()).thenReturn(CodecRegistry.DEFAULT);
    when(dseDriverContext.getTimestampGenerator()).thenReturn(timestampGenerator);
    when(dseDriverContext.getProtocolVersion()).thenReturn(DseProtocolVersion.DSE_V2);
    when(dseDriverContext.getProtocolVersionRegistry()).thenReturn(protocolVersionRegistry);
    when(dseDriverContext.getConsistencyLevelRegistry())
        .thenReturn(new DefaultConsistencyLevelRegistry());
    when(dseDriverContext.getWriteTypeRegistry()).thenReturn(new DefaultWriteTypeRegistry());
    when(dseDriverContext.getRequestThrottler())
        .thenReturn(new PassThroughRequestThrottler(dseDriverContext));
    when(dseDriverContext.getRequestTracker()).thenReturn(new NoopRequestTracker(dseDriverContext));
    // if DSE Version is specified for test metadata, then we need to mock that up on the context
    if (dseVersionForTestMetadata != null) {
      DseTestFixtures.mockNodesInMetadataWithVersions(
          dseDriverContext, true, dseVersionForTestMetadata);
    }
  }

  @Override
  public DefaultDriverContext getContext() {
    return dseDriverContext;
  }

  public static GraphRequestHandlerTestHarness.Builder builder() {
    return new GraphRequestHandlerTestHarness.Builder();
  }

  public static class Builder extends RequestHandlerTestHarness.Builder {

    private GraphProtocol graphProtocolForTestConfig;
    private Duration graphTimeout = Duration.ZERO;
    private Version dseVersionForTestMetadata;

    public GraphRequestHandlerTestHarness.Builder withGraphProtocolForTestConfig(
        GraphProtocol protocol) {
      this.graphProtocolForTestConfig = protocol;
      return this;
    }

    public GraphRequestHandlerTestHarness.Builder withDseVersionInMetadata(Version dseVersion) {
      this.dseVersionForTestMetadata = dseVersion;
      return this;
    }

    public GraphRequestHandlerTestHarness.Builder withGraphTimeout(Duration globalTimeout) {
      this.graphTimeout = globalTimeout;
      return this;
    }

    @Override
    public GraphRequestHandlerTestHarness.Builder withEmptyPool(Node node) {
      super.withEmptyPool(node);
      return this;
    }

    @Override
    public GraphRequestHandlerTestHarness.Builder withWriteFailure(Node node, Throwable cause) {
      super.withWriteFailure(node, cause);
      return this;
    }

    @Override
    public GraphRequestHandlerTestHarness.Builder withResponseFailure(Node node, Throwable cause) {
      super.withResponseFailure(node, cause);
      return this;
    }

    @Override
    public GraphRequestHandlerTestHarness.Builder withResponse(Node node, Frame response) {
      super.withResponse(node, response);
      return this;
    }

    @Override
    public GraphRequestHandlerTestHarness.Builder withDefaultIdempotence(
        boolean defaultIdempotence) {
      super.withDefaultIdempotence(defaultIdempotence);
      return this;
    }

    @Override
    public GraphRequestHandlerTestHarness.Builder withProtocolVersion(
        ProtocolVersion protocolVersion) {
      super.withProtocolVersion(protocolVersion);
      return this;
    }

    @Override
    public GraphRequestHandlerTestHarness build() {
      return new GraphRequestHandlerTestHarness(
          this, graphProtocolForTestConfig, graphTimeout, dseVersionForTestMetadata);
    }
  }
}


text:
package spark.examples.exception;

public class SubclassOfBaseException extends BaseException {
    private static final long serialVersionUID = 1L;
}


text:
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.euromedice.vademecum" version="1.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" xmlns:gap="http://phonegap.com/ns/1.0">
    <feature name="Camera">
        <param name="browser-package" value="Camera" />
    </feature>
    <feature name="Device">
        <param name="browser-package" value="Device" />
    </feature>
    <name>Vademécum MJ</name>
    <description>
        Vademécum del portafolio de productos de la línea de nutrición infantil Mead Johnson Nutrition. Comprende indicaciones terapéuticas, tabla nutrimental, presentaciones disponibles por país, entre otros. App Multipaís LATAM.
    </description>
    <author email="joan.munso@euromedice.net" href="http://www.euromedice.net">
        Euromedice
    </author>
    <content src="index.html" />
    <access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <allow-navigation href="http://*/*" />
    <preference name="DisallowOverscroll" value="true" />
    <preference name="android-minSdkVersion" value="14" />
    <preference name="orientation" value="default" />
    <preference name="target-device" value="universal" />
    <preference name="webviewbounce" value="true" />
    <preference name="prerendered-icon" value="true" />
    <preference name="stay-in-webview" value="false" />
    <preference name="ios-statusbarstyle" value="black-opaque" />
    <preference name="detect-data-types" value="true" />
    <preference name="exit-on-suspend" value="false" />
    <preference name="show-splash-screen-spinner" value="true" />
    <preference name="auto-hide-splash-screen" value="true" />
    <preference name="disable-cursor" value="false" />
    <preference name="android-installLocation" value="auto" />
</widget>


text:
salt.states.boto_iam
====================

.. automodule:: salt.states.boto_iam
    :members:


text:
Module to turn squidguard groups(/acls) on or off

Manage your squidguard groups/acls. This tool was made for schools. You can set every group very easily to one of five modes. The modes on/off/only/on plus and adminfree are available. This works also with other "target categories" from shalla or own "target categories".

We made for every classroom a acl. And set for every classroom specific acls (block porn and so on). With this tool you can modify very easily the "Default access [all]" entry. Go to the surftool and click on the bottom of the classroom. This tool is simple to use.

The surf tool consists of two modules.
- The Web GUI reads the squidguard.conf file an writes the user commands to a separate file
- The "surftooldaemon" looks every x seconds for new command files and activates the changes

Why is there a extra daemon?

Our lessons start at 7:50am clock. Between 07:50 am and 07:55 am we have 40 changes (mostly switching online) (peak). That's why we need to synchronize writing to the squidquard configurations files.