github.com/cloudwan/edgelq-sdk@v1.15.4/monitoring/proto/v4/monitored_resource_descriptor_service.proto (about)

     1  syntax = "proto3";
     2  
     3  package ntt.monitoring.v4;
     4  
     5  import "edgelq-sdk/monitoring/proto/v4/monitored_resource_descriptor.proto";
     6  import "edgelq-sdk/monitoring/proto/v4/monitored_resource_descriptor_change.proto";
     7  import "edgelq-sdk/monitoring/proto/v4/monitored_resource_descriptor_custom.proto";
     8  import "google/api/annotations.proto";
     9  import "google/api/client.proto";
    10  import "google/protobuf/empty.proto";
    11  import "google/protobuf/field_mask.proto";
    12  import "google/protobuf/timestamp.proto";
    13  import "goten-sdk/types/view.proto";
    14  import "goten-sdk/types/watch_type.proto";
    15  
    16  option go_package = "github.com/cloudwan/edgelq-sdk/monitoring/client/v4/monitored_resource_descriptor;monitored_resource_descriptor_client";
    17  option java_multiple_files = false;
    18  option java_outer_classname = "MonitoredResourceDescriptorServiceProto";
    19  option java_package = "com.ntt.monitoring.pb.v4";
    20  
    21  // A request message of the BatchGetMonitoredResourceDescriptors method.
    22  message BatchGetMonitoredResourceDescriptorsRequest {
    23    // Names of MonitoredResourceDescriptors
    24    repeated string names = 2;
    25  
    26    // A list of extra fields to be obtained for each response item on top of
    27    // fields defined by request field view
    28    google.protobuf.FieldMask field_mask = 3;
    29  
    30    // View defines list of standard response fields present in response items.
    31    // Additional fields can be amended by request field field_mask
    32    goten.types.View view = 4;
    33  
    34    reserved 1;
    35  }
    36  
    37  // A response message of the BatchGetMonitoredResourceDescriptors method.
    38  message BatchGetMonitoredResourceDescriptorsResponse {
    39    // found MonitoredResourceDescriptors
    40    repeated MonitoredResourceDescriptor monitored_resource_descriptors = 1;
    41  
    42    // list of not found MonitoredResourceDescriptors
    43    repeated string missing = 2;
    44  }
    45  
    46  // A request message of the WatchMonitoredResourceDescriptor method.
    47  message WatchMonitoredResourceDescriptorRequest {
    48    // Name of ntt.monitoring.v4.MonitoredResourceDescriptor
    49    string name = 1;
    50  
    51    // A list of extra fields to be obtained for each response item on top of
    52    // fields defined by request field view
    53    google.protobuf.FieldMask field_mask = 2;
    54  
    55    // View defines list of standard response fields present in response items.
    56    // Additional fields can be amended by request field field_mask
    57    goten.types.View view = 4;
    58  }
    59  
    60  // A response message of the WatchMonitoredResourceDescriptor method.
    61  message WatchMonitoredResourceDescriptorResponse {
    62    MonitoredResourceDescriptorChange change = 1;
    63  }
    64  
    65  // A request message of the WatchMonitoredResourceDescriptors method.
    66  message WatchMonitoredResourceDescriptorsRequest {
    67    // Type of a watch. Identifies how server stream data to a client, which
    68    // fields in a request are allowed and which fields in response are relevant.
    69    goten.types.WatchType type = 9;
    70  
    71    // Parent name of ntt.monitoring.v4.MonitoredResourceDescriptor
    72    string parent = 1;
    73  
    74    // Requested page size. Server may return fewer MonitoredResourceDescriptors
    75    // than requested. If unspecified, server will pick an appropriate default.
    76    // Can be populated only for stateful watch type.
    77    int32 page_size = 2;
    78  
    79    // A token identifying a page of results the server should return.
    80    // Can be populated only for stateful watch type.
    81    string page_token = 3;
    82  
    83    // Order By -
    84    // https://cloud.google.com/apis/design/design_patterns#list_pagination Can be
    85    // populated only for stateful watch type.
    86    string order_by = 4;
    87  
    88    // A token identifying watch resume point from previous session.
    89    // Can be populated only for stateless watch type.
    90    string resume_token = 10;
    91  
    92    // Point in the time from which we want to start getting updates. This field
    93    // can be populated only for stateless watch type and if resume token is not
    94    // known yet. If specified, initial snapshot will NOT be provided. It is
    95    // assumed client can obtain it using separate means. Watch responses will
    96    // contain resume tokens which should be used to resume broken connection.
    97    google.protobuf.Timestamp starting_time = 12;
    98  
    99    // Filter - filter results by field criteria. Simplified SQL-like syntax with
   100    // following operators:
   101    // <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS
   102    // [NOT] NULL | NaN . Combine conditions with OR | AND example: 'meta.labels
   103    // CONTAINS "severity:important" OR (state.last_error_time >
   104    // "2018-11-15T10:00:00Z" AND state.status = "ERROR")'
   105    string filter = 5;
   106  
   107    // A list of extra fields to be obtained for each response item on top of
   108    // fields defined by request field view Changes to MonitoredResourceDescriptor
   109    // that don't affect any of masked fields won't be sent back.
   110    google.protobuf.FieldMask field_mask = 6;
   111  
   112    // View defines list of standard response fields present in response items.
   113    // Additional fields can be amended by request field field_mask Changes to
   114    // MonitoredResourceDescriptor that don't affect any of masked fields won't be
   115    // sent back.
   116    goten.types.View view = 8;
   117  
   118    // Maximum amount of changes in each response message. Query result response
   119    // is divided on the server side into chunks with size of a specified amount
   120    // to limit memory footprint of each message. Responses will hold information
   121    // whether more elements will continue for the actual change. If unspecified,
   122    // server will pick an appropriate default.
   123    int32 max_chunk_size = 11;
   124  }
   125  
   126  // A response message of the WatchMonitoredResourceDescriptors method.
   127  message WatchMonitoredResourceDescriptorsResponse {
   128    // Changes of MonitoredResourceDescriptors
   129    repeated MonitoredResourceDescriptorChange
   130        monitored_resource_descriptor_changes = 2;
   131  
   132    // If request specified max_chunk_size (or this limit was enforced if
   133    // stateless watch has been chosen), then responses with "full changeset" will
   134    // be divided into chunks. Client should keep receiving messages and, once
   135    // is_current has value true, combine this recent message with all previous
   136    // ones where is_current is false. If this is the first is_current in a whole
   137    // watch stream, then it means that client should have, at this moment,
   138    // contain snapshot of the current situation (or more accurately, snapshot of
   139    // situation at the moment of request). All MonitoredResourceDescriptors will
   140    // be of type Added/Current (depending on watch_type specified in the
   141    // request). Further responses will be incremental - however messages may
   142    // still be chunked and is_current logic still applies. is_current is always
   143    // true for stateful watch if max_chunk_size was left to 0.
   144    bool is_current = 4;
   145  
   146    // When present, PageTokens used for page navigation should be updated.
   147    // Present only if is_current is true (last chunk).
   148    PageTokenChange page_token_change = 3;
   149  
   150    // Token that can be used if current connection drops and client needs to
   151    // reconnect. Populated only for stateless watch type. Present only if
   152    // is_current is true (last chunk).
   153    string resume_token = 5;
   154  
   155    // Server may occasionally send information how many resources should client
   156    // have in its state so far (response message without any changes, but with
   157    // snapshot_size field specified). If client has different value than the one
   158    // sent by the server, then it should be treated by a client as an error and
   159    // should reconnect. If value is smaller then 0, then client should ignore
   160    // this field as unpopulated. This field should be checked only for stateless
   161    // watch. In stateful those kind of errors are handled by the server side.
   162    // Will be never sent together with is_current, is_soft_reset and
   163    // is_hard_reset flags.
   164    int64 snapshot_size = 6;
   165  
   166    // In case of internal issue server may send response message with this flag.
   167    // It indicates that client should drop all changes from recent responses
   168    // where is_current is false only! If last message had is_current set to true,
   169    // client should do nothing and process normally. Resume token received before
   170    // is still valid. This field should be checked only for stateless watch. In
   171    // stateful those kind of errors are handled by the server side. Will never be
   172    // sent along with is_current, is_hard_reset or snapshot_size.
   173    bool is_soft_reset = 7;
   174  
   175    // In case of internal issue server may send response message with this flag.
   176    // After receiving, client should clear whole state (drop all changes received
   177    // so far) as server will send new snapshot (MonitoredResourceDescriptors will
   178    // contains changes of type Current only). Any resume tokens should be
   179    // discarded as well. This field should be checked only for stateless watch.
   180    // In stateful those kind of errors are handled by the server side. Will never
   181    // be sent along with is_current, is_soft_reset or snapshot_size.
   182    bool is_hard_reset = 8;
   183  
   184    message PageTokenChange {
   185      // New token to retrieve previous page of results.
   186      string prev_page_token = 1;
   187  
   188      // New token to retrieve next page of results.
   189      string next_page_token = 2;
   190    }
   191  }
   192  
   193  // A request message of the CreateMonitoredResourceDescriptor method.
   194  message CreateMonitoredResourceDescriptorRequest {
   195    // Parent name of ntt.monitoring.v4.MonitoredResourceDescriptor
   196    string parent = 1;
   197  
   198    // MonitoredResourceDescriptor resource body
   199    MonitoredResourceDescriptor monitored_resource_descriptor = 2;
   200  
   201    // Optional masking applied to response object to reduce message response
   202    // size.
   203    ResponseMask response_mask = 3;
   204  
   205    // ResponseMask allows client to reduce response message size.
   206    message ResponseMask {
   207      oneof masking {
   208        // If this flag has value true, then response will contain just empty
   209        // resource without any fields populated.
   210        bool skip_entire_response_body = 1;
   211  
   212        // If this field is populated, then resource in response will contain only
   213        // specific fields.
   214        google.protobuf.FieldMask body_mask = 2;
   215      }
   216    }
   217  }
   218  
   219  // A request message of the UpdateMonitoredResourceDescriptor method.
   220  message UpdateMonitoredResourceDescriptorRequest {
   221    // MonitoredResourceDescriptor resource body
   222    MonitoredResourceDescriptor monitored_resource_descriptor = 2;
   223  
   224    // FieldMask applied to request - change will be applied only for fields in
   225    // the mask
   226    google.protobuf.FieldMask update_mask = 3;
   227  
   228    // Conditional update applied to request if update should be executed only for
   229    // specific resource state. If this field is populated, then server will fetch
   230    // existing resource, compare with the one stored in the cas field (after
   231    // applying field mask) and proceed with update only and only if they match.
   232    // Otherwise RPC error Aborted will be returned.
   233    CAS cas = 4;
   234  
   235    // If set to true, and the resource is not found,
   236    // a new resource will be created.  In this situation,
   237    // 'field_mask' is ignored.
   238    //
   239    // https://google.aip.dev/134#create-or-update
   240    bool allow_missing = 5; // Optional masking applied to response object to
   241  
   242    // reduce message response size.
   243    ResponseMask response_mask = 6;
   244  
   245    // CAS - Compare and Swap. This object is used if user wants to make update
   246    // conditional based upon previous resource version.
   247    message CAS {
   248      // Conditional desired state of a resource before update.
   249      MonitoredResourceDescriptor conditional_state = 1;
   250  
   251      // Field paths from conditional state of resource server should check and
   252      // compare.
   253      google.protobuf.FieldMask field_mask = 2;
   254    }
   255  
   256    // ResponseMask allows client to reduce response message size.
   257    message ResponseMask {
   258      oneof masking {
   259        // If this flag has value true, then response will contain just empty
   260        // resource without any fields populated. Field body_mask is ignored if
   261        // set.
   262        bool skip_entire_response_body = 1;
   263  
   264        // Include all fields that were actually updated during processing. Note
   265        // this may be larger than update mask if some fields were computed
   266        // additionally. Name is added as well.
   267        bool updated_fields_only = 2;
   268  
   269        // If this field is populated, then resource in response will contain only
   270        // specific fields. If skip_entire_response_body is true, this field is
   271        // ignored.
   272        google.protobuf.FieldMask body_mask = 3;
   273      }
   274    }
   275  }
   276  
   277  // A request message of the DeleteMonitoredResourceDescriptor method.
   278  message DeleteMonitoredResourceDescriptorRequest {
   279    // Name of ntt.monitoring.v4.MonitoredResourceDescriptor
   280    string name = 1;
   281  
   282    // If set to true, and the resource is not found, method will be successful
   283    // and will not return NotFound error.
   284    bool allow_missing = 2;
   285  }
   286  
   287  // MonitoredResourceDescriptor service API for Monitoring
   288  service MonitoredResourceDescriptorService {
   289    option (google.api.default_host) = "monitoring.edgelq.com";
   290    option (google.api.oauth_scopes) = "https://apis.edgelq.com";
   291  
   292    // BatchGetMonitoredResourceDescriptors
   293    rpc BatchGetMonitoredResourceDescriptors(
   294        BatchGetMonitoredResourceDescriptorsRequest)
   295        returns (BatchGetMonitoredResourceDescriptorsResponse) {
   296      option (google.api.http) = {
   297        get : "/v4/monitoredResourceDescriptors:batchGet"
   298      };
   299    }
   300  
   301    // WatchMonitoredResourceDescriptor
   302    rpc WatchMonitoredResourceDescriptor(WatchMonitoredResourceDescriptorRequest)
   303        returns (stream WatchMonitoredResourceDescriptorResponse) {
   304      option (google.api.http) = {
   305        post : "/v4/{name=services/*/monitoredResourceDescriptors/*}:watch"
   306      };
   307    }
   308  
   309    // WatchMonitoredResourceDescriptors
   310    rpc WatchMonitoredResourceDescriptors(
   311        WatchMonitoredResourceDescriptorsRequest)
   312        returns (stream WatchMonitoredResourceDescriptorsResponse) {
   313      option (google.api.http) = {
   314        post : "/v4/{parent=services/*}/monitoredResourceDescriptors:watch"
   315      };
   316    }
   317  
   318    // CreateMonitoredResourceDescriptor
   319    rpc CreateMonitoredResourceDescriptor(
   320        CreateMonitoredResourceDescriptorRequest)
   321        returns (MonitoredResourceDescriptor) {
   322      option (google.api.http) = {
   323        post : "/v4/{parent=services/*}/monitoredResourceDescriptors"
   324        body : "monitored_resource_descriptor"
   325      };
   326    }
   327  
   328    // UpdateMonitoredResourceDescriptor
   329    rpc UpdateMonitoredResourceDescriptor(
   330        UpdateMonitoredResourceDescriptorRequest)
   331        returns (MonitoredResourceDescriptor) {
   332      option (google.api.http) = {
   333        put : "/v4/{monitored_resource_descriptor.name=services/*/"
   334              "monitoredResourceDescriptors/*}"
   335        body : "monitored_resource_descriptor"
   336      };
   337    }
   338  
   339    // DeleteMonitoredResourceDescriptor
   340    rpc DeleteMonitoredResourceDescriptor(
   341        DeleteMonitoredResourceDescriptorRequest)
   342        returns (google.protobuf.Empty) {
   343      option (google.api.http) = {
   344        delete : "/v4/{name=services/*/monitoredResourceDescriptors/*}"
   345      };
   346    }
   347  
   348    // GetMonitoredResourceDescriptor
   349    rpc GetMonitoredResourceDescriptor(GetMonitoredResourceDescriptorRequest)
   350        returns (MonitoredResourceDescriptor) {
   351      option (google.api.http) = {
   352        get : "/v4/{name=services/*/monitoredResourceDescriptors/*}"
   353      };
   354    }
   355  
   356    // ListMonitoredResourceDescriptors
   357    rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest)
   358        returns (ListMonitoredResourceDescriptorsResponse) {
   359      option (google.api.http) = {
   360        get : "/v4/{parent=services/*}/monitoredResourceDescriptors"
   361      };
   362    }
   363  }